Repository navigation
F: share one read-only container runner between Ask and planning (#117, part 1) - #118
Merged
Merged
Conversation
… part 1) askInContainer and createPlanningProvider were near copies. Extract runReadOnlyAgent in runner/question-container.ts; each feature passes a ReadOnlyFeature with its phase, host root and removal, storage limits, credential rule, size check, output and cleanup wording. Ask's messages and cleanup error are unchanged (ASK_FEATURE); planning keeps its own (PLANNING_FEATURE). removePlanningRoot now names the root in its own error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Test planning's root-removal failure end to end, its too-large refusal, budget timeout and single image build. - Pin Ask's exact timeout and cleanup messages, and that a failed question's cleanup failure reports only Ask's cleanup error. - Share the storage-size comparison (exceedsStorage); name the root in planning's guard error; restore askInContainer's doc comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 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.
Part 1 of #117. Ask and the planning provider ran the same lane D lifecycle from two near copies. This change gives them one runner.
Change
runReadOnlyAgent(feature, run, deps, signal, image, retained)inrunner/question-container.tsruns one read-only agent. It refuses a missing credential, releases leftovers, builds the image, stages the input, checks the size, then clones, allocates, captures and starts the agent. It settles before release, and cleans up on every path.ReadOnlyFeaturesupplies what differs between features: phase, root prefix and removal, storage limits, credential rule, size check, setup timeout message, output check, and cleanup error.ASK_FEATUREkeeps Ask's wording and its cleanup error exactly.askInContaineris now a wrapper.PLANNING_FEATUREkeeps planning's wording. A failed request keeps its own error first, followed by the cleanup failure (from E4: planning acceptance fixtures and recorded Claude output #45).Behavior
There is no intended change for Ask. Its suites pass unchanged:
question-agent,question-leftoversandquestions, 93 tests. The planning suites also pass unchanged: 78 tests.Validation
npm run typecheck: passed.npm testcommand: 1365 passed in one run. The 26 failures were 25 timeouts and one timing assertion, at a machine load average of about 115. All 8 affected files then passed when run alone: 321 tests. On the base commit under the same load, the same Ask timeout also failed.git diff --check: passed.Independent review
A fresh subagent compared the old and new Ask and planning paths line by line. It found no observable change to Ask, and planning matches the old provider. It also confirmed that module initialization is safe and there is no import cycle.
Its test gaps are fixed in
870eed3:Also fixed:
exceedsStoragesize check replaces two copies.Tests at that head: 69 in the Ask and planning-provider suites, plus 107 in the other planning and Ask suites.
Part 2 (worker, timeout, inputs, wiring) follows in a separate PR.
🤖 Generated with Claude Code