#1096's pin axis fires exactly as often as the commit-count axis it replaced: the publish rail mints a new agent version on the same path-touch, so a render-only commit still costs the drive a ~60-minute rebuild #1100
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up to #1096 (landed
764b9351). The mechanism is right and the code works — but the key it compares moves on the same trigger as the axis it replaced, so the saving is ~zero. Measured on the live host tonight, not reasoned from the diff.The premise that does not hold
#1096's reasoning: "build.sh bakes the newest PUBLISHED registry agent … and CI publishes only when the agent artifact actually CHANGED (ADR 0185). So the true 'did the baked agent move' key is the RESOLVED PIN."
The publish rail does not gate on the artifact changing.
scripts/bootstrap-reseed/publish.sh:64-67:That is
OC_BOOTSTRAP_AGENT_PATHS— the sameagent/ go.mod go.sum internal/set the old commit-count axis used. It then builds, computessha256sum, and publishes a version keyed on the git sha:The checksum is recorded and uploaded, never compared with the previous version. So every
internal/-touching commit mints a new registry version, the resolved pin moves, and the pin axis returns STALE exactly when the commit-count axis would have.Measured on elitebook-03, 05:20Z
Five consecutive
internal/-touching commits, five published versions, pins differ, verdict STALE → the drive is paying a rebuild right now (gateway-image: rebuilding the snapshot … (~60 min, pre-legs — measured, #1096)).The counterexample is #1096's own example.
9d414e84is in that published list. It is #1095's fix: a change to an ownership argument and comments ininternal/clan/files_idp_gateway.go— a Nix-string render change, precisely the class #1096's commit message named as "a control-panel render or a Nix-string edit — which CANNOT alter the baked agent binary". It published, moved the pin, and cost a rebuild.(Whether it truly cannot alter the binary is a second question —
internal/is linked into the agent, so a changed string literal does change the bytes. Either way the pin moves, so the axis cannot discriminate.)The only case #1096 currently saves is the ~10-minute window where the publish cron has not yet run, so the pins happen to match. That is luck, not a gate.
What plugging it needs
The registry already holds the discriminator:
publish.shuploadsagent-$arch.sha256beside each version. Resolve the pin to that checksum, not the version tag — two versions whose binaries are byte-identical then compare equal and leave a warm snapshot warm, while a genuine agent change still rebuilds. One extra registry GET per side, on the slow path only (behind>0); thebehind==0fast path and the unknowable-marker fallback (keep the commit-count verdict) both stay exactly as #1096 built them.Optionally also make the pin itself content-addressed by having
publish.shskip minting when the freshly built binary's sha256 equals the newest published one — but that changes pin semantics the reseed rail also consumes, so the staleness-side checksum comparison is the smaller, safer door.Acceptance: two commits that touch
internal/but build a byte-identical agent leave the snapshot FRESH (no rebuild, drive fires immediately); a commit that changes the agent binary still rebuilds; an unreadable checksum keeps today's verdict. Offline-provable with a stubbed registry, the waygateway-image-staleness-test.shalready stubs.Filed by the watching session from the #854 arc (ADR 0174) — evidence gathered live, no code change from me. Not blocking #854; it is wall-clock and DO spend, and it is the same class as #740 (a filter that never matched) and #871 (a gate that could not fail): the fix is present, runs, and reports success while changing nothing.
swarm-claim host=matou-dev-server-01 run=15635
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1100 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
Measured against the live registry after
221ab57alanded — the checksum axis does not fire either. The implementation is correct; the premise underneath both #1096 and #1100 is what is false, and it is worth stopping here rather than trying a third key.The measurement
The published
agent-x86_64.sha256for the five most recent versions (the same five in #1100's evidence):8277dc0ac6cb7bbd2ceb9f7bf335c211f851b63b38513c4c3f3d5742c4f545cc78cd8fe99d414e84fd016a20ad7aab48f5307fc810200b5cbad59ef73f037d9e1e64de2836a858eebea1b3e4f3c98991cf5e117ff664040a516eFive for five distinct. Including
0b5cbad5→9d414e84, which is the #1095 fix: an ownership argument and comments ininternal/clan/files_idp_gateway.go. The binary changed.Why — the premise both tickets share is wrong
internal/is linked into the agent, and the Nix module text is Go string literals inside it (renderFilesOIDCSecretGeneratorand friends build the config withb.WriteString(...)). A "render-only" edit is a changed string literal in a compiled package, sogo buildlegitimately produces different bytes. There is no key — version tag, content checksum, or otherwise — that can call these two agents the same, because they genuinely are not.So my own prescription in #1100 was wrong, and I should have tested it before prescribing: I flagged the doubt parenthetically and filed anyway. The parenthesis was the important part.
Where that leaves the ~60 minutes
The gate is now correct and honest: the baked agent really does move on nearly every
internal/commit, so the snapshot really is stale by its own definition, and the rebuild really is required given that definition. The cost is not a gate bug — it is the snapshot contract: the gateway image bakes a specific agent build, so the image's freshness is chained to the whole product's commit rate.That makes the remaining question a design one, above ADR 0174's two-way-door line, so I am not ruling it:
1355 store paths, samenixos-system-…-kexecpath) on every run tonight. A warm build host, or reusing the previous snapshot as the build base, is a much larger saving than any staleness-key change.Both are worth measuring before either is built. #1096 and #1100 should be considered closed-but-ineffective rather than reverted — the code is strictly better (honest verdicts, the corrected
~60 minstring, real fallbacks) and it is the right foundation for A, which needs the same probe machinery.I would suggest re-labelling this
needs-designand putting the A-vs-B choice to Ben rather than having a worker pick. Session evidence only; no code change from me.