Parent
Map #16 · implements the Phase 1 decision locked in #19 (staging auto-rebuild).
What to build
Close the HOP-2 gap on staging: today a fresh codeq binary in gs://qbraid-codeq-staging touches no qbraid-lab-base/** file, so build-lab-base never fires and lab-base:latest keeps the old binary until someone runs the trigger by hand. Make it automatic — append a final step to opencode-staging-branch, after the gsutil cp + manifest steps succeed:
gcloud builds triggers run build-lab-base --branch=staging
Scope IAM so the staging codeq build SA can run only the staging build-lab-base trigger (nothing in prod).
Must honor the anti-cascade contract from the 2026-06-11 post-mortem:
- Narrow target —
build-lab-base only; never build-foundation, never any docker-stacks-* trigger.
- Per-env + explicit
--branch=staging; the SA holds run-permission on only its own env's trigger.
- Idempotent — fire-and-forget, safe at-least-once (a rebuild re-pulls
latest).
- No Pub/Sub topic and no
chain-rebuild-* trigger — those are being retired.
The first auto-rebuild is guarded by #25's fail-closed gate and observable via #24's stamping. Full spec + guardrails: #19.
Acceptance criteria
Blocked by
Parent
Map #16 · implements the Phase 1 decision locked in #19 (staging auto-rebuild).
What to build
Close the HOP-2 gap on staging: today a fresh codeq binary in
gs://qbraid-codeq-stagingtouches noqbraid-lab-base/**file, sobuild-lab-basenever fires andlab-base:latestkeeps the old binary until someone runs the trigger by hand. Make it automatic — append a final step toopencode-staging-branch, after thegsutil cp+ manifest steps succeed:Scope IAM so the staging codeq build SA can run only the staging
build-lab-basetrigger (nothing in prod).Must honor the anti-cascade contract from the 2026-06-11 post-mortem:
build-lab-baseonly; neverbuild-foundation, never anydocker-stacks-*trigger.--branch=staging; the SA holds run-permission on only its own env's trigger.latest).chain-rebuild-*trigger — those are being retired.The first auto-rebuild is guarded by #25's fail-closed gate and observable via #24's stamping. Full spec + guardrails: #19.
Acceptance criteria
stagingauto-firesbuild-lab-base --branch=stagingafter the binary uploads.lab-base:latestreports the pushed codeq SHA (verified via Execution: rollout smoke-test — in-build fail-closed SHA gate + operator verify one-liner #25 check B).build-lab-basetrigger; no prod grant, no cross-env path.chain-rebuild-*trigger is introduced; the step targets onlybuild-lab-base.CODEQ_DEPLOYMENT.md.Blocked by