Files
git.stella-ops.org/docs/features/checked/cli/cli-policy-lifecycle-commands.md
2026-02-14 09:11:48 +02:00

2.6 KiB

CLI Policy Lifecycle Commands

Module

Cli

Status

VERIFIED

Description

Full policy lifecycle management from CLI including version bumping, submission, review, approval, simulation, publish/promote/rollback with DSSE signing and canary deployment support.

Implementation Details

  • Command Group: src/Cli/StellaOps.Cli/Commands/PolicyCommandGroup.cs -- PolicyCommandGroup for stella policy commands
  • Policy Interop: src/Cli/StellaOps.Cli/Commands/Policy/PolicyInteropCommandGroup.cs -- policy interop commands
  • Command Handlers: src/Cli/StellaOps.Cli/Commands/CommandHandlers.cs -- policy-related handlers
  • Commands:
    • stella policy bump <file> --level patch|minor|major -- version bump with changelog
    • stella policy submit <file> --reviewer <user> -- submit for review
    • stella policy review status <id> -- check review status
    • stella policy approve <id> -- approve policy review
    • stella policy simulate <file> -- run simulation
    • stella policy publish <file> -- publish approved revision with DSSE signing
    • stella policy promote <id> --env <env> -- promote to environment
    • stella policy rollback <id> --to <version> -- rollback to previous version
  • Tests: src/Cli/__Tests/StellaOps.Cli.Tests/GoldenOutput/PolicyListCommandGoldenTests.cs, PolicyListGoldenOutputTests.cs

E2E Test Plan

  • Run stella policy bump ./policy.stella --level minor --message "Add reachability gate" and verify version incremented
  • Run stella policy submit ./policy.stella --reviewer admin and verify submission created
  • Run stella policy review status <id> and verify review status displayed
  • Run stella policy approve <id> and verify approval recorded
  • Run stella policy simulate ./policy.stella and verify simulation results
  • Run stella policy publish ./policy.stella --sign and verify DSSE-signed publication
  • Run stella policy promote <id> --env production and verify promotion
  • Run stella policy rollback <id> --to v1.2.0 and verify rollback
  • Verify canary deployment mode with --canary flag

Verification

  • Verified: 2026-02-13T15:30:00Z
  • Tier 0 (Source): pass -- all referenced source files exist on disk
  • Tier 1 (Build): pass -- module builds cleanly, 412 tests pass in StellaOps.Cli.Commands.Tests
  • Tier 2d (Integration): pass -- targeted integration tests confirm behavioral correctness
  • Test Project: src/Cli/__Tests/StellaOps.Cli.Commands.Tests/StellaOps.Cli.Commands.Tests.csproj
  • Evidence: docs/qa/feature-checks/runs/cli/cli-policy-lifecycle-commands/run-001/tier2-integration-check.json