Skip to content

Execution: enable staging auto-rebuild (codeq push → build-lab-base, scoped IAM) #28

Description

@Kenny-Heitritter

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 targetbuild-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

  • A push to opencode staging auto-fires build-lab-base --branch=staging after the binary uploads.
  • The resulting lab-base:latest reports the pushed codeq SHA (verified via Execution: rollout smoke-test — in-build fail-closed SHA gate + operator verify one-liner #25 check B).
  • IAM grants the staging codeq SA run-permission on only the staging build-lab-base trigger; no prod grant, no cross-env path.
  • No Pub/Sub topic or chain-rebuild-* trigger is introduced; the step targets only build-lab-base.
  • The staging auto-rebuild mechanism is documented in CODEQ_DEPLOYMENT.md.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentTicket is scoped and ready for an agent to grab and implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions