docs(spec): one loop, seven lanes — a design path for single-place turn-loop assembly - #3273
Merged
Merged
Conversation
…rn-loop assembly There is exactly one turn loop (driver/drive.rs:111). What is duplicated is lane assembly: twelve optional capability slots bound through three unrelated vocabularies at seven production sites, with nothing checking the matrix. #3232 and #3233 are two cells of that table, found one at a time. Proposes TurnLane, TurnCapabilities (no Default, so a new capability is a compile error at every lane), a stella-parity-shaped lane matrix, and a ResumeAuthority split that unblocks both issues. Refs #3232 Refs #3233
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Reviewer's GuideDocumentation-only PR that adds a detailed design/specification for centralizing turn-loop capability assembly into a single, typed matrix across seven "lanes", plus wires it into the docs manifest. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
macanderson
marked this pull request as ready for review
August 14, 2026 18:34
Contributor
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
macanderson
commented
Aug 14, 2026
macanderson
commented
Aug 14, 2026
macanderson
commented
Aug 14, 2026
Answers the three review comments on #3273. - Move 1's TurnLane becomes open from the first commit: BuiltinLane stays closed so the compile-error property survives, TurnLane::Plugin(LaneId) carries a manifest-contributed row. Closing the enum is the one decision here that is expensive to retrofit. - New §9 specifies plugin-owned lanes: two totality regimes (compile-time for builtin, load-time for manifest), the participation ladder as a derived projection of the capability vector rather than a second vocabulary, the requested-vs-granted split that #2716 has to supply, and the two constraints plugin lanes impose on Move 2 now — TurnCapabilities must admit owned slots, and a blocking plugin cannot live on the sync HookBus. - New §10 answers now/later/never for the pipeline extraction, correcting the premise: stella-core already has no pipeline or verification code. The coupling is stella-cli (169 refs across 41 files); stella-runtime's dependency is declared and referenced nowhere, so it is a free deletion. - §6 marked accepted; §7 points at §10; §8 gains PRs 6-8. Refs #3246 Refs #3243
Two sessions wrote a plugin-lanes section against this branch concurrently and 67a2600 captured both, leaving two §9s and two §10s with §8's closing sentence spliced into the tail of the first §10. - Delete the duplicate §9/§10 pair, keeping the one that verifies its claims against the tree (bus.rs:190, driver.rs:480-484, stella-core's dependency list, #2716's zero hits, the 169/41 coupling count). - Re-attach §8's closing sentence where it belongs. - Retitle §6 to match its body, which already records the approval. - New §9.7 carries forward the two mechanics #2456 settled: builtin-first resolution with a load-time rejection for a manifest naming a builtin lane, and a nested [lanes.custom.<id>] table rather than #[serde(flatten)], which the settings overlay silently skips. Refs #3246 Refs #2456
This was referenced Aug 14, 2026
The authority vocabulary plugin lanes depend on was reopened on 2026-08-14 as the plugin authority plane. §9.4 still described it as closed NOT_PLANNED, which is the kind of stale claim this repo treats as a defect. The zero-hit evidence is unchanged and still cited. Refs #2716
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.
What
A design proposal, not an implementation:
docs/spec/turn-lane-assembly.md.Why
The premise that prompted it — "Stella should only have 1 loop" — turns out to be already true, and that inverts the diagnosis.
crates/stella-core/src/driver/drive.rs:111is the onlyloop {overEngine::run_stepin the workspace; a sweep forrun_step(outsidedriver/returns one hit and it is a doc comment. Fleet does not have its own loop. It has the loop, assembled differently.What is duplicated is lane assembly: twelve optional capability slots, bound through three unrelated vocabularies (
EngineConfigfields,Engine::with_*builders,TurnControlspublished to the registry), decided by hand at seven production sites, with nothing checking the matrix.Consequences already paid for:
#3232(fleet has no step-level durability) and#3233(sub-sessions have none) are two cells of one table, found months apart, each by tripping over it.#3242is a third cell found as damage — a sub-session inheriting the lead's sink and destroying its resume point.stella-core/src/subagent.rs:61documents a structural hole in its own module doc:Engine::with_sleepercannot carrygate/steering/hooks, so a fork drops three capabilities by signature rather than by decision.The doc reconstructs the current lane × capability matrix by reading all seven sites. That table did not exist before; building it required tracing
bind_sessioncallers × threeengine_config_for*variants × sevenwith_sleepersites. That difficulty is the finding.The proposal
Four moves, each independently shippable, all reusing instruments this repo already proved (invariant #8's provider parity matrix, invariant #10's consumer ledger):
TurnLaneinstella-protocol— name the seven lanes so a matrix can have rows.TurnCapabilitiesinstella-core— collapse three vocabularies into one struct with noDefault, so adding a capability is a compile error at every lane. This is the whole design: make forgetting a lane a build error.stella-parity, enforced from both sides, with#3232/#3233asDeferredrows.stella-runtime, which already owns the assembly bottom half.§6 raises the one question that needs a human decision — a
ResumeAuthoritysplit (Own/Parent/Redispatch) that would unblock#3232and#3233by observing that non-primary lanes need a terminal frame, not a per-step resume point. That is much cheaper than the write side an earlier fix declined, and it has a reader by construction.Witness
None — this is a documentation-only PR. Per CONTRIBUTING's carve-out, docs changes need no witness. Move 2 in the proposal names a real witness that fails on
mainfor a structural reason (a fork carryinggate/steering/hooks), but no code ships here.Gate
make guards-fastpasses (exit 0), includingcheck-doc-links,check-invariants,check-file-sizeandcheck-brand-case.docs/manifest.jsonrefreshed viamake doc-links-fix.Refs #3232
Refs #3233
Refs #3242
Summary by Sourcery
Add a new design-spec document describing a unified assembly model for turn-loop capabilities across multiple execution lanes and register it in the docs manifest.
Documentation:
turn-lane-assemblyspec documenting the current turn-loop lane/capability matrix and proposing a single-place assembly design.docs/manifest.jsonto include the new turn-lane-assembly specification entry.Review round 2 — §9 and §10 added
Answering the three inline comments.
§6
ResumeAuthorityis accepted and PR 5 in §8 is now scheduled rather than open.§9 — plugin-owned lanes. The requirement that plugins contribute their own lane is compatible with this design, but it forces one decision now:
TurnLaneis open from the first commit (Builtin(BuiltinLane)closed so the compile-error property survives,Plugin(LaneId)open so a manifest can contribute a row). Retrofitting that after seven lanes and a parity matrix are written against a closed enum is a rewrite. §9 also states the thing a plugin lane genuinely breaks — compile-time totality is only available in-tree — and replaces it with load-time validation plus astella plugins doctorreport, rather than pretending the two guarantees are equal. Plus:participationis derived from the capability vector rather than separately authored;granted = requested ∩ authorized, with #2716 as the missing half; and two constraints that bite Move 2 now (TurnCapabilitiesmust admit owned slots, and a blocking plugin cannot live on the syncHookBus).§10 — now, later, or never. Seam now, extraction later, merge never. With one correction to the premise: the pipeline has already left
stella-core— that crate declares nostella-pipelinedependency and holds no witness/ladder/flip-oracle code. The coupling isstella-cli(169 references across 41 files),stella-serve(4 files), andstella-runtime(declared, referenced nowhere — filed as #3280).stella-serveis the existence proof that makes the plugin half feasible: its engine holds no ambient authority and remotes every model and tool call to a host, so a plugin-driven lane is that seam pointed the other way.Note for reviewers: two sessions wrote a plugin-lanes section against this branch concurrently, and
67a260016captured both — two §9s and two §10s.55495aa68deletes the duplicate pair, re-attaches §8's closing sentence, and grafts forward the two mechanics #2456 had already settled (builtin-first resolution; nested[lanes.custom.<id>], never#[serde(flatten)]). No test was deleted; this is a docs-only PR.Refs #3246
Refs #2716
Refs #2456
Refs #3280