RFC: local coordinator boundary for large resumable pipeline runs #1050
Replies: 2 comments
|
Your RFC crystallizes a pattern we've seen across multi-agent systems: when state ownership is vague, large-scale runs fracture. The proposal to extract coordinator logic from We hit this exact split in our own pipeline when we scaled from ~10 concurrent tasks to 200+. Before the coordinator boundary:
After extracting a coordinator:
Your proposed worker contract is correct: content-processor only, no direct file mutations. This prevents workers from sneaking around the adapter boundary and keeps the coordinator's state model sound. One addition from our experience: the "structured internal envelope" you mention should include not just success/failure, but also partial progress markers. If a worker crashes mid-job, the coordinator can decide whether to resume from the partial state or re-run from scratch. The canary/failure-window pattern is also correct — we call this "stop-loss for automation". After 3 consecutive failures, our coordinator pauses and requires human review before burning through the entire queue. Re: relationship to #834 — yes, this sits above the adapter. The adapter decides how to dispatch; the coordinator decides what to dispatch and when. Clean separation of concerns. Shared from production experience running SwarmAI. Discussion: T-CBB |
|
Sorry for the slow reply, @BorisSavage: this sat in the RFC queue through a heavy release stretch, and that's on me. Now, to the proposal. The framing is right, and a lot of it has quietly become true since June without the boundary being named: So my answer to the RFC's question is yes, with one constraint that matches your own "what this is not" list: the coordinator is a local boundary above the worker adapter, it owns state and never talks to a network, and workers stay execution-bounded (single offer, isolated, no shared-file writes). That keeps #274's persistent agent in charge and keeps the whole thing inside the local-first line. What would move it from RFC to code, in order:
If you're still up for it, say so here and I'll label it |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Proposal
Let's talk about whether career-ops needs a dedicated, local coordinator boundary to handle large, resumable runs from
data/pipeline.md.I'm pitching this as an RFC discussion (following the process in Discussion #284) because we need to figure out the architecture and state-ownership first - dropping a massive implementation PR right now would be premature.
Just to get it out of the way, here is exactly what this proposal is not trying to do:
The actual question is simple: once worker dispatch is abstracted into an adapter, should shared state ownership for massive runs stay jammed inside
batch/batch-runner.sh, or do we finally extract it into a proper coordinator boundary sitting above the worker adapter?Why This Helps
The value here has nothing to do with supporting another CLI or worker backend. The value is giving large-run state an actual, responsible owner.
Right now, when massive runs inevitably blow up, they do so in boring but incredibly expensive ways: scrambled or lost report numbers, half-chewed queues, messy retries, workers mutating shared files, and zero obvious way to just "resume from here" without digging through worker logs by hand.
Upstream has already been patching around this. Things like rate-limit retries (#816), Claude session-limit pauses (#874), parallel state and report-number fixes (#30/#31, #749/#803), tracker merge locking (#940/#941), and live status watching (#922/#966) are great precedent. I'm basically asking if we should take the hint and map out a real orchestration boundary for the future.
And no, this doesn't kill the persistent human-facing agent from Discussion #274. The human and the primary agent are still calling the shots. Workers should just be execution-bounded grunts that crunch isolated single-offer jobs when a queue gets too big to manage without rock-solid local state.
Concretely, this approach gives
career-ops:The Problem
Our current pipeline and batch scripts handle everyday use just fine, but throw an overly large queue at them and the coordination cracks start showing:
data/pipeline.mdordata/applications.md.Suggested Shape
If we agree on this direction, we define a coordinator contract that sits directly on top of whatever batch worker adapter we pick.
This coordinator would:
data/pipeline.md.Under this model, workers get demoted to content-processors only:
data/pipeline.md.data/applications.md.Relationship To Existing Work
To be clear how this fits into the current landscape, this is adjacent to, but totally separate from:
pipeline.mdafter batch runs.batch-runner.sh.batch-runner.sh.tracker.mjsand the SQLite derived index.This RFC is specifically strictly about shared-state ownership for large local runs. It operates entirely on the assumption that worker dispatch will continue through the selected adapter design, rather than trying to invent a competing CLI or backend surface.
Out Of Scope
Just to make it absolutely clear, this RFC tightly bounds the local coordinator. We are explicitly not proposing changes to:
Possible First Implementation Slice
If this is the way we want to go, the first PR shouldn't even contain functional code unless a maintainer asks for it. It should just lock down the design contracts:
An actually runnable coordinator script should only drop after #834 (or its successor) is settled, and only if upstream agrees that this logic belongs outside of
batch/batch-runner.sh.All reactions