# Blind Read: writer-triggered whole-document A/B judgment (advisory) (#122) > **Date:** 2026-10-30 > **Type:** issue > **Reference:** https://git.babylondreams.de/AlexKucera/museion/issues/122 (decision #120, rides #24's pass machinery) ## Goal Implement Gitea #122: the writer purposefully triggers a whole-document A/B judgment — current document vs the Pass-start snapshot — performed by a fresh session of the same museion profile. Advisory-only: pick + one-line reason, display-only, records nothing (Skip's doctrine); the writer stays judge of record. Glossary term lands with the issue. ## What Was Done - `Museion/BlindRead.swift` (new) — the judge prompt (both bodies INLINE under neutral "Version A/B" position labels, order randomized per trigger, origin words never appear) + the writer-side reveal line - `PostStore.latestPassSnapshot(id:home:)` — newest `passes/pass-N.md` by mtime, either pass kind; read-only - `MentorSessionModel` — `runPass`'s spawn/session/new/teardown block extracted to one private `runOneShot(profile:name:prompt:pieceTitle:)` rail; `runBlindRead` rides it on the CHAT profile (`museion`) — fresh session, verdict streams into the transient unrostered transcript, reveal appends only on `.ended` with stopReason ≠ "refusal" - `PostsModel.blindRead(home:mentor:)` — guard matrix mirrors runPass (one rail, mutual exclusion with `runningPass`); `runningBlindRead` + `openPieceHasSnapshot` state, the latter derived in `refreshCards` - `MentorPaneView` — "Blind Read" button beside Run Pass in the pass bar; one Cancel rail ends either run - `GLOSSARY.md` — "Blind Read" term (avoid: A/B test, vote, score) - `BlindReadTests.swift` — 12 pins: prompt blindness + flip, reveal mapping, snapshot selection, chat-profile spawn (prompt/spawn logs), roster untouched, pass_state unchanged, no-snapshot/no-edits refusals, refusal-no-reveal (flip-verified), held-run cancel + rail exclusivity - Fake ACP gains a `prompt-log` knob (every session/prompt wire line) — the what-the-engine-was-asked observable - DOX: both AGENTS.md files updated; stale `CONTEXT.md` references corrected to `GLOSSARY.md` (root index + docs) ## Decisions & Rationale | Decision | Rationale | |----------|-----------| | "Unlabeled" = neutral A/B position labels + `Bool.random()` order + post-verdict reveal | #120's flagged default; a pick must reference something — position labels kill origin bias, randomization kills position bias; the reveal lands after the turn so the judge never sees it | | Newest-mtime snapshot wins when both kinds exist | "The Pass-start snapshot" in the singular = the latest pass run's start; a re-run overwrites in place, so newest file IS the latest Pass-start | | One-shot engine on the chat profile (`museion`) | #120: context-free = fresh session, NOT a different judge; no new profile. One-shot avoids roster pollution and reuses the #137 rail — Cancel, read-only composer, and teardown all come free | | "No edits since" refusal (beyond spec) | Judging an identical pair is vacuous; honest refusal beats a coin-flip verdict. Flagged to the user | | No chat-provider-key pre-check | The resident chat engine proves the profile works; a fresh spawn's honest failure row owns the error path (#137's .unknown posture) | | View-side disabled-with-help duplicating model guards | The existing Run Pass precedent — view prevents, model refuses honestly | ## Gotchas & Fixes | Problem | Root Cause | Fix | |---------|------------|-----| | Reveal row landed on REFUSED turns | `turnCore` maps refusals to `.ended(stopReason: "refusal")`, so `if case .ended` wasn't enough — and a 2×-document prompt makes length refusals realistic | Gate on `stopReason != "refusal"` (runPass's advance posture); pinned + flip-verified (finish-audit, 2 reviewers converged) | | "Pass failed" copy on Blind Read spawn failures | The shared rail's failure rows hardcoded "Pass" | `runOneShot` takes `name`, composes the label, failure rows speak `\(label) failed` — callers can't pass a title-inconsistent label | | Snapshot-order test flaked on write order | Both snapshots written ms apart — pass-2 was already newest at the first assert (APFS ns mtimes) | Write pass-1, assert, THEN write pass-2 with a decisive +60 s mtime | | `@Suite` attribute vanished mid-session | Lost in a patch cycle; suite-filters still ran (implicit naming) but the DOX claimed it | Restored; learning #134 says suite-name matching is exactly where vacuous passes bite | | Stale `CONTEXT.md` in root AGENTS.md index | The a1d1cd3 rename to GLOSSARY.md never updated the index/docs | Corrected in root AGENTS.md (2 sites) + docs/AGENTS.md | ## Files Changed | File | Change Summary | |------|---------------| | `Museion/BlindRead.swift` (new) | Judge prompt + reveal vocabulary | | `Museion/PostStore.swift` | `latestPassSnapshot` reader | | `Museion/MentorSessionModel.swift` | `runOneShot` extraction, `runBlindRead`, parameterized failure copy, refusal gate | | `Museion/PostsModel.swift` | `blindRead`, `runningBlindRead`, `openPieceHasSnapshot`, refresh seam, guard mutual exclusion | | `Museion/MentorPaneView.swift` | Blind Read button + shared Cancel rail | | `MuseionTests/BlindReadTests.swift` (new) | 12 pins incl. two audit pins | | `MuseionTests/ACPClientTests.swift` | Fake gains the prompt-log knob | | `GLOSSARY.md` | "Blind Read" term | | `AGENTS.md`, `docs/AGENTS.md`, `Museion/AGENTS.md`, `MuseionTests/AGENTS.md` | DOX pass + CONTEXT.md→GLOSSARY.md corrections | ## Open Items & Next Steps - [ ] Parked (security LOW-1): no size ceiling on the 2× inline prompt — the editor is unusable long before the prompt build matters; if the app ever grows a doc-size cap it belongs at the editor/save boundary, not this rail - [ ] Deferred read of #124 Cancel-visibility: blind read reuses the pass posture (`runningBlindRead` set before the await, sync guards) — revisit only if a spawn-window cancel escape is ever reported - [ ] The parked stern-coach prompt stance (security reviewer's note): personas ride the profile per #120 — no action unless verdicts read too soft in dogfooding --- **Verification (finish-up):** full xcodebuild suite **500 passed / 0 failed** (unit + UI, counted from the log per learning #134); swiftformat clean; swiftlint zero new violations vs the HEAD baseline; GitNexus re-indexed (5,338 nodes); detect-changes scoped RunPass + RunBlindRead flows only. *Log written by write-log skill*