Part of #16
Question
What are the viable mechanisms to make a new codeq binary in gs://qbraid-codeq[-staging]/latest/linux-x64/codeq automatically trigger a lab-base image rebuild (closing HOP 2 / staleness layer 1), and what are their trade-offs? Produce a comparison an operator can decide from.
Cover at least:
- Pub/Sub chain: codeq build publishes on success → a Cloud Build trigger on
build-lab-base[-prod] subscribed to the topic. How to scope it so it CANNOT repeat the 2026-06-11 cascade (qbraid-Dstacks CLAUDE.md §5): correct source repo/ref, env isolation (staging topic ≠ prod topic), idempotency.
- GCS bucket notification / Eventarc on the
latest/linux-x64/codeq object → Cloud Function → gcloud builds triggers run build-lab-base[-prod].
- Manual release checklist (status quo hardened): the documented
builds triggers run step as the deliberate gate.
- Version/observability angle: whether to stamp git SHA / build number into the binary version +
manifest.json so "did it roll out?" is answerable without shelling into a pod.
For each: blast radius, staging/prod isolation, failure mode (does a bad codeq build become :latest lab image?), Terraform surface, and how it interacts with the Trivy gate (ADR Q5).
AFK. Output: a comparison doc (linked) with a recommended default + guardrails. Feeds the layer-1 decision.
Part of #16
Question
What are the viable mechanisms to make a new codeq binary in
gs://qbraid-codeq[-staging]/latest/linux-x64/codeqautomatically trigger alab-baseimage rebuild (closing HOP 2 / staleness layer 1), and what are their trade-offs? Produce a comparison an operator can decide from.Cover at least:
build-lab-base[-prod]subscribed to the topic. How to scope it so it CANNOT repeat the 2026-06-11 cascade (qbraid-DstacksCLAUDE.md §5): correct source repo/ref, env isolation (staging topic ≠ prod topic), idempotency.latest/linux-x64/codeqobject → Cloud Function →gcloud builds triggers run build-lab-base[-prod].builds triggers runstep as the deliberate gate.manifest.jsonso "did it roll out?" is answerable without shelling into a pod.For each: blast radius, staging/prod isolation, failure mode (does a bad codeq build become
:latestlab image?), Terraform surface, and how it interacts with the Trivy gate (ADR Q5).AFK. Output: a comparison doc (linked) with a recommended default + guardrails. Feeds the layer-1 decision.