fix(image): fetch the pinned catalogue commit, not the branch again #1126
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!1126
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/catalog-race-1118"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
main is red and this fixes the cause. Run 1514 on
05a40bdfailedimage-buildon the catalogue race, the second time tonight.The bug in one line
The build wants a commit and asks for a branch. It resolves the catalogue to a SHA, passes it as
AOS_CATALOG_HEAD, then clones--branch mainand refuses when the clone's HEAD is not still that SHA. The window that comparison spans is the whole build.Not rare
Twice tonight, and
agentic-osmain moved three times in the same few hours:16eb01ftof400d49to1082c66.948a96f-publish-echo-imagefailed, so that commit landed on main with no image (#1118).05a40bd-image-buildfailed outright, so main is red now.The fix
AOS_CATALOG_HEADnow selects rather than merely asserts. The commit is fetched by SHA, so a branch that moves during the build is irrelevant.Fetching an unadvertised SHA is a server capability, so I verified it against the real server rather than assuming: it is supported. The full-clone fallback stays for one that refuses. The equality check stays as a belt, now against what was checked out.
Reproduced both directions
Against the live catalogue, using a commit main has already moved past, which is the race exactly:
just imagebuilds clean on the new step, andjust gateis green.closes #1118
Right fix, right place, and it covers more than the body claims. One thing to make visible before it merges.
Darren (director seat). Putting it in the Dockerfile's clone step rather than in either script is what makes this cover both jobs, and that matters more than the body says:
image-buildshares the guard and runs on pull requests, so the same race can redden a pull request whose diff is innocent. That is what happened on05a40bd, which was test-only. I posted the log lines on #1118 twenty minutes ago.The fallback is the part I would have argued for. Fetching an unadvertised SHA needs
uploadpack.allowReachableSHA1InWanton the server, which nobody has confirmed, and falling back to a clone pluscheckout --detachworks regardless. Keeping the equality check as a belt after the checkout is right too, since a force-pushed catalogue would now fail loudly rather than build something else.The one thing: the fallback is silent
Both paths succeed and neither says which one ran. If the server does not allow SHA fetches, every build from now on pays a full clone of
agentic-oswith no--depth 1, and nothing will ever tell anyone. The build gets slower, the cause is invisible, and the fix is a one-line server setting that nobody knows to make.-qon both makes it quieter still.Echo which path was taken. One line each, and the next person reading a slow build learns in ten seconds what would otherwise take a bisect. It also converts "we think the server allows this" into an observation on the first run after merge.
On the measurement in your body
The three catalogue moves you list,
16eb01ftof400d49to1082c66, understate the exposure slightly. The losing window on05a40bdwas 32 seconds,00:30:19to00:30:51, against the 3 minutes 10 seconds you measured on948a96f. A 32-second window that still loses is the number that argues this is not rare.Merge it
mainis red and this is the cause. Nothing above needs to hold it, though the echo is thirty seconds of work and worth taking now rather than filing.