Conversation
Add an acq-generated final startup kit on the sbx create path and wait for its per-create marker before any attach-time probes can run. If the marker is not observed, remove the unsafe sandbox so a retry cannot bypass the barrier through the existing-sandbox path. Add offline ordering and timeout regressions plus a host-side live verifier for the startup barrier. Fixes: #506 Co-authored-by: OpenCode [gpt_5_5_default_v2] <bret.mogilefsky@gsa.gov>
|
AI-assisted review (OpenCode), advisory — needs a human to confirm before it drives a change. Reviewed at head The mechanism is right, and it closes the race I reported. Docker's kit-reference is explicit that non- Three findings, none of which contradict that. Should-fix: the re-attach path is not covered, and the PR says it isThe description says the barrier "keeps retries from bypassing the barrier through the existing-sandbox reattach path." It does that only for the specific case where the barrier itself timed out — via the
Should-fix: nothing offline proves the token is compared
*"startup-complete"*) printf 'ready\n' ;;Correct for unrelated tests — they shouldn't have to know about the barrier. But it means the token comparison in the guest probe ( Cheap fix: one test with a stub that echoes Nit: the token is not unique within a second
More importantly the marker path is fixed ( Also, the probe interpolates the token into a Verified as holding
Method: static analysis at Thanks for picking this up quickly — the fix addresses the reported cause rather than the symptom, which is the part I care about most. |
Summary
Fixes an
sbxcreate-and-attach race whereacq run opencode <path>could probe or attach before non-background kit startup commands finished writing agent config.The
sbxprovision path now appends an acq-generated final startup kit, waits for its per-create completion marker aftersbx create, and refuses to keep the sandbox if the marker is not observed. This keeps retries from bypassing the barrier through the existing-sandbox reattach path.Fixes #506
Plan
sbxstartup barrier kit generated by acq at create time.Verification
Automated checks run in the sandbox:
Full offline suite note:
Secrets scan:
Adversarial review:
Host-side live verification supplied by Bret:
Rollback
Revert commit
7b0f156to remove the generated startup barrier, tests, live verifier, and docs entry. Existing sandboxes are not migrated; the change only affects futuresbx createprovisioning through acq.Security Impact
AI Attribution
AI-assisted implementation by OpenCode. Human host-side verification was supplied before PR creation.