chore(memory): BDR-133 negation rule, LRN-246 reflow proof, LRN-247 awk RSTART, journal + TODO ticks

This commit is contained in:
bchanot committed 2026-11-01 11:45:51 +01:00
1 parent 18e63705c5
commit 3873e35133
4 files changed
+31 -3

No files matched your search

+9
View File
@@ -1450,3 +1450,12 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
- **Why**: user "il faut que ça soit systématique" (option A, 2026-10-29); BLK-037.
- **Rejected**: 8 rows in one ask (engine cap 2-4, LRN-242); native picker + pin-conflict alert only (option B, not systematic); gateway-id normalization (would switch on routing in a gateway session).
- **Supersedes**: BDR-126 "no args → native picker untouched". Live proof 2026-10-29: opus → [1m] → This project wrote `claude-opus-5-5[1m]`. Contract `.claude/tasks/contracts/2026-10-29-bare-model-dialog-1617.md`.
## BDR-133 — Negated status word in clause does not count, shared v1/v2 negation helper [accepted] (2026-11-01)
**Context**: v2 parser + v1 legacy reader read `Status: not resolved yet` as resolved (phase 4a minor, robin_petier EVAL-005 `keep, … not accepted until …` read accepted). User pick 2026-10-31/11-01.
**Decision**: status word negated in its clause does not count. Negator `not|no|never|pas`, at most one word between negator and word, no clause boundary `, ; . : ( ) -> → —` between. Next non-negated occurrence still counts. One helper `mem_has` in `_MEM_AWK`, shared by `mem_word` (v2) and `_mem_v1_word` (v1), so `upgrade` refuses such v1 closure ("unlabelled, mixed or negated line") instead of cementing resolved. Word = maximal `[a-z0-9]` run, loop not ERE interval (BWK awk).
**Alternatives**: ignore negation (keeps false closures); line-scope negation (`resolved, not open` would read none: wrong); NLP (no).
**Consequences**: real-data replay 14 repos → 1 move (robin_petier EVAL-005 accepted → keep). mawk run in T17 guards BWK-class awk.
+3
View File
@@ -677,3 +677,6 @@ rules:
- 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).
- Step 2 suites: /hotfix 40a993c (absolute ~/.claude/rules paths in interviewer + guardrails) + 7899670 (analyzer memory field dropped), security PASS x2. Measured design hook: 59 fires, 0 web-building Reads (no once-per-session). Probe: Bash sed -n loads path rules like Read. Census blind spots: 0 real citations.
- /feat citers-blind-spots 5bd0de4: census reads nested lib paths, home prefixes, templates/project-rules, citer-aware .claude/rules; 3 lenses + confirmation (0 BLOCKER), verifier ECARTS x1 (SC2088/SC2016 suppressions) → fixtures rewritten, CONFORME, security PASS. /hotfix 3330f0b geo/seo '(dispatcher applies)'.
## 2026-11-01
- memory-v2-minors /feat shipped (e4fb8f7 + 48ade8f): negated status words, dead empty steal, body `## ` refused, blob rc 1/2, rc 6 names dropped partial stages, reflow. Verifier CONFORME, security PASS, replay 14 repos = 1 expected move. Docs synced. Next: doc half, then phase 5 spikes.
+14
View File
@@ -1867,3 +1867,17 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
- **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]]).
## LRN-246 — Reflow proof: declare -f / declare -p diff, string splits executed on fixture (2026-11-01)
**Context**: A9 reflow of reconcile.sh + memory-commit.sh (39 lines > 80 bytes) had to prove zero behaviour change (memory-v2-minors 48ade8f).
**Pattern**: proof = `bash -c '. lib/x.sh; declare -f; declare -p <consts>'` before vs after, diff. Comment reflow and pipe/`&&` breaks normalize away. Surviving hunk = string split: review by hand, execute both versions on fixture, compare md5. Source old copy next to CURRENT deps so diff isolates the reflow.
**Application**: any cosmetic reflow of a sourceable shell lib; name the proof in the contract criterion, verifier reproduces it.
## LRN-247 — awk match() in shared helper clobbers caller RSTART, take substr first (2026-11-01)
**Context**: `mem_has` (negation helper) calls awk `match()`; `mem_tag` read `RSTART` after calling `mem_word` → `mem_has`, T10h/T10j broke.
**Pattern**: awk `match()` sets globals `RSTART`/`RLENGTH`; shared helper calling it clobbers caller's values. Take `substr(line, RSTART)` BEFORE calling any parser helper; audit every `RSTART` reader in programs embedding the shared awk block.
**Application**: any `_MEM_AWK` change touching match(); same for `$0`, `NF` side effects of `sub()`/`split()` in helpers.