Public: anyone can read this; the crew can change it.
The decider can be compared with SubQ Snap in the background, off by default, and decides nothing #17795
Merged 5h 1m ago, live in production
The owner asked to try SubQ's decision model beside Jev. This is a shadow: after a next or retry decision is recorded, the same state and questions go to subq-snap-1.2 in the background (5 s, two at once, extra ones dropped), and its answer, probabilities, time and tokens are kept in decisionshadow.
-
Reviews
Changes requested — before the latest pushChecked the question on the MCP tool:
decider_shadowisadminOnly, andvisible()insrc/http/mcp/shared.tsrefuses it to any non-admin user, so the report is not open to them. ThedryRun: falsepath needs an admin-scope token (scopeAllows(..., "admin")), and theactionenum is validated at the boundary. The gating is right in the code. Three things must change before this lands.- No test pins that gating. Nothing in the diff fails if the
adminOnlyflag or theforbiddenbranch is removed.mcp-write-scope.test.tsonly covers the write-scope floor. Add tests todecider-shadow.test.tsor the MCP suite: (a) a non-admin user getsno tool named decider_shadowfor the report, the replay and the stop; (b) an admin with a non-admin-scope token anddryRun: falsegetsforbiddenandstartReplayis never reached; (c) the same admin withdryRununset only gets the plan. ask()insrc/crew/snap.tsreads the third party's reply withresponse.json()and no byte cap. A host that streams a huge body costs memory on the forge's one process. Read the stream and stop at a fixed number of bytes (a few tens of KB is plenty for one answer), and treat an overrun as thebad_bodyerror.shadowReportruns synchronously on everyread()of the TUI Decider screen while the switch is on. It loads up to 5,000 rows, then does onerunquery per retry row, all on the event loop, so the forge could stall. Cache the report for a short time, or compute the next-check join in one query, and bound the work.
Also: the terminal door only shows the report. Starting and stopping a replay is MCP-only. Either add the plan, start and stop to the Decider screen (admin only, with the same confirm as Talk), or say in
docs/features/decider-shadow.mdthat this is deliberately MCP-only.ApprovedApproved. The changes since 813af012b meet my earlier asks. The reply is read through
replyOfand stops at 32 KB, so a longer body isbad_body, and a test covers it. The report is one query, with the next check as a subselect and a 2,000-row cap that says so when it is hit. The doors are pinned: the tool isadminOnly, so a non-admin does not see it listed and cannot call it ('no tool named decider_shadow', tested for every action). Starting or ending a replay needsdryRun: falseand an admin-scope token, so an rw token only reads and plans (tested). The docs now say why the replay is on MCP alone and the terminal shows the report. Nothing else changed. The feature is off by default, sends only public, unsealed work of the connection owner's repos, and never decides. I found no blocking issue. - No test pins that gating. Nothing in the diff fails if the
-
Checks
waiting merged; waiting for the forge to restart on it deploy 5fa2c54
-
History
- The shadow decider's doors are pinned by tests, its replies are capped, and its report is one query (#17629) d10f089
- SubQ Snap answers beside the decider, in shadow and off by default, and a replay compares them (#17629) 813af01
- A game box's command is never lost to its agent's update (#17791) c7fd7c1
- The branches page lists 30 rows a page, and a branch with a missing commit no longer empties it (#17790) 4a9e998
- Talk: choose the model where you write, in the build composer too, and it is remembered (#17789) 4b28afa
- The branch and tag menu lists the newest few, with a find box for the rest (#17784) f20ac5b
- A test of a broken ledger gives its verdict back, so no later test reads it (#17788) 15f80d7
- A preview whose build was cut off is built again, never woken on empty data (#17775) 48bec96
- Merge pull request #17777 from sold/leaf-files-1 ca3a44f
- A new repository takes one git process, not two: the reflog setting is written into its config (#17781) fb6f1c8
- Four child processes started with an empty environment also skip .env files (#17779) 789c4a8
- A snapshot's full collection is a named job, so a stall line says when it held the loop (#17780) dc59f97
- The file parts of a cloud node sit with the other shared parts (#17532) 52b64c9
- Merge remote-tracking branch 'origin/main' into sold/leaf-files-1 6cd2d57
- Merge pull request #17778 from sold/held-worlds 8d747cf
- Games: one list of what a player's game needs, with what those mods require (#17738) 89f7c82
- Merge pull request #17768 from sold/log-reader 5e9e073
- Merge remote-tracking branch 'origin/main' into sold/leaf-files-1 e7fd67f
- A test file that sets the pinned `net` gives it back, and pinned-ceiling starts clean (#17776) 1540995
- Merge pull request #17774 from sold/leaf-editor-9 eaeb462
For the reviewer: in 813af012b the MCP tool decider_shadow is no longer marked admin-scope. The author says it is still for a forge admin only, and that starting or stopping a replay takes dryRun: false plus an admin token, or the person's yes in Talk. Please check exactly that: a report read is not open to a non-admin, and no non-admin token can start a replay or spend the key.
The owner asked to try SubQ's decision model beside Jev. This is a shadow: after a
nextorretrydecision is recorded, the same state and questions go to subq-snap-1.2 in the background (5 s, two at once, extra ones dropped), and its answer, probabilities, time and tokens are kept indecision_shadow. Nothing reads that to decide, and a failure in it cannot reach the decision.Off by default: the limit
decider.shadow_per_dayis 0. The text of that limit says a check log's last lines go to a second company. Only public, unsealed work owned by the creator of the saved "subq" connection is sent, the key is opened for each call, and a refused key or spent credit stops it until the limit is saved again.decider_shadow(MCP, admin) replays up to 500 past decisions after saying the cost, and reports. Rows are pruned after 90 days by the existing retention job.The report says what it cannot answer: who was right on
next, and what a "stop" would have done. Not run locally: this pull's check is the first run. No call to SubQ has been made.🤖 Generated with Claude Code