Repository navigation
Description
Part of #4426. Found in the second independent review of PR #4490, which fixes #4486 and #4487. Line numbers refer to that PR's head 84af09212.
Context
The hosted brain_read_base MCP bridge checks the principal's authority and then reads live Markdown directly (readBrainBase, packages/ui-server/src/ws/bridge-capabilities/application.ts:47-50). The autonomous bridge does the same. A turn admitted while the private-state alias check passed keeps getting fresh note content after a later check fails or finds an exposure. main behaves the same way. The rulings on #4487 gate admission, not turns that are already running.
Scope
Ruled (maintainer, 2026-11-23): option 1. Each host-side live brain read for a running turn checks the latest completed isolation verdict, with no new scan per read. This covers the hosted brain_read_base bridge and the autonomous bridge. A confirmed exposure (private_state_in_brain, database_in_brain) refuses the read immediately. private_state_unverified refuses the read with its named cause. The next verified check restores reads without a restart.
Out of scope
- Re-running the alias check per read (option 2, ruled out).
- Changing admission, which the ui-server: the boot alias check fails when the journal scrub quarantines an object mid-walk #4487 rulings own.
Acceptance criteria
- A shared verdict holder records the latest completed status or admission check, and both bridges read it before every live read.
- A failing-first test flips the verdict mid-turn, for both the hosted and the autonomous bridge: the next live read is refused with the named cause for each of the three reasons, and a later verified check restores reads.
- No alias scan runs on the read path (asserted by a test that counts scans).
- The PR answers the proportionate-containment checklist.
Decision record
Ruled 2026-11-23: option 1, as recommended.
Question: when a later alias check stops verifying (private_state_unverified) or finds an exposure (private_state_in_brain, database_in_brain) while a turn is running, does that turn lose host-side live brain reads?
Pointers at main 356fa7d76: readBrainBase: in packages/ui-server/src/ws/bridge-capabilities/application.ts:47-50 and bridge.readBrainBase in packages/ui-server/src/inbox/autonomous-turn.ts:348-352. Both check principal authority only. The verdict comes from operationalStateRefusal (packages/ui-server/src/brain/operational-state.ts:141); private_state_unverified and its admission check arrive with PR #4490 (#4487).
Options:
- Gate each host-side live read on the latest completed verdict. No new scan per read: the read checks the result of the last status or admission check. Consequence: a running turn stops getting fresh note content once any later check fails, so an unknown never stays clean for that turn. Needs a shared, current verdict that the PR deliberately does not cache today, and a turn can fail mid-run.
- Re-run the alias check on each live read. Consequence: the most current answer, but it adds a full alias scan to every bridge read on the turn's path, against the host-overhead work (Epic: a hosted turn's host overhead is measured span by span and cut to what its guarantees need #4278).
- Don't revoke running turns. Record in
docs/decisions/proportionate-containment.md(or the operational-state decision) that a verdict change applies from the next admission, with the turn's hard timeout as the bound. Consequence: no code change beyond a test that pins the behaviour, but a running turn keeps reading during an exposure.
Recommendation (not a ruling): option 1, with a confirmed exposure refusing immediately and private_state_unverified refusing the read with its named cause. It restricts the narrowest uncertain thing (the next read) and recovers on the next verified check, as the containment rule asks.
Completion evidence: a dated maintainer ruling on this issue; then fold it into the acceptance criteria and remove needs: decision.
Verification
A failing-first test in packages/ui-server/tests/ that flips the verdict mid-turn for both the hosted and the autonomous bridge, plus a mutation receipt; bun run check:pr --base origin/main; recorded independent review (core package).
Contract impact
A refused read may surface a new refusal reason to the bridge tool; if so, update docs/integration-contract.md and prefix CONTRACT:.
Blocked by #4487
2026-11-23 triage at main 356fa7d: citations hold on main (readBrainBase, autonomous bridge); the scope asks for a ruling, so the question and options are written out and needs: decision added; blocked on #4487, which introduces private_state_unverified; type: bug replaced by type: fix.
2026-11-23: recorded the maintainer ruling (option 1) in Scope and the acceptance criteria. needs: decision is removed.
Activity
schlessera commentedon Nov 23, 2026
Decision (maintainer, 2026-11-23): option 1. Gate each host-side live read on the latest completed verdict. An exposure refuses the read immediately, and unverified refuses it with its named cause. The body now carries the ruling.
schlessera commentedon Nov 23, 2026
Unblocked: #4487 is closed, so
scripts/sync-project.tsis removing theblockedlabel.