Parent
Sub-issue 7 of #120 (RFC: Least-privilege CDK bootstrap policies as code)
Branch strategy
feat/bootstrap-cicd → targets feat/bootstrap-preflight
Estimated review time: ~20 min
Summary
Wire the preflight validator into the deployment pipeline and local task dependency chain. Ensures no deploy happens without validation — in CI or locally.
Deliverables
Key design decisions
- build.yml (PR CI): runs Aspect via synth + checks generated artifacts are committed. No AWS credentials needed.
- deploy.yml (deploy CI): runs live preflight. Needs only
cloudformation:DescribeStacks (not full deploy creds).
- Local
mise //cdk:deploy depends on preflight — developers can't accidentally skip it. --force flag exists for emergencies but is documented as "you better know what you're doing."
- Preflight is a separate step (not embedded in deploy) so CI logs clearly show "preflight passed" vs "deploy started."
Acceptance criteria
mise //cdk:deploy fails if preflight fails (locally)
deploy.yml blocks deploy on preflight failure
build.yml catches stale generated artifacts
- Force-override is documented and works
- No regression in existing CI workflows
Parent
Sub-issue 7 of #120 (RFC: Least-privilege CDK bootstrap policies as code)
Branch strategy
feat/bootstrap-cicd→ targetsfeat/bootstrap-preflightEstimated review time: ~20 min
Summary
Wire the preflight validator into the deployment pipeline and local task dependency chain. Ensures no deploy happens without validation — in CI or locally.
Deliverables
cdk/mise.toml:deploydepends onpreflight//cdk:bootstrap:checktask — CI-only variant (read-only, no deploy, just validation)--forceoverride for emergency deploys that skip preflight.github/workflows/deploy.yml:preflightstep beforecdk deploystepcloudformation:DescribeStacks).github/workflows/build.yml:bootstrap:checkstep after synthcdk/bootstrap/artifacts are up to date (no uncommitted drift)cdk/test/bootstrap/integration.test.ts:Key design decisions
cloudformation:DescribeStacks(not full deploy creds).mise //cdk:deploydepends onpreflight— developers can't accidentally skip it.--forceflag exists for emergencies but is documented as "you better know what you're doing."Acceptance criteria
mise //cdk:deployfails if preflight fails (locally)deploy.ymlblocks deploy on preflight failurebuild.ymlcatches stale generated artifacts