Repository navigation
worker-stops-importing-the-orchestrator/2: The worker entry stops importing the dispatcher - #988
Merged
Merged
Conversation
bwmatson
marked this pull request as draft
November 17, 2026 13:36
…ops-importing-the-orchestrator/1 Unit: worker-stops-importing-the-orchestrator/2
Unit: worker-stops-importing-the-orchestrator/2
bwmatson
force-pushed
the
spec/worker-stops-importing-the-orchestrator/2
branch
from
November 17, 2026 17:36
c756596 to
3556bdb
Compare
bwmatson
marked this pull request as ready for review
November 17, 2026 17:37
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.
Start here
Already verified by the pipeline
Review tier:
light— the planned estimate is lightWhy
This pull request builds part of change worker-stops-importing-the-orchestrator; this is the change's reason.
The kit's design splits it into a core, an orchestrator and a worker package, with the rule that the worker imports only the core. Today that rule is false. A map of the kit's 342 modules (module-level imports form a clean DAG; the only cycle comes from 88 imports inside functions) shows that
abk workerimports the dispatcher modulecli/pipeline.pyand so reaches 231 modules and 82,000 lines, and the agent graph (graph/nodes.py) imports the orchestrator'spipeline/events.py. With every mo… The full reason is in
openspec/changes/worker-stops-importing-the-orchestrator/proposal.md.What this pull request does
The worker entry point no longer imports the dispatcher's command module: the run code the worker uses now sits in its own worker module, and the code that both the dispatcher and the worker call sits in a shared module.
abk workercan now be imported without loadingcli.pipelineorpipeline.admission. The import-boundary baseline drops those two crossings and adds none.worker_run, which the package-boundary scan names as part of the worker package.run_supportmodule: the unit store, thread lookup and resume, the event-handler and stack-move wiring, pause and start decisions, and the log helper. The dispatcher, the worker, the web server and the other CLI commands all import it from there.run_supportorworker_run, throughtests/worker_run_patches.py), with their assertions unchanged.Based on
main, with nothing unmerged beneath it — ready to merge whenever the checks look right.Unit
worker-stops-importing-the-orchestrator/2of change worker-stops-importing-the-orchestrator, task group(s) 2.Spec:
openspec/changes/worker-stops-importing-the-orchestrator/in the planning repo.Assumptions
This unit assumes nothing unmerged: everything it builds on is already in
main.Verification
This is a unit-test unit: everything it needs is fakes, fixtures or throwaway containers, so GitHub Actions runs the whole of it. No e2e-test run was required.
Over its tier's ceiling: 4230 changed lines against 750 (full); not split because it holds one group, 2, which cannot be split.
Left for later
Approved, with these recorded rather than blocking:
if TYPE_CHECKING: passblock, andfrom agent_build_kit import run_supportnow sits below it, apart from the other imports.("run_support", CORE)row tells us nothing.assign({module: set()}, seeds())gives CORE to any module that no seed names, so the row passes whateverrun_supportimports.How this was built
Tests were committed first and seen to fail before any implementation existed; the commit order is checked mechanically; lint, formatting and types pass at the tip.
Opened by the spec-driven pipeline. The build agent never merges. The pipeline merges only
a unit review classified
autoand policy allowed; a person merges any other, after checkingthe stack order above.