feat(cognition): bind the benchmark board to citizen eyes — BenchViewState via the ViewState pipe (#426) - #2298
Merged
Conversation
…State reaches minds via the ViewState pipe (#426) The renderable existed with a doctrine-citing comment ("a citizen standing in the run's room can perceive the run's state through the same pipe the human's screen uses") and was NEVER BOUND — supervisor bound only the Roster. Worse, binding alone would have read an empty store: the bench emitter published only into the websocket substrate, so the mind-side had no data to read. Citizens' only route to run state was the benchmark/runs command, whose implementation scrapes the progress dir — the exact acceptance-test failure BENCHMARKS-ARE-ADAPTERS-NOT-A-RUNNER.md names. The fix is the roster repair's one-definition-two-render-targets contract applied to the bench outlier: - ipc::global_bench_substrate() — the ONE mind-side handle. The bench board is a single global fold (unlike the per-room roster), so its handle is one substrate, not PerRoomSubstrates. - spawn_bench_emitter dual-publishes the SAME builder.session(view) revision into the websocket substrate (human eyes) and the global bench substrate (citizen minds) — a screen and a mind can never disagree about the board. - PersonaCognition gains bench_source + set_bench_source (same capture-sink decoration as roster/doctrine — deliveries recorded + replayable), pushed through THE budgeter in compose_for_turn; budget rides the generic floor_tokens arm (the renderable's own 18-token floor), no new constants. - supervisor binds ViewStateRagSource::<BenchViewState> at persona boot. // what this catches (new test): a bound bench source delivers REAL run rows through the same compose path as every other source — if the push or setter regresses, minds go blind to the board again and only this fails. Found by the 2026-08-14 citizenship audit (AXIS 1c). Siblings tracked: #425 (retire the detached-runner auto-dispatch, Joel's timing call), #427 (L1 fork capture contamination), #428 (doc/dead-wire hygiene). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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
The citizenship audit (2026-08-14, AXIS 1c) found
BenchViewState'sRagRenderableimpl carried a doctrine-citing comment promising citizens could perceive run state "through the same pipe the human's screen uses" — and was never bound. Worse, binding alone would have read an empty store: the bench emitter published only into the websocket substrate. Citizens' only route to run state wasbenchmark/runs, a progress-dir scrape — the exact acceptance-test failureBENCHMARKS-ARE-ADAPTERS-NOT-A-RUNNER.mdnames.How
The roster repair's one-definition-two-render-targets contract, applied to the bench outlier:
ipc::global_bench_substrate()— the ONE mind-side handle (a single substrate, notPerRoomSubstrates, because the bench board is one global fold unlike the per-room roster).spawn_bench_emitterdual-publishes the samebuilder.session(view)revision into the websocket substrate (human eyes) and the global bench substrate (citizen minds) — a screen and a mind can never disagree about the board.PersonaCognitiongainsbench_source+set_bench_source(same capture-sink decoration as roster/doctrine — deliveries recorded + replayable), pushed through THE budgeter incompose_for_turn. Budget rides the genericfloor_tokensarm (the renderable's own 18-token floor) — no new constants, de-hardcode guard untouched.supervisorbindsViewStateRagSource::<BenchViewState>at persona boot, right after the roster.Test
New
compose_for_turn_delivers_the_benchmark_board(// what this catches:the #426 wiring itself): a bound bench source delivers REAL run rows (run-7,sympy__sympy-24152) through the same compose path as every other source — if the push or setter regresses, minds go blind to the board again and only this fails. 16/16 targeted tests green (unified::tests,viewstate_rag,positron_bench_source);cargo check --features metal,accelerateclean.Siblings (tracked, not in this PR)
agent:solve:complete, staleservice_loopcomment, pipeline doc's 6 dead verbs)🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo