tickets
All repositories: gitoria
3.4 KB
# Report 019 — "B: unliked" de-flaked (worker N2, branch w28-deflake)**Verdict: a TEST flake, not an app bug. Fix: tests/browser.mjs only (`calmClick`). No .hl, no components change, no patch for the Comments block.**## 1. ReproductionThe machine was heavily loaded (load 50–70 from other workers; once my own CPU burners, which Atlas had stopped — I won't repeat that).- Plain gate on f83d9c0, natural load: 12 runs → 1 failure (`delete` → `comment-ask` never appeared), 11 passes; 1 more run earlier passed.Counting the first runs with instrumentation: base 1–12.- Under artificial CPU load (36 `yes`, now gone): load 1–8 → 4 failures; load2 1–3 → 1 failure. Failures were always a lost click in thecomments section: **B: unliked** (1×), **A: the edit editor holds the comment** (2× — the Edit click lost), **delete → comment-delete/Keep** (2×),`comment-ask` missing (2×). "B: unliked" itself failed 1× in ~23 instrumented runs; the other clicks are the same flake.- State at the "B: unliked" failure (a MutationObserver + capture listeners on B, installed just before the click): button node the SAMEelement, aria-pressed 'true', text '♥ 1', **no mousedown/mouseup/click event reached the like button**, and the API still said likes = 1.So: not stuck by a stale push, not replaced, not a second toggle lost on the server — the press never hit the button. The log showedDOM mutations still arriving in the 12–13 ms after the press (the push of the first like re-draws the comment: the read-only MdEditorbuilds its text a moment after, shifting the buttons below it).## 2. Decision`b.click()` measures the button's box and then sends mouseMoved / mousePressed / mouseReleased in separate CDP calls; when the comment isre-drawn in between (after every push — more so under load), the press lands where the button was. The wait before the click (`B: liked`,the `♥ 1` check, the API call) only proves the state, not that the layout has settled. Server toggle, push order and the block's rows are right(likes 1 → 0 verified in 8 clean runs; one toggle per click, one push per toggle, rows keyed by id). A human cannot hit this: the window ismilliseconds and she sees the button move. (Side note, not a bug I touched: the read-only editor drawing a moment after a push causes asmall layout shift — a polish item for the Comments/MdEditor owner, not a defect of this check.)## 3. Fix and prooftests/browser.mjs: `calmClick(page, sel)` waits until the element's rect has not changed for 8 samples (60 ms interval ≈ half a second),then does the real click. Used for every button click of the m016 block that follows a push or a re-draw: like ×3, edit-start, save,delete ×2, keep, delete-yes. Diff: one helper + 9 call sites in tests/browser.mjs, nothing else.- Before (f83d9c0, natural + loaded): see section 1, 4–5 of ~12 gate runs under load lost a comments click; 1/12 unloaded.- After: browser gate **351 passed, 0 failed × 8 runs** (the load had dropped to 6–9 while these ran, so they are less demanding than theloaded "before" runs — I was told not to stress the machine again; a rerun under natural load is the real confirmation);tests/events.mjs **52 passed, 0 failed**.- Ports: 8732–8739 only; at the end nothing of mine listens (ss checked); a leftover ident and the orphaned server/Chromes of a killed run werestopped by PID.Logs: /media/STORAGE/claude-scratch/atlas/N2/logs/ (base-*, load-*, load2-*, after-*, events.log); instrumentation scripts instr*.py there.
Branches
Latest commits
- 5d144817Merge branch 'records-t40' into mainTickets
- 44ee6f06|||PR records: #43 #45 livemre
- b8fdeee9Merge branch 'p39-routes' into mainTickets
- a0187a0a|||PR Remove redundant route-order loopmre
- 369e4b9cMerge branch 'k40-lists' into mainTickets
- 9af8e780|||PR Use keyed list mutations for live ticket updatesmre
- 610d8e8aMerge branch 'records-t39' into mainTickets
- 32bcdf24|||PR records: GO P39 K40mre
- 4123c6d1Merge branch 'records-t38' into mainTickets
- cd3641a1|||PR records: day72 deploy live, tickets closedmre
- 7d44d852Merge branch 'records-t37' into mainTickets
- 926f7061|||PR records: merges, D36 deploymre
- bf58534eMerge branch 'l33-final' into mainTickets
- 759a9ac3|||PR thin login (tickets#46, #45): merge main, route entry cleanupmre
- 239436d8Merge remote-tracking branch 'origin/main' into l33-finalmre
- 5822cb3aMerge branch 'o34-clean' into mainTickets
- 0870653c|||PR offline note from __hlOnline, no polling (tickets#41)mre
- 14cf96b4Merge branch 'records-t36' into mainTickets
- 07749fa1|||PR records: day72 + #40 mergedmre
- ecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mre