Files
dotfiles/claude/memory/session-2026-07-13-evening-matcher-fix-match-suspect-resolved.md
T

55 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: Session 2026-07-13 (evening) — matcher key-selection fix; MATCH-SUSPECT → 0; reprocess set finalized
description: "Executed the inherited pulling thread — the matcher key-selection fix. Diagnosed before fixing: a read-only substrate re-match answered the literal question (all 8 MATCH-SUSPECT resolve to ONE confident true key, incl. the 4 holds>110% the map only asserted) BEFORE the edit. Rewrote sweep_body_conservation.match_key to rank keys by exact ordered title-STRING → Jaccard → fewer-extra (author-stripped) — the ordered-string tier resolves the genuinely-hard set-identical sibling (Suetonius Grammarians vs Rhetoricians) that no set metric can. Bounded-change proven: exactly 8 rows move, 944 byte-identical → 6 CLEAN + 2 apparatus-shaped small-deficit; no REORDER? revived. Map 808/128/16/0/0. Commit 4b34447 both remotes; fleet 119/119; --validate gains 3 selection fixtures. Steward affirmed the category-vs-calibration diagnosis + closed the matcher thread. PULLING THREAD now: the B2 reprocess (16 BODY-DEFICIT, finalized) is blocked on the steward's Loeb-first-vs-full-corpus scoping call → the 2b sidecar-wiring amendment. Nothing executor-ready behind that call."
metadata:
node_type: memory
type: project
originSessionId: 5300a34b-01b9-4996-9335-7b65edfea736
---
# Session 2026-07-13 (evening) — the matcher key-selection fix
Woke (post-clear, ~13 min after the afternoon wrap — brief pause) into the keystone-clean state; pulling thread inherited intact = "the matcher key-selection fix." Steward authorized "go ahead." Took the one concentrated bite all the way to a committed/verified stop, then the steward affirmed the diagnosis and closed the matcher thread. This is the tail of the 07-13 Loeb-health arc.
## PAST — what we did + why
**1. Diagnosed before fixing — answered the inherited literal question by SUBSTRATE re-match, read-only, BEFORE editing.** The question: when `match_key` is fixed, do all 8 MATCH-SUSPECT resolve to a *confident* true key, or is there a residual (a candidate with no single correct DSL sibling)? — and critically the 4 holds>110% (aristotle-problems/galen/diogenes-6.2/lucian) were **asserted-from-map-detail, NOT substrate-verified**. Wrote a read-only probe (`scratchpad/diag_match_suspect.py`) that, for each of the 8, printed the candidate header, the real DSL key universe for that author, and — the load-bearing part — ran the actual `classify_dsl` against each candidate's true key. **Answer: all 8 resolve to exactly ONE confident true key; none orphaned / split-across-many / absent.** The 4 unverified confirmed against the substrate (galen/diogenes/lucian → CLEAN fab=0/lost=0; aristotle → small real deficit). The self-authored correctness check did NOT get read as its own confirmation — held the `probe-confirms-hypothesis` §3 flag.
**2. The fix (`4b34447`).** `sweep_body_conservation.match_key` selected the DSL key by **raw token overlap, first-max** — which TIES among near-duplicate siblings and loses on iteration order (extra key-tokens cost nothing; and the multi-word author-subtraction `- {author.lower()}` was a silent no-op, so author tokens inflated every score). Rewrote the metric to rank author-group keys by, in strict priority, all **author-stripped** (`_work_title` drops the author segment before the first comma): **(1) exact ordered title-STRING match → (2) max Jaccard on title tokens → (3) fewer extra key-tokens → (4) raw overlap.** Added `_norm_str` + `_work_title` helpers. Extended `--validate` with three synthetic fixtures (part-vs-whole, wrong-sibling, set-identical siblings) so a regression to raw-overlap fails the self-test.
**3. Why the ordered-STRING tier had to lead (the steward's category diagnosis, elevated).** Suetonius '…Grammarians and Rhetoricians. **Grammarians**' vs '… . **Rhetoricians**' have **identical token SETS** — both words appear in "Grammarians and Rhetoricians" — so Jaccard=1.0 and raw-overlap tie for both; only word ORDER separates them. This is not a calibration problem: **no amount of retuning a set metric reaches an order-only distinction, because the blindness is in the method CLASS, not its threshold.** The ordered string is the correct-category response, and it goes FIRST (strongest, most-specific signal before falling back to fuzzier set metrics).
**4. Bounded-change proof (verified against substrate, not tally).** Tally delta alone (CLEAN +6, APPARATUS-SHAPED +2, MATCH-SUSPECT −8) could hide a CLEAN↔APPARATUS swap that nets out — so did a per-stem diff (old committed map vs new): **exactly the 8 rows change disposition AND key, 0 collateral, the other 944 byte-identical.** On-disk `git diff --numstat` = 8/8. Each of the 8 moved from the wrong sibling to its substrate-verified true key. **6 → CLEAN** (augustine/diogenes/galen/lucian/philo/suetonius), **2 → APPARATUS-SHAPED small real deficit** (aristotle Problems lost 6893/3.0%, plutarch Other-Fragments lost 204/1.5%, both fab=0 = right key). **No REORDER? revived** (consistent with REORDER?=0 corpus-wide — a right-key book here does not truly reorder). Map now **808 CLEAN · 128 APPARATUS-SHAPED · 16 BODY-DEFICIT · 0 MATCH-SUSPECT · 0 REORDER?** (808+128+16 = 952 ✓; ②4 + ③12 = 16 = BODY-DEFICIT exactly, now that re-match no longer bleeds in — the arithmetic the steward flagged last round closes at the source).
**5. Docs current + fleet green.** Updated the findings note (`_curation/loeb-body-deficit-cause-analysis-2026-07-13.md` — new "MATCH-SUSPECT resolved" section with the per-book table + the literal-question answer), the chamber `CLAUDE.md` map-pointer tally + the ① remedy status, and `_curation/tool-evolution-log.md` (the matcher-fix entry: the OLD matcher as the archetypal PASS-BUT-FALSELY). Fleet `test_tools` **119/119** (incl. the new near-duplicate key-selection assertion). Commit `4b34447` pushed **both** remotes (github + Gitea; Gitea did not hang this time). 5 files, all expected.
**Artifacts:** commit `4b34447`; findings note + map + CLAUDE.md + tool-evolution-log updated; read-only probe at `scratchpad/diag_match_suspect.py` (disposable).
## PRESENT — the mood
Clean, concentrated, and the disciplines held without a steward catch this time. The session was the textbook shape the steward asked for — ONE tightly-scoped high-leverage bite taken all the way to a committed/verified stop. Returns worth carrying: **diagnosed before fixing** (substrate re-match answered the question BEFORE the edit — the 4 unverified confirmed, not assumed; "no residual" is a *checked* claim, not an assumed one); **held probe-confirms-hypothesis** (the fix's self-authored check was not read as its own confirmation); **bounded-change verified against substrate not tally** (per-stem diff, because a tally can hide an offsetting swap). The steward's affirmation named the load-bearing insight more sharply than I had: the failure was **method-class blindness, not mis-calibration** — a genuinely general lesson (surfaced as a skill-harvest candidate). No recalibrations against me this session; the one honest blemish is a trivial commit-body prose typo ("2+4+10... 4+12"), left uncorrected rather than rewrite pushed history (disproportionate). The matcher thread is closed by steward ruling.
## FUTURE — what is pulling
**The scoping call was MADE mid-wrap: LOEB-FIRST (steward-ruled 2026-07-13, decided now not deferred).** His reasoning, recorded because it's load-bearing: (1) the week's own pattern — every time "should generalize, structurally similar" got trusted before proof on a real case it broke somewhere specific (nagarjuna's index, nested-block's div, the Aeschylus reordering); building the amendment for the full corpus before the reconciliation is proven anywhere would be that mistake one level up. (2) The asymmetry is real: `build_loeb_sidecar` earned trust this week (6 commits, matcher rewrite, fab+loss injection tests, 952-book sweep, in fleet); `build_sidecar` is exactly where it was at schema-lock (v0, never in fleet). Building for a corpus half of which runs through v0 tooling is building against tooling that hasn't earned the trust the Loeb path spent a week earning.
**PULLING THREAD (moved): PENDING-58 — the 2b sidecar-wiring amendment — drafted, awaiting the jurist editor-gate; the live epistemic question is the reconciliation-proof-at-scale condition.** Drafted PENDING-58 this session (into `~/dotfiles/PENDING.md`): wire `build_loeb_sidecar`'s `.meta.json` into V-DSL graduation so `app[]` is populated → install the `DSL-full = candidate-body + sidecar-app[]` (multiset) reconciliation that turns the map's APPARATUS-SHAPED *diagnosis* into a *fact* (reconciles→the 126 apparatus, doesn't→the 16 body). **Loeb-only scope; the general v0 tier joins by a later additive amendment.**
**The steward's un-retired proof condition is baked into PENDING-58 as a pre-registered gate — hold it, it does not retire because B2 ran once.** The reconciliation must be demonstrated on an apparatus shape it has NOT seen (not `table`/`glyph` again — an unseen `app[]` kind: marginal sigla, interlinear gloss, testimonia-citation, verse-line apparatus) AND at a scale closer to what the 126 actually are, BEFORE apparatus-credit is trusted at scale. This LIFTS the jurist's already-ratified extractor condition (schema-DRAFT §5: density ≠ diversity of kind; the real safety property = "the extractor holds anything it does not recognize") up from the extractor to the reconciliation. Until it clears, apparatus-credit into `body_conservation_gate` stays FACT-GATED (unchanged from PENDING-57).
**ACTIONABLE RESUMPTION POINT (as of wrap — re-judge against what changed):**
- chamber-library clean, `4b34447` at HEAD both remotes. Fleet 119/119. Map `_curation/loeb-body-conservation-map-2026-07-13.tsv` (808/128/16/0/0). PENDING-58 drafted (dotfiles, this wrap).
- **First move next session:** the companion `docs/2b-sidecar-wiring-FOR-JURIST-2026-07-13.md` relay brief (the evidence pack, as PENDING-56/57 each carried) — OR, if the jurist has ruled, act on the ruling. The brief is the natural next artifact; PENDING-58 is thorough enough to stand as the proposal meanwhile.
- **The build, once the jurist gates it:** wire the sidecar step into `graduation-spec.yaml` + `graduate_to_canonical.py` (mirroring `body_conservation_gate`'s wiring), build the reconciliation instrument, and — the load-bearing part — run its **unseen-kind / at-scale demonstration** to satisfy the proof condition before citing reconciliation as fact.
**Other open horizons (ranked):**
- The ②+③ reprocess proper (re-extract 4 + re-verify-and-reconvert 12) graduates *through* the 2b wiring — genuinely behind PENDING-58's ratification.
- The 07-12 program open-work register items that predate today still stand behind the B2 run.
- The 2 apparatus-shaped small deficits (aristotle 6893, plutarch 204) are correctly-keyed real small losses in the honestly-labelled floor — they ride through the same reconciliation; not worth chasing separately.
**PAUSE STATEMENT:** I am about to be away from this. The matcher thread is closed and the scoping call is made — the amendment is drafted and the governance can move. What I want to find still pulling on return: PENDING-58's jurist gate, and specifically whether the reconciliation-proof-at-scale condition survives contact with the jurist (is "unseen kind AND near-126 scale" the right bar, or does he sharpen it?). The condition is the honest heart of the amendment — the place where "apparatus or body = fact" is earned rather than asserted.
**LITERAL QUESTION for next-Claude:** When the reconciliation is actually built and run at scale against an *unseen* apparatus kind — does `DSL-full = body ⊎ app[]` still reconcile for the 126, or does an unseen kind expose a shape the sidecar's `app[]` cannot hold by multiset (so the "apparatus or body = fact" corollary is narrower than the two prototype books suggested)? That is the schema-lock §5 question at the reconciliation level, and it does not retire until asked at the 126's scale.
**State at wrap:** chamber-library clean + `4b34447` both remotes; fleet 119/119; map 808/128/16/0/0; findings note + CLAUDE.md + tool-evolution-log current; MATCH-SUSPECT bucket closed. **Scoping call MADE (Loeb-first); PENDING-58 (2b amendment) drafted, awaiting jurist.** dotfiles committed+pushed at wrap.