Files
pad/web/src
xarmian 552230bbea fix(web): a cleared picker owes a refresh even on an unchanged scope (TASK-2877)
Codex review round 13, and it collapses round 12's fix into a simpler one.

`lastScope` means "the scope the rows on screen answer for". The not-ready
branch REMOVES those rows, so afterwards they answer for nothing — which
is what null says, and the next run therefore owes a refresh whether or
not the scope itself moved. Leaving the old value there meant rehydrating
on the SAME workspace and collection compared equal, so a server-sourced
picker took the early return and sat empty permanently: its rows were
cleared and nothing was left to re-query it.

Round 12 deferred the COMMIT past the early return to keep a
cold-window scope change from being forgotten. With this invalidation in
place that deferral changed no outcome — its mutant could not be killed —
so it went and the commit moved back to where the value is computed. One
rule stated once, rather than two mechanisms aimed at two halves of it.

Also hardened the mutation harness, after it bit: a harness timeout kills
the runner with SIGTERM, which does not run `finally`, so an earlier
killed run left the working tree MUTATED. I then read a pre-existing test
"failing" in that tree and had a plausible defect and a fix half-written
before checking the file — the failure was M31's mutant, not my change.
The runner now restores from its backups on SIGTERM/SIGINT/SIGHUP. Cheap,
and the alternative is reasoning about code nobody wrote.

Matrix: 35 mutants, all killed; baseline and restore both 97/97.
2026-09-04 02:30:10 +00:00
..