notes
All repositories: gitoria
3.7 KB
# Report 012 — the delete section of the notes gate de-flaked (worker E4, branch w12-deflake from f431bdf)**Verdict: the cause is a state revert in the page, not a layout race — and it is NOT the phone pane switch (the section runs at 1280 px). Fixed in the gate (tests/browser.mjs only); the app side is NOT fixed (cause is in the framework's ack handling, see "Open").**## 1. Reproduction (`NOTES_GATE_UNTIL=delete`, one delete section ≈ 2 min, load 2–9, no load generators)Unmodified f431bdf, 12 runs: **3 failed (25 %)**: 3× "back to the list, one note less" (the `#deleteyes` press missed). Instrumented copies (MutationObserver +capture listeners + WebSocket frame log, installed just before the clicks) over ~40 more runs failed ≈ 20–25 % too, in three shapes:`click: #deleteno has no layout box (not visible)` (the reported one, 3×), `delete question` never shown (4×), `back to the list` (the Delete press hit FOOTER).State at failure (identical every time): the Delete button is the SAME node, the editor is not re-rendered, `#deleteask` goes `ask` → `ask open` on the click, and**14–50 ms later, with no click, back to `ask`** (class written twice) — `#deleteyes/#deleteno` have no box (display:none) so the next click finds nothing (or the layoutbelow shifts and the press lands on the footer). Right at that moment a WebSocket ack `{i:7, ok:true, sync:{components/notes.hl:{notes,session,signedIn,signedOut}}}`for an emit sent BEFORE the click arrives (log: `WS<` 1 ms after the class write). So: not "not rendered yet", not hidden behind the ListFirst pane (width 1280),not a replaced element — the page's `asking` is set back to false by a late ack of an earlier emit (a push/pull).After the fix every one of 20 runs logged exactly one revert: the first "Delete note" press after opening the note is undone **every time** in this gate; whether the gatefails depends only on whether the revert lands before or after its next click.## 2. DecisionA real (small) app/framework defect: a person who presses "Delete note" within the ~50 ms–100 ms after a late ack sees the question flash and vanish and presses again;nothing is lost or deleted wrongly, and a human rarely clicks that soon after opening a note, so it is not a blocker. I found no .hl change that is certain to prevent it:the ack carries no `asking` key, the handlers never write `asking` outside open()/keep/drop, so the reset comes from how the client applies the ack's `sync` patch (Hybrielruntime) — I did not touch the framework and wrote no JS workaround. Not fixed in .hl → **open item for Atlas / a Hybriel ticket** (minimal facts above; logformat in /media/STORAGE/claude-scratch/atlas/E4/logs/e3-4.log, e4-7.log).## 3. Fix (test) and prooftests/browser.mjs: `openAsk(page, label)`: press "Delete note", wait (polling every 60 ms, no fixed sleep) until the question has stayed visible for 8 samples (~0.5 s, thecalmClick rule); if it was open and closed again by itself, press again (what a person does), up to 4 times, printing a line when it had to. Used for both openings.- Before (f431bdf, delete section only): **3 / 12 failed** (+ the deploy failure); instrumented copies ≈ 20 %.- After: **20 / 20 passed** (2 parallel loops × 10, delete section), each logging one "closed by itself, pressing Delete again — attempt 2" (so the gate fails on neitherand also shows the revert is real; on old code the same state kills the run).- Full gate: **66 passed, 0 failed**. realdata-offline (newest notes backup copy, deleted after): **12 passed, 0 failed**.- No screenshots: no UI change (test only).Ports 8700–8729 used; logs in /media/STORAGE/claude-scratch/atlas/E4/logs/ (baseA*, d2/d3/e3/e4 = instrumented, af1/af2 = after, full.log, realdata.log). At the end nothing of mine listens.
Branches
Latest commits
- 8342cd28Merge branch 'notes9-no-poll' into mainAtlas
- 1f0457a5|||PR make provisional rejected-draft setup deterministicAtlas
- 996768bf|||PR WIP sequence note creation before provisional-id adoptionAtlas
- c49ce093|||PR WIP remove notes polling and use framework reachabilityAtlas
- c028ac61Merge branch 'notes-pr7-kunibert' into mainAtlas
- 9cc92bdfKeep conflict and history fixes while awaiting queued save supportAtlas
- a5c27cb6Allow real edits back to earlier text and honor configured identAtlas
- 15c46ced|||PR Preserve note edits, conflict bases and visible historyAtlas
- 4c6e0bf6Merge branch 'notes13-day61' into mainAtlas
- eb51864f|||PR Back/Forward via navigate, server drafts, Hybriel day61Atlas
- 3537cf7eMerge branch 'vendor-day59' into mainAtlas
- c13d188b|||PR Vendor Hybriel day59Atlas
- 24c95433Merge branch 'notes17-ghost-note' into mainAtlas
- ae1075b2Preserve rejected drafts during note ID adoptionAtlas
- 383cce23|||PR Prevent saved local edits from restoring deleted notesAtlas
- 99ca1cf6Merge branch 'vendor-day56' into mainAtlas
- 649cef37|||PR Vendor Hybriel day56Atlas
- aadd0abcMerge branch 'hl-standard-2' into mainAtlas
- 52ffac9f|||PR Keyboard and reload checks for the notes gate (HL-STANDARD F21, F5)Atlas
- 617ee8c0Merge branch 'hl-standard' into mainAtlas