Files
git.stella-ops.org/docs/features/unchecked/policy/dry-run-policy-application-api.md

38 lines
1.9 KiB
Markdown

# Dry-Run Policy Application API
## Status
IMPLEMENTED
## Description
Backend support for dry-run policy application with diff preview and rollback plan generation. Not yet implemented.
## Why Marked as Dropped (Correction)
**FINDING: Policy simulation / dry-run IS implemented.** The following exist:
- `src/Policy/StellaOps.Policy.Registry/Services/PolicySimulationService.cs` -- core simulation service
- `src/Policy/StellaOps.Policy.Registry/Services/IPolicySimulationService.cs` -- interface
- `src/Policy/StellaOps.Policy.Registry/Services/BatchSimulationOrchestrator.cs` -- batch simulation support
- `src/Policy/StellaOps.Policy.Registry/Services/IBatchSimulationOrchestrator.cs` -- interface
- `src/Policy/StellaOps.Policy.Registry/Testing/PolicyRegistryTestHarness.cs` -- test harness
- Tools library: `src/__Libraries/StellaOps.Policy.Tools/PolicySimulationSmokeCommand.cs`, `PolicySimulationSmokeModels.cs`, `PolicySimulationSmokeApp.cs`
- Web UI dry-run support: setup wizard includes dry-run functionality per `src/Web/StellaOps.Web/src/app/features/setup-wizard/`
- Database migration support: `src/__Libraries/StellaOps.Infrastructure.Postgres/Migrations/MigrationRunner.cs` has dry-run mode
## Implementation Details
- Simulation service: `src/Policy/StellaOps.Policy.Registry/Services/PolicySimulationService.cs`
- Batch orchestrator: `src/Policy/StellaOps.Policy.Registry/Services/BatchSimulationOrchestrator.cs`
- Smoke test tools: `src/__Libraries/StellaOps.Policy.Tools/PolicySimulationSmoke*.cs`
- Test harness: `src/Policy/StellaOps.Policy.Registry/Testing/PolicyRegistryTestHarness.cs`
## E2E Test Plan
- Verify policy simulation produces expected diff output
- Test batch simulation across multiple policies
- Validate dry-run mode prevents actual policy application
## Source
- Feature matrix scan
## Notes
- Module: Policy
- Modules referenced: `src/Policy/StellaOps.Policy.Registry/`
- **Status should be reclassified from NOT_FOUND to IMPLEMENTED**