Skip to content

Finish every layout past the deadline, report it, and drop Cryo cooling links - #16

Merged
OGMods merged 1 commit into
mainfrom
untimed-cleanup
Nov 13, 2026
Merged

OGMods merged 1 commit into
mainfrom
untimed-cleanup

Conversation

@OGMods

@OGMods OGMods commented Nov 13, 2026

Copy link
Copy Markdown
Owner

What

  • Untimed cleanup. Pruning, right-sizing, the pooled coolers' evacuation and sweep, and gatherEmptyTiles now run to completion on the primary and every alternate. The shared caps (EVACUATE_BUDGET_MS, GATHER_BUDGET_MS, EMPTY_GATHER_BUDGET_MS) are gone: the first alternate used up the budget, so the later variants came back ungathered. Every pass terminates on its own, and the deadline parameters now default to Infinity.
  • The wait is reported. SearchHooks.onFinalizing(done, total) sends a worker message, ISLAND_FINALIZING. The coordinator sums the reports into a count that never goes backwards. Once the countdown runs out, the readout shows "finalizing d/t". Each report re-arms the watchdog (FINALIZING_GRACE_MS, never shortened), so a slow phone is not stopped partway through its shortlist.
  • STOP. A STOP that arrives during the search keeps the whole shortlist. Only a STOP that arrives during the cleanup cuts it short. The primary is never cut.
  • Cryo Nexus links. Cooler flows are no longer drawn under a shared pool. They formed a complete bipartite graph between every cooler and every source. Heat links are kept.

Review

Two review agents read this, one on the solver package and one on the app. Neither found a correctness bug. Their lower-severity findings are fixed here:

  • The count went backwards when a task finished.
  • The count never reached total/total.
  • A stopped run returned no variants.
  • The docs gave the wrong reason the evacuation terminates.
  • The tooltip said "search done" too early.
  • Several docs and comments were stale.

Checks

npm run check, npm run knip, npm test (1205 passed), npm run fixtures (reproduces byte for byte) and npm run build:solver all pass locally.

…ng links

The cleanup after the search (prune, right-size, pooled-cooler evacuation and
sweep, empty-tile gathering) is no longer capped: a budget shared across the
shortlist was spent by the first alternate, leaving the rest ungathered. Each
pass terminates on its own.

The wait is reported: SearchHooks.onFinalizing -> ISLAND_FINALIZING -> the
coordinator's summed, monotonic count -> "finalizing d/t" in the readout, and
each report re-arms the watchdog. A STOP during the search keeps the whole
shortlist; only one during the cleanup cuts it.

Under Cryo Nexus the board no longer draws cooler links: the pool serves
everyone, so the flows were a complete bipartite graph.
@OGMods
OGMods merged commit 3adba5d into main Nov 13, 2026
3 checks passed
@OGMods
OGMods deleted the untimed-cleanup branch November 13, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant