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
Daemon tests that start a daemon without an npm fake ask the real npm registry for simlock@latest #1885
`startDaemon` builds a real `NodeNpmCli` when `options.npm` is not passed (src/daemon/main.ts:315), and `update.check` defaults to true (src/core/config-defaults.ts:97). So every test that starts a daemon without `npm` or `update: { check: false }` spawns `node npm-cli.js view simlock@latest version` against the registry, in its temp data directory. Files that do this include src/daemon/gateway-fleet.e2e.test.ts, main-stop.test.ts, main-leasing.test.ts, main.test.ts and about 15 more (`grep -L npm` over the test files that call `startDaemon(`).
The unit and e2e lanes then depend on the network, and each such test leaves a child process running for up to 30 s. Found while triaging #1852.
Confirmed, with one correction: a daemon on MemoryFilesystem (most of main-stop, main-leasing) fails NodeNpmCli's script lookup before it spawns, so it asks nothing. Real npm view runs come from daemons on NodeFilesystem: 104 in one unit run of src/daemon, src/agent-device, src/cli and neighbours, and every e2e-lane daemon. Two tests on bug/1885-repro:
pnpm exec vitest run --project unit src/daemon/test-rigs-npm.test.ts
× the shared daemon test rigs > start daemons whose version check runs no real npm CLI
AssertionError: expected [ [ 'simlock@latest' ], …(1) ] to deeply equal []
pnpm test:e2e e2e/update-check-registry.test.ts
× the e2e lane's daemons > ask no npm registry for the latest Simlock, worker and gateway alike
AssertionError: expected [ '/simlock', '/simlock' ] to deeply equal []
The e2e test points npm_config_registry at a local server that records each request.
Root cause
Defect, in the test rigs. src/daemon/main.ts:314 builds a real NodeNpmCli when npm is not passed, and update.check is on by default. The rigs pass neither: src/daemon/test-main.tsstart/startGateway, src/daemon/test-relay-support.ts:159startWorker, five direct startDaemon calls, and e2e/helpers/env.ts:231seedConfig, which writes no update key for either role.
Simplest fix
test-main.ts: export noRegistry(), a FakeNpmCli whose view answers { ok: false } (what memory-filesystem rigs already get). Pass npm: noRegistry() before the caller's options in start, startGateway, startWorker and the direct calls (main.test.ts:491, remote-client.e2e, session-path.e2e, main-state-dblaunch, gateway-fleet.e2estartWorker as options.npm ?? noRegistry()).
e2e/helpers/env.ts: seed update: { check: false } for both roles.
8 files, 25 lines. Tried: both reproductions pass. 258 unit files green, zero real npm view runs. 7 e2e files green.
Alternatives rejected
update: { check: false } in the unit rigs: it breaks 4 tests in main-update and gateway-fleet that pass their own npm.
A unit setup file that stubs NodeNpmCli.prototype.view: it hides the real adapter from npm-cli.test.ts.
npm_config_offline in the setup files: a child is still spawned per daemon.
Risk
A new startDaemon call in a test with NodeFilesystem and no npm brings the bug back. Nothing guards against it.
A gateway e2e daemon with driver: "none" now gets a config file (update only).
Scope: this fix covers the unit and e2e lanes, and the Playwright console lane (e2e/console/fixtures.ts) and the real-proxy lane (e2e/real-proxy/lane.ts) too, in PR #1889. Each has a check that it does not ask npm. The maintainer reversed the first choice, which left the last two lanes out (2026-11-30: #1885 (comment)).
Tests: src/daemon/test-rigs-npm.test.ts and e2e/update-check-registry.test.ts pin the unit and e2e lanes, e2e/console/update-check.test.ts the console lane, e2e/real-proxy/lane.test.ts the real-proxy lane.
Done: fix in PR #1889 (head 08c0ced): test rigs pass a noRegistry() npm fake, and the e2e env seeds update.check: false. Both reproduction tests pass. The audit probed both tests and found them red without the fix. Console and real-proxy lanes left out (see ## Decision).
Not done: review. Round 1 came back Assessment: incomplete: the reviewer started no spec, code or claims lens. It found no defect on its own read. e2e/update-check-registry.test.ts was not run by the reviewer.
Findings: none raised.
Blocked on: a full review round 1 with all three lenses. Re-run /deliver #1885 (it resumes at review), or review PR #1889 by hand.
Done: PR #1889 at 1353d6e covers the unit, e2e, console and real-proxy lanes. Review complete: round 1 (spec, code, claims), round 2 and fix-check (code, claims); every finding is closed. The PR is ready and mergeable.
Not done: the merge. CI on 1353d6e ended red on Static checks and Quality: a format error from main (#1846), fixed there by #1963. On 2026-11-30 the maintainer lifted the hold; main was merged in (54eae5cd1, own diff unchanged) and the gate started again.
Findings: the review inputs do not carry ## Decision comments, so the spec lens called the wider scope unrequested.
Blocked on: the maintainer. held: PR #1889 changes 286 lines, over 250; PR #1889 changes 18 files, over 8; PR #1889 has a "Decision taken" comment. The maintainer merges the PR, or removes fast-track and sets bug:ready.
Activity
V3RON commentedon Nov 26, 2026
Reproduction
Confirmed, with one correction: a daemon on
MemoryFilesystem(most ofmain-stop,main-leasing) failsNodeNpmCli's script lookup before it spawns, so it asks nothing. Realnpm viewruns come from daemons onNodeFilesystem: 104 in one unit run ofsrc/daemon,src/agent-device,src/cliand neighbours, and every e2e-lane daemon. Two tests onbug/1885-repro:The e2e test points
npm_config_registryat a local server that records each request.Root cause
Defect, in the test rigs.
src/daemon/main.ts:314builds a realNodeNpmCliwhennpmis not passed, andupdate.checkis on by default. The rigs pass neither:src/daemon/test-main.tsstart/startGateway,src/daemon/test-relay-support.ts:159startWorker, five directstartDaemoncalls, ande2e/helpers/env.ts:231seedConfig, which writes noupdatekey for either role.Simplest fix
test-main.ts: exportnoRegistry(), aFakeNpmCliwhoseviewanswers{ ok: false }(what memory-filesystem rigs already get). Passnpm: noRegistry()before the caller's options instart,startGateway,startWorkerand the direct calls (main.test.ts:491,remote-client.e2e,session-path.e2e,main-state-dblaunch,gateway-fleet.e2estartWorkerasoptions.npm ?? noRegistry()).e2e/helpers/env.ts: seedupdate: { check: false }for both roles.8 files, 25 lines. Tried: both reproductions pass. 258 unit files green, zero real
npm viewruns. 7 e2e files green.Alternatives rejected
update: { check: false }in the unit rigs: it breaks 4 tests inmain-updateandgateway-fleetthat pass their ownnpm.NodeNpmCli.prototype.view: it hides the real adapter fromnpm-cli.test.ts.npm_config_offlinein the setup files: a child is still spawned per daemon.Risk
startDaemoncall in a test withNodeFilesystemand nonpmbrings the bug back. Nothing guards against it.driver: "none"now gets a config file (updateonly).Fast track
Written by an agent.
docs(e2e): the standalone-off why comment sits above its own constant (…
V3RON commentedon Nov 26, 2026
Decision
Scope: this fix covers the unit and e2e lanes, and the Playwright console lane (
e2e/console/fixtures.ts) and the real-proxy lane (e2e/real-proxy/lane.ts) too, in PR #1889. Each has a check that it does not ask npm. The maintainer reversed the first choice, which left the last two lanes out (2026-11-30: #1885 (comment)).Tests:
src/daemon/test-rigs-npm.test.tsande2e/update-check-registry.test.tspin the unit and e2e lanes,e2e/console/update-check.test.tsthe console lane,e2e/real-proxy/lane.test.tsthe real-proxy lane.Written by an agent.
V3RON commentedon Nov 26, 2026
Handoff
Done: fix in PR #1889 (head 08c0ced): test rigs pass a
noRegistry()npm fake, and the e2e env seedsupdate.check: false. Both reproduction tests pass. The audit probed both tests and found them red without the fix. Console and real-proxy lanes left out (see## Decision).Not done: review. Round 1 came back
Assessment: incomplete: the reviewer started no spec, code or claims lens. It found no defect on its own read.e2e/update-check-registry.test.tswas not run by the reviewer.Findings: none raised.
Blocked on: a full review round 1 with all three lenses. Re-run
/deliver #1885(it resumes at review), or review PR #1889 by hand.Written by an agent.
V3RON commentedon Nov 26, 2026
Delivery run
Merged: none
Parked: #1885 — review round 1 incomplete, no lens ran (PR #1889)
Decided: #1885 — fix console and real-proxy lanes too? → left out
Written by an agent.
7 remaining items
docs(e2e): withDaemon keeps its own doc comment (#1885)
test(e2e): the registry tests stop every daemon they start and bind f…
test(e2e): the lane gateways retry a lost port by the daemon log's EA…
V3RON commentedon Nov 30, 2026
Handoff
Done: PR #1889 at
1353d6ecovers the unit, e2e, console and real-proxy lanes. Review complete: round 1 (spec, code, claims), round 2 and fix-check (code, claims); every finding is closed. The PR is ready and mergeable.Not done: the merge. CI on
1353d6eended red on Static checks and Quality: a format error from main (#1846), fixed there by #1963. On 2026-11-30 the maintainer lifted the hold; main was merged in (54eae5cd1, own diff unchanged) and the gate started again.Findings: the review inputs do not carry
## Decisioncomments, so the spec lens called the wider scope unrequested.Blocked on: the maintainer.
held: PR #1889 changes 286 lines, over 250; PR #1889 changes 18 files, over 8; PR #1889 has a "Decision taken" comment.The maintainer merges the PR, or removesfast-trackand setsbug:ready.Written by an agent.
V3RON commentedon Nov 30, 2026
Delivery run
Merged: none
Parked: #1885 — held by the fast track, PR #1889 reviewed and ready
Decided: none
Written by an agent.
V3RON commentedon Nov 30, 2026
Delivery run
Merged: #1889 (#1885)
Parked: none
Decided: none
Written by an agent.
fix(daemon): test rigs start daemons whose version check asks no npm …