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
main-update.test.ts and main-stop.test.ts start standalone workers on the default HTTP port 4701 and fail with EADDRINUSE beside other daemon test files #1417
Two more daemon tests start a standalone worker with HTTP at the default 127.0.0.1:4701 (ADR 0046), so they fail with EADDRINUSE beside any other file that binds 4701:
src/daemon/main-stop.test.ts:692: options() (line 668) sets no configOverrides at all.
Holding 4701 with a plain listener and running pnpm exec vitest run --project unit src/daemon src/agent-device src/leasing src/gateway src/cli src/core:
FAIL src/daemon/main-stop.test.ts > startDaemon gateway uplink when the socket claim fails > never dials the gateway when the worker's socket is already claimed
FAIL src/daemon/main-update.test.ts > startDaemon version check > a daemon runs the version check at start without delaying ready, ...
Error: listen EADDRINUSE: address already in use 127.0.0.1:4701
pnpm exec vitest run --project unit src/daemon/main-update.test.ts src/daemon/main-stop.test.ts
main-update.test.ts:
"the test start helpers start gateways while port 4700 is taken and workers with update overrides while port 4701 is taken"
Expected ["started", "started"]
Received ["started", "Error: listen EADDRINUSE: address already in use 127.0.0.1:4701"]
main-stop.test.ts:
"starts the socket holder while port 4701 is taken and never dials the gateway when the worker's socket is already claimed"
expect(first).resolves.toBeDefined() rejects with EADDRINUSE at 127.0.0.1:4701
2 failed | 21 passed (23)
Root cause
Defect in test setup, not daemon behavior. src/daemon/main-update.test.ts:62 spreads overrides after STANDALONE_OFF; the update-only config at line 329 replaces those defaults. src/daemon/main-stop.test.ts:670-673 omits config for the first, standalone worker. Both therefore inherit HTTP enabled on 4701 (src/core/config.ts:876-878). ADR 0046 requires that production default and tells test harnesses to disable unneeded HTTP and agent-device.
Simplest fix
Merge overrides.configOverrides onto the role-specific test defaults in startChecked, after spreading other options. In the uplink fixture, always set configOverrides with STANDALONE_OFF, adding gateway config when supplied.
Temporarily applied both changes, then removed them. The same command passed all 23 tests; after removal, both named failures returned. Only reproduction changes were pushed.
PR #1444 is ready on 66b0cf6ff21ddb24e54983d9c04e83f85528f575. Preserved triage regressions; 23/23 daemon tests pass. Fresh audit, independent review and hardware applicability completed. No blocking findings; slow lane not applicable. Review ledger, checklist evidence and Status are posted.
Not done
Merge through .agents/scripts/merge-pr.sh 1444 after all checks settle green. Final body edits and ready transition triggered pending checks; the gate was not started.
Findings
R1 was rejected by an Opus/high occupied-port probe: the gateway-connected worker rejects on the socket claim, not HTTP binding. No public surface or docs change. Review cap used: round 1 only.
Blocked on
Nothing requiring maintainer intervention. This is a checks-wait transfer to the parent: watch PR #1444, inspect new failures if any, then run the gate without a waiting loop. Claim released for resumption.
Activity
V3RON commentedon Nov 7, 2026
Reproduction
Confirmed both test-fixture defects on
origin/main(fc5ac8c3). Extended existing tests; no hardware needed.Repro:
bug/1417-repro,57aeead186bf54c7826072fa55eb9905f9617f4c.Root cause
Defect in test setup, not daemon behavior.
src/daemon/main-update.test.ts:62spreadsoverridesafterSTANDALONE_OFF; the update-only config at line 329 replaces those defaults.src/daemon/main-stop.test.ts:670-673omits config for the first, standalone worker. Both therefore inherit HTTP enabled on 4701 (src/core/config.ts:876-878). ADR 0046 requires that production default and tells test harnesses to disable unneeded HTTP and agent-device.Simplest fix
Merge
overrides.configOverridesonto the role-specific test defaults instartChecked, after spreading other options. In the uplink fixture, always setconfigOverrideswithSTANDALONE_OFF, adding gateway config when supplied.Temporarily applied both changes, then removed them. The same command passed all 23 tests; after removal, both named failures returned. Only reproduction changes were pushed.
Alternatives rejected
Risk
Fast track
Written by an agent.
docs(daemon): the gateway-port why sits on the configOverrides it exp…
V3RON commentedon Nov 7, 2026
Handoff
Done
PR #1444 is ready on
66b0cf6ff21ddb24e54983d9c04e83f85528f575. Preserved triage regressions; 23/23 daemon tests pass. Fresh audit, independent review and hardware applicability completed. No blocking findings; slow lane not applicable. Review ledger, checklist evidence and Status are posted.Not done
Merge through
.agents/scripts/merge-pr.sh 1444after all checks settle green. Final body edits and ready transition triggered pending checks; the gate was not started.Findings
R1 was rejected by an Opus/high occupied-port probe: the gateway-connected worker rejects on the socket claim, not HTTP binding. No public surface or docs change. Review cap used: round 1 only.
Blocked on
Nothing requiring maintainer intervention. This is a checks-wait transfer to the parent: watch PR #1444, inspect new failures if any, then run the gate without a waiting loop. Claim released for resumption.
Written by an agent.
V3RON commentedon Nov 7, 2026
Delivery run
Merged: none.
Parked: none.
Waiting: #1417 — PR #1444 final metadata checks; ready, reviewed, no blocking findings. Parent resumes the gate after checks pass.
Decided: none.
Written by an agent.
V3RON commentedon Nov 7, 2026
Delivery run
Merged: #1444 (#1417).
Parked: none.
Waiting: none.
Decided: none.
Written by an agent.
fix(daemon): test fixtures keep role defaults when overrides are given (
chore(agents): a bug run is held only by a live claim, and every tria…