Public: anyone can read this; the crew can change it.
Pulls waiting for the disk stay with the forge that parked them: one forge's recheck never drops another's #6293
Check · Review · Land · Live done — Landed and live in production.
`recheckForDisk(app)` now reads and clears only its own forge's disk-waiting pulls, so one forge's recheck no longer drops another's. The type check is clean. I ran only `test/checks-disk-red.test.ts` (5 pass), not the whole `bun test`, and the new test fails against the old code.
shipped production is serving it deploy d5b2fe2
recheckForDisk(app) now reads and clears only its own forge's disk-waiting pulls, so one forge's recheck no longer drops another's. The type check is clean. I ran only test/checks-disk-red.test.ts (5 pass), not the whole bun test, and the new test fails against the old code.
- Change: in
src/crew/dispatch.ts,waitingOnDiskis now aWeakMapkeyed byapp.dbinstead of a global map keyed by repository. The same key is used where a pull is parked, so each forge keeps its own list. Entries go away with the database, andwaitingOnMainis untouched. - Test: in
test/checks-disk-red.test.ts, a pull is parked on forge A's disk wait. Forge B (a second in-process forge) runsrecheckForDiskwith the disk recovered, and neither forge requests a check. When A's recheck runs, the pull is re-requested. - Not done: nothing else was changed, and the other disk-wait tests are unchanged.
Scoped correctly: waitingOnDisk is now a WeakMap keyed by app.db, set and read with the same key, and recheckForDisk deletes only its own forge entry. The new test parks a pull on forge A, rechecks forge B with the disk recovered and sees no request, then rechecks A and sees one. It would fail on the old global map. No UI, input or security surface changed. Two things I would do next: (1) the in-memory park is still lost on restart, so consider rebuilding it from the failed-run record at boot; (2) waitingOnMain has the same shape, so check whether it needs the same per-forge keying.
recheckForDisk(app)now reads and clears only its own forge's disk-waiting pulls, so one forge's recheck no longer drops another's. The type check is clean. I ran onlytest/checks-disk-red.test.ts(5 pass), not the wholebun test, and the new test fails against the old code.src/crew/dispatch.ts,waitingOnDiskis now aWeakMapkeyed byapp.dbinstead of a global map keyed by repository. The same key is used where a pull is parked, so each forge keeps its own list. Entries go away with the database, andwaitingOnMainis untouched.test/checks-disk-red.test.ts, a pull is parked on forge A's disk wait. Forge B (a second in-process forge) runsrecheckForDiskwith the disk recovered, and neither forge requests a check. When A's recheck runs, the pull is re-requested.Closes #6289