* fix(update): bound stalled runtime cleanup and reclaim legacy projections
Forward-port retained runtime review corrections from c9de04ac1a. Preserve the recorded watchdog outcome and retained files when workers cannot close, recognize legacy pnpm projections within the same store, and inspect service TMP/TEMP roots without guessing relative paths.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* test(doctor): type the bounded projection iterator fixture
Narrow the first directory entry and declare the generator's undefined return so the synthetic opendir iterator matches Dir's AsyncIterator contract under the core test typecheck.
* fix(update): keep failed recovery barriers nonzero after the output watchdog
A rejected mutation or recovery drain must turn a recorded successful command result into exit 1. Preserve recorded nonzero results and the original result for disposable retained-worker cleanup stalls. Document the distinction and extend the existing real-child exit cases.
PR #160164 follow-up. Before the fix, three new failure cases exited 0 instead of 1; after the fix, all 11 retained-runtime exit cases pass. The regression file took 13.50s wall with --maxWorkers=1. After merging main, the five requested test files pass 79/79 in 99.18s. Core, other, infra, and config-cli typechecks, targeted oxlint, formatting, diff checks, and independent review pass.
The published-driver test file passes 11/11 twice on the original branch and once on main. The reported case takes 7.33s and 6.82s on the branch versus 7.88s on main; its stable finalizer exits naturally without invoking the output watchdog. No PR-specific exit regression reproduced, so no CI-related production or test change was made.
* fix(update): keep nonzero exits and in-flight runtime removal ahead of the watchdog
Preserve a pending nonzero exit when the output watchdog records success. Once retained-runtime directory removal starts, keep it joined through success or error; worker and preparation stalls before removal retain the bounded watchdog behavior. Document the installed-updater behavior.
Real-child regressions failed before the fix for pending exit precedence, interrupted removal, and removal error settlement. Validation: 80 tests across retained-runtime exit/runtime, signal-exit-barrier, and one-shot-exit passed with maxWorkers=2 in 72.86s. The 14-case exit file passed with maxWorkers=1 in 15.73s wall. Core, infra-test, and config-cli-test typechecks, targeted oxlint, oxfmt, and git diff --check passed. Independent P2 autoreview was scoped-clean.
* refactor(update): drop the retained-runtime exit watchdog pending broker settlement split
Remove the watchdog finalizer escape, retirement abort/removal flags, immediate warning path, recorded exit-code state, and watchdog-only process tests. Retained SQLite work and runtime removal stay joined through the existing settlement owner. A mandatory broker settlement versus disposable termination split remains a separate follow-up.
Keep Doctor legacy pnpm projection reclamation and service TMP/TEMP/TMPDIR discovery, including Windows casing and drive-relative paths. Main already preserves failed barriers and pending nonzero exits without watchdog state; retain that implementation and cover those outcomes directly in signal-exit-barrier tests. Recovery docs describe the reduced scope.
Validation: 101 tests passed across six files with maxWorkers=2 (101.54 seconds); core typecheck and state-logging, config-cli, services, and other core test typecheck lanes passed; targeted oxlint and oxfmt passed; Madge found zero cycles; git diff --check passed. Signal barrier cost with maxWorkers=1: seven tests passed, 3.28 seconds command wall (1.74 seconds Vitest). Autoreview against the merged main base was scoped-clean at P1. Native Windows and published-driver upgrade proof were not run in this scoped reduction.
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>