Repository navigation
Reserve prepared continuations on completed children (T33) - #182
Merged
Merged
Conversation
erickb336
marked this pull request as ready for review
October 13, 2026 15:36
This was referenced Oct 13, 2026
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.
Closes #181
Sage task T33
A completed child can now take a separately prepared run without reusing its old completion receipt. Core saves an immutable run target, reserves capacity again, and binds the new assignment to the same child in a new turn. An old stop cannot release the new reservation.
A continuation requires the same project, session, owner epoch, task and role, plus a completed predecessor, new run and saved task-message hash. Concurrent requests cannot fork its history. A resumed lead retains its own team, while every slot and child limit still applies. Initial-spawn failure evidence cannot release a continuation.
prepareAdmissionaccepts named options forrunTargetandcontinuation; existing initial calls remain valid. Core checks the snapshot, but the adapter must verify current logbook truth and native dispatch/delivery before granting permission. This PR does not wire native follow-up dispatch or change Claude hooks or the shared state tool.Sources: core admission, run-target parsing, ownership policy, exports and documentation. Both generated provider bundles come from the build. This is a component of #88 and #138.
Validation on
f5743a5f67405f2c5e6842aa8af2a5b6a90cc16a:npm run build: built 280 files.npm run check: all checks pass.node --test --test-name-pattern='prepared run target|continuation' scripts/providers.test.mjs: 10 tests, 10 pass, 0 fail.npm test: 1,133 tests, 1,133 pass, 0 fail, 0 skipped.f5743a5f67405f2c5e6842aa8af2a5b6a90cc16a.Baseline proof: copied only the new provider tests into a detached worktree at main
28b5c3c. The same focused command reports 10 tests, 0 pass, 10 fail. Two target tests and the options test fail because main ignores these fields. Seven continuation tests fail because the new APIs are absent. These API failures do not establish behavior of an older implementation.Not verified: native follow-up wiring on main, real-model behavior, installed automatic Sage, or complete policy composition. Existing initial dispatch behavior remains covered by the full suite. The broader integration has native continuation evidence, but it includes prerequisites outside this PR. Installed automatic Sage remains disabled.
Every test uses fake ps, pgrep and kill first on PATH. Concurrent test workers close before the test returns. No attack strings run in a real shell. All local test workers have finished. Exact-head CI passed.