6 lines
3.1 KiB
Plaintext
6 lines
3.1 KiB
Plaintext
Project Sentinel: Deployment & Release ProtocolVersion: 3.0.0-EnterpriseModule: 16-Workflow-DeployMaps to: docs/workflows/GIT_PUSH_PROCEDURES.md (Release Section)Scope: Governance of production deployments, release versioning, and post-deployment verification.1. The Deployment GatekeeperIn the Sentinel ecosystem, "Deployment" is a privileged state. The Agent cannot simply run kubectl apply or terraform apply whenever it wants. It must first transition the Sentinel State Machine into RELEASE mode.1.1 The Release State RequirementsThe transition from ACTIVE to RELEASE is guarded by strict predicates.Trigger: Agent calls prepare_release(type="minor").Sentinel Logic:Sprint Completion: Are all tasks in the current sprint marked DONE?Build Integrity: Does go build / npm build pass on a clean git tree?Audit Status: Are there zero unresolved "High Severity" audit logs in the current session?Test Status: Did the full regression suite pass within the last 15 minutes?Outcome:Success: State transitions to RELEASE_CANDIDATE. The deploy_to_staging tool is unlocked.Failure: "Release Blocked. You have 1 Open Task and Stale Tests."2. The Staging ProtocolSentinel enforces a "Staging First" policy. Direct-to-Prod is physically disabled in the tool definitions.2.1 The Staging LockTool: deploy(target="staging")Verification:Sentinel executes the deployment script.Health Check: Immediately after deployment, Sentinel polls the staging health endpoint (/healthz).Smoke Test: Sentinel runs a subset of E2E tests against the staging URL.Gate: If the Health Check fails, the deploy(target="production") tool remains LOCKED.2.2 The "Soak" TimerRule: Code must run on Staging for at least X minutes before Prod unlock.Mechanism:Sentinel starts a timer upon successful staging deploy.If Agent attempts deploy(target="production") immediately:Error: "Soak Time Violation. Production unlock in 09:45."3. Production Deployment (The Four-Keys)Sentinel wraps the production deployment in a high-security envelope.3.1 The Semantic Versioning EnforcerAction: Sentinel calculates the next version number based on the CHANGELOG.md generated earlier.Tagging: Sentinel creates a signed git tag v1.2.0.Constraint: The deployment artifact must be built from this exact tag. Sentinel verifies the git hash of the build artifact against the tag hash.3.2 The "Break-Glass" ApprovalInteraction:Agent requests: deploy(target="production", version="v1.2.0").Sentinel: PAUSES EXECUTION.Output:[SENTINEL DEFCON 1]
|
|
target: PRODUCTION
|
|
version: v1.2.0
|
|
changes: 5 files, +120/-40
|
|
CONFIRM DEPLOYMENT? (Type 'DEPLOY-NOW' to confirm):
|
|
Wait: Sentinel waits for exact string match from User Stdin.4. Post-Deployment Verification (PDV)The job isn't done when the script finishes.4.1 The Rollback TriggerLogic: Sentinel monitors metrics (if integrated) or HTTP status codes for 5 minutes post-deploy.Condition: If ErrorRate > 1% OR Latency > 500ms.Action: Sentinel automatically triggers emergency_rollback().Notification: "Automatic Rollback Triggered due to PDV failure."4.2 The ClosureAction: Upon successful PDV, Sentinel transitions state to ARCHIVED.Cleanup: Feature branches are deleted. Sprint is closed. Agent is reset to IDLE. |