chore(memory): R2 corrections, BDR-115, LRN-133..135, BLK-015

Plan rev 5/5b and contract criteria 21-29 (25 amended to the two-part touch proof), TODO line, journal.
This commit is contained in:
bchanot committed 2026-11-13 15:35:31 +01:00
1 parent 538ce275ce
commit 36c6eb3fea
7 files changed
+207 -3

No files matched your search

+19
View File
@@ -931,3 +931,22 @@ Limit: wording of this client version only.
- Avoid concurrent suites mutating the same singleton (set-aside/restore patterns race with readers under fullyParallel and alter pre-existing metadata such as updated_at).
- Prove non-interference: per-id snapshot (id, status, archived_at, updated_at) of pre-existing rows before/after; counts alone lie (fixtures add rows).
**Refs**: BLK-014, `e2e/ui/working-copy.spec.ts`, `sheets-admin.sandbox.ts` afterAll, `editor-equine.spec.ts` set-aside (open), LRN-076, LRN-082.
## LRN-133 — Guarded e2e on persistent sandbox: preflight wrapper, full-row guard, A/B then dose-response (2026-11-13)
**Context**: R2 shell e2e on persistent sandbox (editor-equine must never run there; pre-existing rows must stay identical).
**Rules**:
- Wrap every shell e2e run in a script: refuse bare args, refuse any spec named editor-equine, run `--list` first and abort if editor-equine appears (preflight), then run.
- Guard = full-row md5 per id of pre-existing rows in every touched table, snapshot before/after; report new rows per table + « pre-existing rows changed or deleted: none ». Counts alone lie; metadata (updated_at) included in the hash.
- Diagnose suite failures with interleaved A/B (pre-change worktree vs HEAD, same lockfile, same data) then a dose-response probe (cap the suspect input, same code/data) in a quiet window; loaded runs confound.
**Refs**: scratchpad wrappers run-shell.sh / guard.sh (R2), BLK-015, LRN-132.
## LRN-134 — Blur-commit plus explicit commit: stale value duplicates history; one error slot vs several refused fields (2026-11-13)
**Context**: R2 reference tiles: field blur commits value to history; « Terminer » / panel close also commit.
**Pattern**: blur-commit + explicit commit on the same gesture read a stale value → duplicate history entry (two undos for one edit). Fix: one commit path per edit, compare against document value at commit time, test « one history entry per edit » for blur, « Terminer », panel close (criterion 26, 1bf2701).
**Also**: a guard that tries several pending fields with one shared error slot leaves the LAST field's message; focus first refused field then re-assert its refusal (94f8a8b). Test focused field's aria-invalid, not just that an error exists.
**Apply**: any form with commit-on-blur plus a submit-like button.
## LRN-135 — Refusal layout shift loses the click (mousedown preventDefault); happy-dom observer and touch-slop test traps (2026-11-13)
**Context**: R2 « Terminer » below a field whose blur-commit is refused.
**Pattern**: mouse down blurs field → refusal line inserted → layout shifts → mouseup lands elsewhere → click lost (« Terminer » looks dead). Fix: `mousedown` preventDefault on the button (focus stays, button then runs the leave guard). Editor-wide general cure not done.
**Also (tests)**: happy-dom 20.10.6 holds MutationObserver callback in WeakRef → GC under load silently stops observation; count live-region announcements by wrapping textContent/nodeValue setters, restore in afterEach (c8109af, b1fd896). Touch e2e: CDP synthesizeScrollGesture touch scrolls nothing in Chromium 1248; dispatchTouchEvent swipes do, but slop floor ~60 px + load-dependent gain → pixel-exact touch landing not reproducible; prove reachability by touch, place worst case by programmatic scroll (78fb2d0).