name: square-repaint-triage description: Use watched-cell repaint tracing when a parity bug is localized to one screen square and you need the runtime write order for that exact terminal cell across a short step range.
Square Repaint Triage
Use this after first divergence is already localized and the remaining question is runtime repaint order for one terminal cell.
Read docs/SQUARE_REPAINT_TRACE.md
for the exact command syntax and guardrails.
When To Use
Use it when:
- RNG/events already match, or the visible bug is clearly local
dbgmapdumphas narrowed the issue to one square or a tiny cluster- you need to know which runtime write last touched the bad cell
Do not use it as a first-pass localization tool. Use:
session_test_runnerdbgmapdump- repaint traces
first.
Core Command
node scripts/debug/repaint_square_trace.mjs <session.json> --cell <col,row> --steps <from-to> --stack
This uses the real active display runtime:
js/display.jsduring parity/session replayjs/display.jsduring browser/runtime debugging
Interpretation
kind=write: a changed cell payload was writtenprev=... next=...: the visible overwrite happened herekind=cursor: cursor ownership moved onto the watched cellcaller=...: use this to identify the owning runtime path
Standard Workflow
- find first bad screen step
- capture nearby settled state with
dbgmapdump - watch the exact bad screen cell over
step-1 .. step+1 - identify the final wrong writer
- fix core JS runtime/display behavior
Guardrails
- keep the trace range short
- watch one cell unless there is a strong reason not to
- do not patch harness/comparator based on this output
- remove any temporary extra diagnostics once the root cause is proven