toolchain: priming hardening — the answered-at-the-bound window, and the toplevel-less payload cost #341
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#341
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?
Two follow-ups from the Finding N/O reviews (arc ledger 2026-08-08):
Answered-at-the-bound: pkexec is setuid-root — once the operator authenticates, the unprivileged app can no longer signal it (
EPERM),CombinedOutput's Wait blocks on pipe EOF until the ROOT copy finishes (soPrimereturns late, not at the 90s bound), and if that root copy then FAILS the timeout branch misreports it as "the elevation prompt went unanswered". Narrow window, real misreport. Hardening:cmd.WaitDelayon the elevation leg + a Detail that distinguishes "answered, then the import itself failed" — with a seam test inprime_test.go's existing style.Toplevel-less payloads keep drive 19's pathology: a release staged WITHOUT
gateway-warm.toplevelfalls back to--all, which can never detect presence (Finding O), draws the daemon refusal, and now burns the full 90s elevation window at a prompt on EVERY drive. Deliberate per the Finding O brief, butscripts/assemble-payload.sh's NOTE understates the cost — amend the NOTE to say exactly this, and have the primer's--allbranch comment name it too.Also worth carrying: prime.go's operator-facing Detail renders the bound as "1m30s" (
Duration.String()); "90 seconds" reads better in an operator line (cosmetic, ride-along only).Blocked — not an implementable slice against this repo (needs a human ruling).
This issue is framed as a hardening follow-up that amends existing code, but every artifact it names is absent from
Matou/ourcloud(checked onmainand across all history):prime.go/prime_test.go, noelevatedPrime, noPrimefunction, nocmd.WaitDelayelevation leg, and no--all/gateway-warm.toplevelpresence-detection branch anywhere in the tree (grep -rnover all*.goand all history returns nothing forelevatedPrime,gateway-warm,priming,answered-at-the-bound).scripts/assemble-payload.shhas no toplevel NOTE to amend. Its onlyNOTEline ispayload is INCOMPLETE (QEMU pending #230); the script stages agent/guest-image/QEMU only — nogateway-warm.toplevel, no--allfallback.arc ledger 2026-08-08, and commit9fcaf22(cited as the Finding M fix) isNot a valid object namein this repo.The pkexec/elevation code that does exist is
internal/toolchain/installer.go(the supervised nix install — the subject of the sibling issue #340), which is a different surface from the "primer" this issue describes.So there is nothing to harden here. This looks like it was scoped against a different fork/context, or the priming subsystem was never merged into
main(in which case a prerequisite issue that builds the primer is missing fromdepends_on).A human must decide: (a) does the priming subsystem belong in
Matou/ourcloud, and if so which prerequisite issue createsprime.gofirst — re-arm this with thatdepends_on; or (b) this issue belongs elsewhere / is obsolete — close or move it. I have not guessed. Swappingready-for-agent→ready-for-human.Approved by Ben 2026-08-08 (decision sweep) as scoped:
cmd.WaitDelayon the elevation leg + a Detail that distinguishes "answered, then the import itself failed" from an unanswered prompt (seam tests inprime_test.go's style); amendassemble-payload.sh's NOTE and the primer's--allbranch comment to state the toplevel-less cost plainly; "90 seconds" over "1m30s" rides along. →ready-for-agent.Done in
14a7bbe(on origin/main).1. Answered-at-the-bound.
runCombined(internal/toolchain/installer.go) now setscmd.WaitDelay(elevationWaitGrace, 5s), soCombinedOutput's Wait returns AT the 90s bound with whatever the setuid-root pkexec copy wrote so far, instead of blocking on the pipe until the unkillable (EPERM) root copy reaches EOF.Prime's deadline branch reads that captured output to distinguish "the elevation prompt was answered, but the import itself did not finish" (real evidence present) from "the prompt went unanswered" (nothing left behind) — closing the misreport. New seam testTestPrime_DistinguishesAnAnsweredPromptWhoseImportFailedAtTheBoundin prime_test.go's style; the existing unanswered / caller-deadline tests still pass (empty output takes the old branches).2. Toplevel-less --all cost. scripts/assemble-payload.sh's missing-toplevel NOTE and the primer's
--allbranch comment (primeCommand) now state plainly that a toplevel-less payload falls back tonix copy --all, which never detects presence (Finding O), draws the daemon refusal, and burns the full 90-second elevation prompt on EVERY drive.Ride-along: operator-facing Detail renders the bound as "90 seconds", not
Duration.String()'s "1m30s" (newhumanBoundhelper +TestHumanBound_RendersSecondsForTheOperatorLine).Toolchain package tests + go vet + golangci-lint + gofmt clean; full pre-push gate green (
internal/vmassemble-payload test passes with CI set). STATUS.md milestone log updated in the same commit.