Repository navigation
Description
Outcome
Every test that claims to cover a behaviour drives the code path production runs for that behaviour. No suite passes against a component, helper or wiring that the shipped app does not use, and no test re-types production logic by hand in place of calling it.
Why now
A repository review on 2026-10-22 (main dcf5341aa) found suites that stay green whatever production does, because they exercise a sibling of the real path. These give false confidence: a regression in the shipped path cannot turn them red, which contradicts the repo's rule that "a green test is evidence only if it could have been red" (docs/process/testing.md). This epic closes those findings: #2522, #2523, #2524, #2525, #2526, #2758. The 2026-10-25 test-value audit adds #2972: a claimed Tailscale WebSocket test drives a locally invented text route instead of the production upgrade path. The related dispatch-gate test gap (#2527) lives under #51, which owns that gate.
Shared context
Patterns the review found, with examples:
-
A test-only twin of a production component (ui-react: nine test files exercise ToolCallTimeline, which production never renders #2524). Production renders
ToolCallTimelineCell(packages/ui-react/src/components/chat/message-bubble.tsx:18,467).ToolCallTimeline(packages/ui-react/src/components/chat/tool-call-timeline.tsx:44) has its own collapse state, and only tests render it: render-smoke, approval-effect, copy-control, registration-on-mount and four browser layout suites. -
Production logic formerly re-typed in a test fixture (ui-server: the governance-policy tests record policy with their own copy of createApp's INSERT #2758). The original copied INSERT finding is repaired on main. Production calls the shared procedure (
governedRecords,packages/ui-server/src/app.ts:736;recordPolicy,packages/ui-server/src/brain/governed-turn-writes.ts:20-23), and both fixture arms now obtain that same procedure (const records,packages/ui-server/tests/governance-policy.test.ts:51), including inline/no-writer execution. The callback at :59-60 invokes it rather than restating SQL. test(ui-server): test-health batch e3855-ui-server-02 #3961 reached main through merged test: land the test-health push (#3855): 35 batches across the whole suite #3979 (8ce26e65f3d6af77ebf679c4dbfdcd29172c8222), verified as an ancestor of inspected main. ui-server: the governance-policy tests record policy with their own copy of createApp's INSERT #2758's recorded production-errors mutation fails the invalid-policy notice assertion and the restored run passes; this triage inspected that receipt and current source rather than re-executing it. The former integration-only handoff is historical. -
A retired path kept alive by its test (ui-react: helpers that only tests call are shipped in src #2525).
inlineRenderedFences(packages/ui-react/src/lib/mermaid.ts:222) has been replaced in production bycontent-renderer-share.ts, buttests/mermaid-fences.test.tsstill tests the old budget path.
Supporting observation, not committed work in this epic:registerStaticRenderersis called only in tests (packages/ui-server/tests/render-routes.test.ts:70-85), while the render route consumes the registry throughstaticRendererFor(packages/ui-server/src/routes/render.ts:62).registerStaticRenderersis a public@schlessera/brain-ui-sdk/renderexport (packages/ui-sdk/src/render.ts:43), so a test registering through it may be exercising the supported host-registration path rather than a false twin. Whether in-tree production should populate that registry is a host-registration contract question that has to be stated first; it is not a finding of this epic and none of its children resolves it.
The fix pattern is the same in each case: point the test at the shipped entry (the component the app renders, the function createApp calls, the registry production populates), then delete the twin or move it out of src.
Constraints and non-goals
- Do not lower assertion strength or delete a unique assertion. Each moved assertion must still be able to fail, proven by a mutation of the production path recorded in the PR (
docs/process/testing.md, "Required proof for a PR"). - Keyless and offline as always. No test may need an API key or the network.
- Out: test speed and redundancy (Epic: tests give faster feedback with less redundant work #1849 owns those), and new coverage for untested behaviour that has no false twin.
Breakdown
One child per committed finding. Each names the production path, the test that misses it, and the mutation that proves the retargeted test can fail:
- backends: pi's sessionFactory test seam runs a second backend mode, so the package tests skip production's permission gate #2522 — pi's
sessionFactoryseam and in-process permission gate. - backends: pi keeps in-process copies of core's brain writers that production never runs #2523 — pi's in-process brain writers (also unblocks backends: the pi backend still reads the brain through core's internal entry #1398).
- ui-react: nine test files exercise ToolCallTimeline, which production never renders #2524 —
ToolCallTimeline, the test-only twin. - ui-react: helpers that only tests call are shipped in src #2525 — test-only helpers shipped in
src, includinginlineRenderedFences. - ui-server: the tested budget-settlement path is never called in production and writes fewer columns than the real one #2526 — the tested budget-settlement path.
- ui-server: the governance-policy tests record policy with their own copy of createApp's INSERT #2758 — the copied governance-policy INSERT, delivered through test(ui-server): test-health batch e3855-ui-server-02 #3961 and the merged Epic: every test file audited once by a test-health push #3855/test: land the test-health push (#3855): 35 batches across the whole suite #3979 main landing. Both fixture arms now use the production procedure; its original mutation receipt retains its execution identity.
- ui-server: replace the invented Tailscale WebSocket route with real admission proof #2972 — the locally invented Tailscale WebSocket text handler; replace it with actual createApp admission proof while retaining the cheap IP/trust matrix. Closed as completed 2026-10-31.
They are independent. Weak assertions on the correct production function belong to #2963; redundant executions and pyramid placement belong to #1849.
Definition of done
- Each child's PR records a mutation to the production path that turns the retargeted test red, and the restore that turns it green.
- No
srcexport remains whose only importers are tests and whose production counterpart is a different symbol (re-checked with the grep each child names).
Found by a repository review on 2026-10-22.
2026-10-24: gave the copied governance-policy INSERT its own child (#2758), recorded static-renderer registration as a supporting observation outside this epic's committed work, named each child's finding, and moved the source-navigation notes to the comments (already recorded there).
2026-10-24 continued triage at main dc5d3c73282c29a3f0098306d398743ee18ec791: Verified the production/test governance INSERT copies and static-renderer lookup and refreshed their moved anchors. The six committed false-twin findings retain their children; the supporting host-registration observation stays explicitly outside committed scope. No test or public renderer behavior changed.
2026-10-24 triage at main af6300478a07379178bd30221a31c0b917df2283: Refreshed moved current-source pointers by inspecting their named anchors. Historical receipts retain their source identities; scope, rulings, priorities and outstanding prerequisites are preserved. No runtime result or readiness is inferred from this navigation repair.
2026-10-24 triage at main 77f35ef1ba34e4fab7092ada5362ae799852ea24: Verified moved current-source anchors and refreshed their pointers after the reference-tool delivery. Historical failed receipts retain their source identities; scope, rulings and unresolved needs are unchanged. No runtime result or readiness is inferred.
2026-10-24 triage at main e1ab485669565554ca6cb61ce5d130303647230f: Verified the test-side copied governance INSERT anchor moved by two lines after the peer-wait coverage. Refreshed that current-source pointer only; no false-twin finding, prerequisite or proof result is changed.
2026-10-25 triage at main 827861e1fa71cd4a26b52f1ef0f96b849381acdf: Verified moved current-source anchors and refreshed navigation; historical receipts and unresolved prerequisites retain their identities. No new runtime proof is claimed.
2026-10-25 triage at main 541b8d98328a760290ac6dd4a7f065af76153408: Verified the moved current-source anchors after the off-loop writer slices and refreshed their pointers; historical failed-source receipts, scope and unresolved prerequisites remain unchanged. No new runtime qualification is claimed.
2026-10-25 triage at main c670449d3bf1b0639e50ce554d728961f4313add: Verified the moved named current-source anchors and refreshed navigation. Historical evidence keeps its source identity; scope, decisions, native membership and unresolved prerequisites are preserved.
2026-10-26: attached #2972 after source-checking the local text handler against the actual /ws authorization/upgrade path. This is a test-boundary finding, not a demonstrated production authentication bypass. The six earlier committed findings keep their original scope.
2026-10-29 source reconciliation at main a8e80eea1ec045579ee7d69d6019bce5e78afa5e: the governance INSERT is no longer inline in app.ts; production dispatches to governed-turn-writes and the writer-enabled fixture already shares it. Corrected the active finding to the still-copied no-writer arm and refreshed the timeline-cell pointer. The already-existing #2758 remains the owner; no child was added, reparented, implemented or declared complete. All seven native findings remain open, with existing p2 and no epic readiness. No production mutation or new runtime proof is claimed for this source inspection.
2026-10-29 triage at main 36074ef4c5d14bb41108a26160a8ab8bbe1d4e87: verified moved named source anchors and refreshed current navigation. Historical receipts, scope, unresolved prerequisites and native membership remain unchanged; no new runtime proof is claimed.
2026-11-02 source review at main a84d9bfbcb4e608b504aa0a9feb1144ad9a0b77e: refreshed the production governedRecords composition anchor and reverified the actual shared write procedure against the fixture’s still-copied no-writer INSERT. #2758 retains that bounded gap; no mutation or runtime repair is claimed. Preserve the native seven-finding scope and no epic readiness.
Triage 2026-11-03 (main 3d3516a02): marked #2972 delivered; the other six children remain open and independent.
2026-11-04 triage at main 53b862123d7b8e4c9d039859fabdc9fc6ad4cd36: Refreshed the active named-source navigation after inspecting the current declarations; existing decisions, historical receipts, child prerequisites and readiness remain unchanged. No new runtime qualification or implementation is claimed.
2026-11-10 triage at main 3aadc8df5: repaired the moved ToolCallTimelineCell and governedRecords anchors. #2972 is done; the six other children remain open and have no PR.
2026-11-11 triage at main 3c44ac6fc56d27675dadaf38a16254db53c39f69: Reconciled #2758’s integration-branch closure with the still-open default-branch landing #3979. Inspected main still has the copied fallback; the five remaining open native tasks are independent.
2026-11-14 triage at main faa480e8c864d547cd8b4eb75965b7d609284770: Refreshed verified current-source pointers; historical receipts, decisions and remaining qualification requirements retain their identities.
2026-11-15 triage at main 3f8ff29341fbe25665cea42659f92e6f3d3ccef0: Replaced the false still-copied/on-integration-only claim with verified #3979 ancestry, the actual shared fixture procedure and #2758's recorded mutation. Other children and the full epic outcome remain open.
2026-11-16 triage at main 3b104890f8: Verified and repaired the moved governedRecords call. Remaining production-path work and epic readiness are unchanged.
2026-11-17 triage at main 9e7429a914a8aaf5967f074fa9e09984968fc9dc: Refreshed the moved current-source anchor after inspecting its declaration. Existing findings, native outcomes and verification requirements remain unchanged.
2026-11-20 triage — Verified the production procedure caller on main 63bb400b3 and refreshed its source pointer.
Activity
chore(ci): map the four review epics to their project tracks (#2543)
schlessera commentedon Oct 22, 2026
2026-10-22 triage at
2ba99c607dec41f95be5901fc8f309611806ceb5: verified the actual inline turn-governance INSERT and corrected moved active source anchors after #2464. Preserve historical receipt attribution, scope, readiness and outstanding prerequisites; source navigation is not new runtime proof or activation.schlessera commentedon Oct 22, 2026
2026-10-22 source navigation at main
aeaaf7794b6be41fde4e01bef78ce3f1a5828ac6: verified and refreshed the moved active app-construction citation(s) after #2397. Historical source-bound receipts, scope, decisions and prerequisites are unchanged; no new runtime, activation or epic-completion evidence is claimed.schlessera commentedon Oct 23, 2026
2026-10-23 source navigation at main
f3c6fdc9f9c6321fda5a384cf8cfd8bf2e4846da: verified and refreshed moved active app-construction anchors after reference-source composition. Historical source-bound receipts, scope, decisions and prerequisites remain unchanged; no new runtime, autonomous activation or epic completion is claimed.schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
dc5d3c73282c29a3f0098306d398743ee18ec791: Verified the production/test governance INSERT copies and static-renderer lookup and refreshed their moved anchors. The six committed false-twin findings retain their children; the supporting host-registration observation stays explicitly outside committed scope. No test or public renderer behavior changed.schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
af6300478a07379178bd30221a31c0b917df2283: Refreshed moved current-source pointers by inspecting their named anchors. Historical receipts retain their source identities; scope, rulings, priorities and outstanding prerequisites are preserved. No runtime result or readiness is inferred from this navigation repair.schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
77f35ef1ba34e4fab7092ada5362ae799852ea24: Verified moved current-source anchors and refreshed their pointers after the reference-tool delivery. Historical failed receipts retain their source identities; scope, rulings and unresolved needs are unchanged. No runtime result or readiness is inferred.schlessera commentedon Oct 24, 2026
2026-10-24 triage at main
e1ab485669565554ca6cb61ce5d130303647230f: Verified the test-side copied governance INSERT anchor moved by two lines after the peer-wait coverage. Refreshed that current-source pointer only; no false-twin finding, prerequisite or proof result is changed.schlessera commentedon Oct 25, 2026
2026-10-25 triage at main
827861e1fa71cd4a26b52f1ef0f96b849381acdf: Verified moved current-source anchors and refreshed navigation; historical receipts and unresolved prerequisites retain their identities. No new runtime proof is claimed.schlessera commentedon Oct 25, 2026
2026-10-25 triage at main
541b8d98328a760290ac6dd4a7f065af76153408: Verified the moved current-source anchors after the off-loop writer slices and refreshed their pointers; historical failed-source receipts, scope and unresolved prerequisites remain unchanged. No new runtime qualification is claimed.schlessera commentedon Oct 25, 2026
2026-10-25 triage at main
c670449d3bf1b0639e50ce554d728961f4313add: Verified the moved named current-source anchors and refreshed navigation. Historical evidence keeps its source identity; scope, decisions, native membership and unresolved prerequisites are preserved.schlessera commentedon Oct 25, 2026
Test-value audit follow-up — 2026-10-26
Attached #2972 for the invented Tailscale WebSocket text handler. The new issue maps the real createApp authorization/upgrade path, the existing cheap IP/trust matrix, and the native admission proof required for replacement. It is independent of the six existing children. This identifies a test-boundary gap; no production authentication bypass or implementation fix is claimed.
All existing child scopes remain. Redundant executions belong to #1849; weak oracles on the correct function belong to #2963.
schlessera commentedon Nov 3, 2026
Epic state — 2026-11-03
schlessera commentedon Nov 10, 2026
2026-11-10 triage at main
3aadc8df5: repaired two moved anchors in the body: theToolCallTimelineCellrender is nowpackages/ui-react/src/components/chat/message-bubble.tsx:467, andgovernedRecordsis nowpackages/ui-server/src/app.ts:693. #2972 is done; #2522, #2523, #2524, #2525, #2526 and #2758 remain open with no PR. Scope and the definition of done are unchanged.schlessera commentedon Nov 11, 2026
2026-11-11 triage: Reconciled #2758’s integration-branch closure with the still-open default-branch landing #3979. Inspected main still has the copied fallback; the five remaining open native tasks are independent.
schlessera commentedon Nov 15, 2026
Epic reconciliation — 2026-11-15. #2758's #3961 repair is on main through #3979, merge
8ce26e65f3d6af77ebf679c4dbfdcd29172c8222, an ancestor of inspected main3f8ff29341fbe25665cea42659f92e6f3d3ccef0. Both writer and no-writer fixture arms useprocedureCaller(..., governedTurnWrites, ...); the copied INSERT is gone. The body's integration-only/still-copied claim is corrected.The recorded #2758 mutation changes the production errors value, fails the named invalid-policy notice assertion, and restores to 26 passes. Those are the original receipts, not a fresh execution. The remaining native children and complete false-path audit stay open; no epic readiness or completion is inferred.