Skip to content

fix(daemon): a stopping daemon answers new connections with DAEMON_STOPPING - #1302

Merged
V3RON merged 3 commits into
mainfrom
bug/1301
Nov 5, 2026
Merged

V3RON merged 3 commits into
mainfrom
bug/1301

Conversation

@V3RON

@V3RON V3RON commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1301

Status

Implement: done (2/2 green) Review: passed, round 2 Hardware: n/a Gate: running
Next: gate

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 1.7M.
Runs: 10. Cost USD: 2.7204. Agent seconds: 1401.

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The daemon now accepts connections after stopping begins and rejects them once connection closing begins. Connections accepted during this window continue through existing dispatch gates. Tests cover DAEMON_STOPPING and daemon.stop during shutdown, plus late connections during failed-start release and shutdown token removal.

Suggested reviewers: leonardoxr, alcpereira

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 9594c

Connections can now reach the stopping gate until socket closure begins. A narrow late-connection race remains, but no merge-blocking issue was found.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@V3RON

V3RON commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: a1035d2
Round 2: 9594c4b

Runs: 10. Cost USD: 2.7204. Agent seconds: 1401.
Tokens input 198, output 46993, cache read 4160898, cache write 439715.
- build implementer: claude-sonnet-5-5 127 s $0.1493
- audit implementer: claude-sonnet-5-5 57 s $0.1302
- review 1 reviewer: claude-sonnet-5-5 389 s $0.1972
- replay-not 1 code both: claude-opus-5-5 282 s $1.244
- review 1 spec: claude-sonnet-5-5 24 s $0.1026
- review 1 claims: claude-sonnet-5-5 33 s $0.1331
- fix 1 implementer: claude-sonnet-5-5 286 s $0.2329
- review 2 reviewer: claude-sonnet-5-5 134 s $0.1934
- review 2 code tests: claude-opus-5-5 50 s $0.2255
- review 2 claims: claude-sonnet-5-5 19 s $0.1122
Finding outcomes: {"fixed":1}. Classes: {"testing 3":1}.
{"findings":[{"id":"R1","role":"code","class":"testing 3","outcome":"fixed","path":"src/daemon/server.ts","round":"1","fix":"9594c4b9010b2ec98cb249359c014c8a24e86e5d"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 5, 2026 11:10
@V3RON
V3RON merged commit bc9201e into main Nov 5, 2026
75 of 78 checks passed
@V3RON
V3RON deleted the bug/1301 branch November 5, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A stopping daemon closes new connections, so commands get DAEMON_CONNECTION_LOST, not the documented DAEMON_STOPPING

1 participant