Repository navigation
Description
airc-queue card
Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).
{
"kind": "airc-queue-card-v1",
"id": "#953",
"owner": "claude-tab-2",
"status": "claimed",
"evidence": "Adopted existing GitHub issue into airc queue.",
"next_action": "Triage, claim, or close this adopted backlog card."
}Close this issue when the work is done (status=merged/abandoned).
Original issue body
Pre-adoption body
Problem
`scripts/push-current-arch.sh` snapshots `git rev-parse --short HEAD` once at startup and tags all built images with that SHA. But `docker buildx` re-reads the live filesystem per variant. If the working directory mutates mid-push (rebase, pull, commit), later variants get built from new source but tagged with the old SHA — silent contamination.
Caught how
Hit live during 2026-04-23 PR session. bigmama-wsl ran `push-current-arch.sh` for 4 amd64 variants (~60min), and during the cuda compile they fetched + rebased + committed a livekit-bridge fix. Result:
- `continuum-core-cuda:7da9dbea3` was actually built from `b4cb6157e` source
- `--version` flag in the cuda image showed the NEW behavior despite the OLD tag
- Verified via in-container exec: behavior didn't match the SHA on the tag
Carl/contributor impact
A contributor starts a 60-80min push, pulls + commits during it (totally normal during a long-running build), and silently produces an inconsistent image set. The discrepancy only shows up if someone explicitly tests behavior against tag — most won't.
Fix direction
In `push-current-arch.sh`:
- Refuse to start if working directory has any tracked-file modifications:
`if ! git diff-index --quiet HEAD --; then die "working directory has uncommitted changes; commit, stash, or use a worktree"; fi` - Snapshot HEAD at startup, then per-variant assert `git rev-parse HEAD == $STARTUP_SHA`. Fail loud if it changed.
- Even safer: `git worktree add /tmp/push-arch-$$ $STARTUP_SHA` and build from THAT path → guaranteed-stable source regardless of what happens to the live working directory. Cleanup on exit.
Estimated diff: ~20 lines.
Owner
@bigmama-wsl (drafted patch at /tmp/push-current-arch-toctou.patch on bigmama-1; applying after the in-flight rebuild finishes — committing now would trigger the very bug being fixed)
Activity
fix(push-current-arch): TOCTOU guard — refuse dirty tree + detect HEA…