Repository navigation
exec: v1.4 notify, simplified: no background contact after release - #396
Merged
Merged
Conversation
…very end read by today's follow After release the replica now contacts the sandbox only on real use: a callback, the session's own use of its sandbox, a bash_job call, or the next open. The periodic sweep, the per-keep generation and the rotation key set are gone. Every end a reconcile finds is read by today's follow, so the notice, its failure policy and its error notice are today's; a listed `exited` is applied as a stream's shell_exit, so today's per-job record decides whether leftovers are reported. A sandbox that cannot be listed sends its released jobs back to today's follow. Also: the job ledger lives in the transcript's fenced segment batch; a callback is answered once the list is handed over (or 503 at 20 s); exactly one Content-Length and no Transfer-Encoding; duplicate query parameters refused at the edge and the replica; the baseline notifier is pinned to one curl invocation; at most 16 callbacks wait per session. The token is keyed by the one seal secret the replica holds. Fixtures gain receiver cases for the proof, a proof overtaking keep, a released job listed exited, ended, lost or missing, an unreachable sandbox, duplicate query parameters and request framing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Revises the v1.4 "Sandbox job notify" spec (module doc of
exec_endpoint), FLEET.md's "Job-end callbacks", the v1.4 fixtures and the coverage test together. Nothing is implemented yet; this is the contract the implementation tasks are held to.The design rule now: after a job is released, the replica contacts the sandbox only on real use: a callback, the session's own use of its sandbox, a
bash_jobcall, or the next open. Nothing runs on a timer. The one accepted difference from today is stated up front: an end no callback delivers (a dead or stopped sandbox, every attempt failed) is noticed at the next real use instead of within seconds.Removed
keepplus a callback inside the window, which already proves the same URL and token.503and falls back to next use.Changed
exitedis applied as a stream'sshell_exitis, so today's per-job record decides whether leftovers are reported. That includes today's one case that does report them: a background job that abash_jobcall put back while its shell still ran.reset_for_new_sessiondrops the entries.listis handed over, or503at 20 s. At most 16 callbacks wait per session.Content-Lengthand noTransfer-Encoding. A duplicatedsession_id/tenantis refused at both the edge and the replica. Callbacks are handled only at/_beyond/agent, and every refusal has a fixed body.curlinvocation (wgetis dropped).The spec section goes from 576 to about 505 lines, with 50 requirements instead of 64.
exec_notify_vectorsnow models the proof, a proof that overtakeskeep, released jobs listed as exited, ended, lost or missing, an unreachable sandbox, duplicate query parameters and request framing. The previous test fails against the new fixtures (4 of 10), and the new one passes 10/10.🤖 Generated with Claude Code
https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk