Skip to content

fix(interceptors): settle a daemon request when the daemon closes unanswered - #111

Open
moise10r wants to merge 2 commits into
mainfrom
fix/19-a-daemon-that-closes-without-replying
Open

moise10r wants to merge 2 commits into
mainfrom
fix/19-a-daemon-that-closes-without-replying

Conversation

@moise10r

@moise10r moise10r commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What this changes

A daemon that closed without replying left the request pending on an unref'd timer. The wrapper could then exit 0 without writing its ledger row. The request now settles with null on end or close, after reading a final reply that has no trailing newline.

How it was verified

packages/interceptors/test/daemon-client.test.ts covers three cases:

  • A daemon that closes without replying.
  • A reply without a trailing newline, followed by close.
  • No socket file at all.

Only the no-socket case could run here. The two server-backed cases need a Unix socket and must be confirmed in CI.

Fixes #19

Checklist

  • pnpm format && pnpm typecheck && pnpm test && pnpm deadcode all pass
  • Behaviour change ships with a test
  • No any, no magic values, no console.* outside cli-output.ts
  • If this touches the decision path: still deterministic — no LLM, network, or randomness
  • If this changes a verb table: the classes that moved are named above (not applicable)
  • If this changes a command, flag or file it writes: docs/ says so (not applicable)

This branch has not been deployed

No deployments
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.

daemon-client: a daemon that closes without replying can make the wrapper exit with the wrong status

1 participant