Repository navigation
Conversation
…aunching, and re-arm the watchdog on failure
|
@owizdom is attempting to deploy a commit to the EigenLabs Team on Vercel. A member of the Team first needs to authorize it. |
Threat model review — advisoryReviewed head Review not completed for this head. Previous findings are superseded, not confirmed resolved. Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging. Coverage: 12/28 source units; cross-file integration pending. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned. Cost this run: $0.3856 reported, $0.0000 reserved with unknown cost; 5 paid request(s), 0 reused batch(es), 80388 provider cache-hit tokens. Saved findings and earlier report · Historical findings are not confirmed resolved. |
Layr-Labs#1315 landed the launchd removal wait; keep only the watchdog re-arm on a failed relaunch.
Summary
darkbloom updateanddarkbloom restartleave the watchdog stopped when relaunching the drained provider fails (#1306, side note).ServiceDrain.preparestops and disables the watchdog before the drain. On master,restartre-arms it only afterrestartAfterDrainreturns (RestartCommand.swift), andupdatere-arms it inside thedoblock, so itscatchrethrows with crash recovery still off (UpdateCommand.swift). The provider then stays down until the owner starts it by hand.#1315 fixed the launchd race behind the original
launchctl bootstrap failed: 5report by waiting for confirmed removal of the old job. It also adds a new way for the relaunch to throw: the removal is not confirmed within its 10 s budget. This PR is now only the re-arm. It was rebased on #1315 and drops its own wait loop.restartandupdateshare one post-drain step,ServiceDrain.relaunchDrainedProvider, which re-arms the watchdog (per the existingauto_restartrule) whether the relaunch succeeds or throws. The error is rethrown and reported as before.Linked issue
Fixes the watchdog half of the side note in #1306. The launchd wait is #1315; the main bug in #1306 was fixed by #1305.
Before and after
flowchart TB subgraph Before direction TB B1[drain: watchdog stopped and disabled] --> B2[relaunch throws] B2 --> B3[error rethrown before the re-arm] B3 --> B4[provider down, watchdog off until a manual start] end subgraph After direction TB A1[drain: watchdog stopped and disabled] --> A2[relaunch succeeds or throws] A2 --> A3[watchdog re-armed either way] A3 --> A4[error rethrown as before] end Before ~~~ AfterTest plan
ServiceDrainRelaunchTests: the re-arm runs once when the relaunch succeeds and once when it throws, and the error is rethrown.swift test --filter ServiceDrain32 tests in 5 suites passed;--filter 'Restart|UpdateCommand|SelfUpdater|ServiceDrainRelaunch'102 of 103 passed. The one failure,SelfUpdaterTests"signed extracted child proves retained Gemma marker before staging succeeds", fails the same way on a master build on this machine.Components touched
Protocol / interface changes
Documentation impact
CHANGELOG entry added.
Notes for reviewers
Not claimed:
Rollout: ships with the next provider release. Rollback: revert the merge commit. Removal: none.