37 lines
2.1 KiB
Markdown
37 lines
2.1 KiB
Markdown
# CLI Policy Lifecycle Commands
|
|
|
|
## Module
|
|
Cli
|
|
|
|
## Status
|
|
IMPLEMENTED
|
|
|
|
## 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
|