You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(daemon): stopping a daemon ends its version check's npm view - #1886
Stopping a worker or a gateway ends the npm view its version check is still waiting on — src/daemon/main-update.test.ts passes for both roles; the audit removed controller.abort() and the test failed on ended: false
No actionable comments were generated in the recent review.
Walkthrough
The version check now passes an abort signal to the npm CLI. Disposing the version check aborts that signal. NodeNpmCli forwards a provided signal to the process runner. Tests verify that stopping either the worker or gateway daemon aborts a pending npm process run.
Suggested reviewers:leonardoxr
Severity of issue fixed: Low
Merge Risk: Minimal · up to ca510
Stopping a daemon now cancels its pending version-check npm process, which addresses the flaky Windows cleanup failure. No merge-blocking risk was found.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
Issue #1852 requires the flaky gateway-fleet e2e test to stop failing with EBUSY during worker temp folder cleanup on Windows. The PR adds an AbortController signal to the version-check npm view (src/…
Provide evidence that gateway-fleet.e2e.test.ts passes on Windows with this PR applied, for example a CI run on the reviewed head. Alternatively, show that dispose() releases the npm process and its folder handles before the test cleanup ru…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title names the change: stopping a daemon now ends the npm view run that its version check is waiting on. The diff adds an AbortSignal to startVersionCheck and to the npm view path, and the new te…
Description check
The description relates directly to the changeset. It names the test file src/daemon/main-update.test.ts, states that stopping a worker or gateway ends the npm view its version check waits on, and men…
Out of Scope Changes check
The PR changes three files: src/daemon/version-check.ts, src/ports/npm-cli.ts, and src/daemon/main-update.test.ts. The version-check change passes an AbortSignal to npm.view and aborts it in dispose()…
Full details: Title check
Explanation
The title names the change: stopping a daemon now ends the npm view run that its version check is waiting on. The diff adds an AbortSignal to startVersionCheck and to the npm view path, and the new test covers stopping worker and gateway daemons. The title follows the conventional commit style and is specific. It is 64 characters, within a normal range.
Full details: Description check
Explanation
The description relates directly to the changeset. It names the test file src/daemon/main-update.test.ts, states that stopping a worker or gateway ends the npm view its version check waits on, and mentions removing controller.abort() during the audit. It also references issue #1852 and includes review and status notes.
Full details: Out of Scope Changes check
Explanation
The PR changes three files: src/daemon/version-check.ts, src/ports/npm-cli.ts, and src/daemon/main-update.test.ts. The version-check change passes an AbortSignal to npm.view and aborts it in dispose(). The npm-cli port change adds an optional signal parameter to NpmCli.view, FakeNpmCli.view, and NodeNpmCli.view, and forwards it to the process runner. The test change covers worker and gateway stop behavior for that abort. All three changes connect directly to the stop-time abort mechanism that the PR describes as the fix for #1852. No unrelated behavior change appears in the summary. Version parsing, warning, and timer behavior are unchanged.
Full details: Linked Issues check
Explanation
Issue #1852 requires the flaky gateway-fleet e2e test to stop failing with EBUSY during worker temp folder cleanup on Windows. The PR adds an AbortController signal to the version-check npm view (src/daemon/version-check.ts, src/ports/npm-cli.ts) and a test in src/daemon/main-update.test.ts. That test checks that stopping a worker or gateway aborts the npm process run. The PR states this fixes the cleanup failure. The code evidence supports the abort behavior. It does not establish the EBUSY fix. The author did not run the Windows e2e test. The reviewer note states that dispose() aborts npm view but does not wait for the child process to exit. The folder lock can therefore persist after dispose() returns, so the cleanup race may remain. The test in gateway-fleet.e2e.test.ts is not changed by this PR. Whether the failing test passes is unknown from the available evidence.
Resolution
Provide evidence that gateway-fleet.e2e.test.ts passes on Windows with this PR applied, for example a CI run on the reviewed head. Alternatively, show that dispose() releases the npm process and its folder handles before the test cleanup runs, for example by awaiting child process exit. Then reassess.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: QUIET
Plan: Advanced
Run ID: c2541292-80ee-4458-9a45-952660ad6260
Commits
Reviewing files that changed from the base of the PR and between c550e87 and ca51051.
Files selected for processing: 3
src/daemon/main-update.test.ts
src/daemon/version-check.ts
src/ports/npm-cli.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
Not blocking, not verified. Each is one reviewer's claim.
code: src/daemon/version-check.ts:50 dispose aborts the npm view but does not wait for the child to exit; harmless, the runner kills it with SIGKILL and the fleet test retries the folder removal for 25 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1852
Status
Implement: done (1/1 green) Review: round 1 passed, 0 findings Hardware: n/a Gate: running
Next: gate
npm viewits version check is still waiting on —src/daemon/main-update.test.tspasses for both roles; the audit removedcontroller.abort()and the test failed onended: falseAssumptions
none
Review
Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 1 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 1.8M.
Runs: 6. Cost USD: 1.3526. Agent seconds: 775.
Assessment: complete
Written by an agent.