diff --git a/.claude/memory/blockers.md b/.claude/memory/blockers.md index e7f7b1e..e34748f 100644 --- a/.claude/memory/blockers.md +++ b/.claude/memory/blockers.md @@ -336,3 +336,11 @@ rules: - **Friction**: `/model` picker, pick = session's current model (Opus 5.5) → native "Set model to `Opus 5.5` and saved as your default… settings.local.json pins `Fable 5.1` — that applies on restart"; no scope question; project pin stays. - **Real cause**: engine fires no `PreModelSwitch` when the pick equals the session model (nothing to switch) → handlePicker (BDR-127) never runs. Proof 2026-10-29: user picked Sonnet 5.5 (different) → "Model switch to Sonnet 5.5 was blocked by a PreModelSwitch hook". First guess (gateway ids `anthropic/claude-opus-5.5`) was a logged-out OpenRouter session, not the bug (3 lenses FATAL). - **Solution**: bare `/model` opens router dialog in command.run (BDR-132), 657e5cb. + +## BLK-038 — memory.sh upgrade cements a v1 prose false-closed as an explicit resolved status line [open] (2026-10-30) +- **Date**: 2026-10-30 +- **Friction**: phase 4a per-repo pass. `memory.sh upgrade` on orbistep wrote `- **Status (2026-10-30, upgrade)**: resolved` under BLK-021 (`status: open`, fix not decided) and BLK-030 (`status: code resolved (df5818c) · SMTP open (upstream OVH)`), twice under BLK-008. Oracle silent: "open BLK unchanged (14)". +- **Real cause**: `_mem_upgrade_repair` copies the v1 legacy reader's closed verdict, never asks where it came from. Legacy reader = last line matching `status|resolved|…|open`, prose included ("another tab already resolved it"). v1 false-closed → explicit status line. Oracle shares that reader → blind ([[LRN-237]]). Duplicate: `_mem_verdict_diff` loops `_mem_heading_ids`, which lists `### BLK-008 UPDATE` sub-heading too. +- **Measured**: 13 repos, 4 v1 closures without a labelled leading closed word: orbistep BLK-021 (really open), BLK-026 (prose addendum, really resolved), BLK-030 (mixed), bchanot-cv BLK-001 (strict already resolved, no effect). No lexical rule decides prose: BLK-021 and BLK-026 same shape, opposite truth. +- **Solution**: /bugfix bugfix/memory-upgrade-prose-closure: repair only from a `Status`/`Statut` label whose leading word closes; else refuse file (rc 2), name ID + v1 line + remedy `memory.sh status`. Dedupe IDs. Committed repos audited clean; orbistep + zenquality redone after fix. +- **Status (2026-10-31)**: resolved 2dae528: repair writes only a single closed Status word, prose/mixed refused and named, diff captured before inserts, one upgrade line per entry; orbistep + zenquality redone (144505f, b7edb9c) diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index f199002..fdd9329 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -672,3 +672,6 @@ rules: ## 2026-10-29 - Phase 1 context diet (feature/context-diet): 8 tasks SDD + final opus review (I1 Write gap fixed 789a2b2), GATE 0 MET, verifier CONFORME 21/21 after 2 micro-gates, security PASS. /context 30.5k → 26.2k (own −2.8k). Load proof: faunosteo supabase.md + web-building.md, game cloud-functions.md + supabase.md path_glob_match. robin_petier BDR-075 (auto memory migrated, chore/memory-lan-server). BDR-130/131, LRN-238..241, EVAL-053. Faunosteo/game: nothing lost. - /bugfix /model pin (BLK-037: same-model pick fires no PreModelSwitch; gateway-id plan dropped after 3 lenses FATAL) → /feat bare /model dialog (BDR-132) 657e5cb: 2 challenge rounds (ui.ask 2-4 cap BLOCKER), verifier 8/9 + live c9 MET, security PASS. LRN-242/243. + +## 2026-10-31 +- Phase 4a per-repo pass: 12 repos upgraded to v2 on chore/memory-v2 (game headings demoted, trucks bullet Indexes dropped + BLK-001 resolved, robin BLK-013/015 closures kept); BLK-038 found (upgrade cemented prose false-closed) → /bugfix 2dae528, 3 lenses + confirmation, verifier CONFORME 6/6, security PASS, real-data replay oracle over 13 repos; game/zq redone with user statuses. LRN-244, LRN-245. faunosteo prepared off-repo (V1-2 active). diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index e901a21..0e2ef9b 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -1857,3 +1857,13 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s ## LRN-243 — Interactive engine behavior: one discriminating user test before the fix plan (2026-10-29) - **Pattern**: bugfix diagnosis twice wrong before code: "proven" cause was a logged-out OpenRouter session; real cause found by challengers reading timestamps + session model (same-model pick). A 30 s user-run discriminating test (pick a different model) settled it; a second (`/model opus` typed) proved `$.ui.ask` renders in command.run before building on it. - **Application**: interactive-only engine behavior → design one discriminating user test, ask it in plain text (an open AskUserQuestion blocks the user's slash commands), before any fix plan hardens. + +## LRN-244 — Never stream a reader over a file the same loop rewrites in place (2026-10-31) +- **Context**: BLK-038 fix 2026-10-30. `_mem_upgrade_repair` looped `while … done < <(_mem_verdict_diff old new)` while `_mem_insert` rewrote `new` in place (`cat "$tmp" > "$1"`). +- **Pattern**: process substitution runs concurrently with the loop body. Reader sees a torn file → nondeterministic extra row. Config pre-upgrade blockers: CLI upgrade wrote BLK-003 repair 6 of 6 replays, stage-by-stage trace and live run 345ee68 wrote none. +- **Apply**: never stream a reader over a file the same loop rewrites. Capture the full output into a variable first (`rows=$(…)`), then loop over a here-string. Found only by a byte-for-byte replay oracle on real data, not by unit fixtures. + +## LRN-245 — A migration must not cement a lexical legacy verdict: carry only a labelled single-word status, refuse and name the rest (2026-10-31) +- **Context**: phase 4a per-repo pass 2026-10-30, BLK-038. `memory.sh upgrade` turned the v1 lexical reader's closed verdict into an explicit `Status (…, upgrade): resolved` line; oracle "open set unchanged" passed because both readers agreed on the wrong verdict. +- **Pattern**: prose lines of the same shape carried opposite truth (orbistep BLK-021 "already resolved it" = really open; BLK-026 "ADDENDUM: resolved same day" = really resolved). No lexical rule decides prose. +- **Apply**: a migration carries a status only from a labelled line holding exactly one status word; everything else is named and refused, the human records the truth (`memory.sh status`), then re-run. Audit every written repair line against its source line before trusting "verdicts unchanged" ([[LRN-237]]).