S09: the Queen's task lifecycle, measured from the supervisor that runs (Closes #4828) - #5360
Merged
Merged
Conversation
specs/queen/dispatch.t27 states the canonical task state machine of the trios supervisor round and names lotus-policy, the AGENTS.md phases, AEL v2.0 and the PHI LOOP as adapters, held to the supervisor's TypeScript, its queend binary, a PostgreSQL run of its writers, the Zig lotus cycle and a live snapshot. task_analysis.t27 now compiles and really orders. Closes #4828 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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 #4828 (S09 of gHashTag/trinity#988, re-filed from #3571)
The decision
The family of repositories describes at least five "Queen cycles":
specs/queen/lotus.t27;lotus_cycle.zig;Only one cycle moves work: the round of the trios supervisor (gHashTag/BrowserOS
trios/agent-server,feat/queen-supervisoratc25e1b02). It is the only one that chooses, leases, reviews and releases.specs/queen/dispatch.t27(QueenDispatch,"queen-dispatch") makes that lifecycle the canonical state machine and names the other cycles as adapters, each with a phase map:Evidence: the supervisor's own code, run
tools/trinity_queen_dispatch.pykeeps five kinds of evidence apart:stateOfDispatchover 2112 inputs,composeCards(public board columns),createRoundGateunder concurrent requests.chooseover all 120 orders of five candidates, capacity at 0..5 running,reviewover a grid,retryover every sequence of failure kinds.runPgMigrationsandensureQueenColumns:recordDispatch,finishDispatchand both reapers on real rows;releaseStaleContracts;takeBackRefusedAcceptanceswith injected CI answers;afc9d384, 29/29 tests in Debug and ReleaseFast./queen/statusand/queen/public-board.runreplays the spec through the generated C on 2488 cases drawn from these records.--self-checkplants 16 faults and catches each one, including a priority sort that returns its input.Measured (each tagged with its evidence in the spec)
ceiling_releases. A stored 1 reads as 0, the row is "failed" instead of "rejected", and the issue is handed back every hour. Shown with the supervisor's own SQL.donewhatever its verdict: escalate, send-back, wait or none.recordTickis fenced, and the dispatch writer replaced a row still awaiting review.Fixed in place
specs/queen/task_analysis.t27sorted by returning its input, counted 27 workers because there are 27 letters, and did not compile in C. It now orders by its own score with tests on deliberately unsorted input (7/7 in C and Zig) and states that no runtime applies it.specs/queen/lotus.t27now carries its status as the lotus-policy design.queen.libandagent.phi-loop, thespecs/OWNERS.md(queen/) row, the README S09 section, and docs/now are updated.agent.tri-api,state.trinity-dir) are refreshed here.Not measured
GitHub itself, a real provider or bee, the Mac app's own loop, and the revision Railway actually deploys. The live snapshot (2026-10-01 02:44Z: working, 7 of 20 workers, 930 public cards) says what was served at that minute and nothing more.
Checks run locally
All pass:
trinity_queen_dispatch.py checkand--self-check, S07/S08check, parse ratchet, now-shape, documented commands, damage negatives,validate-conformance(all valid), seal verify for every touched spec, and no newdupe_scanor assertionless findings.🤖 Generated with Claude Code