Repository navigation
fix(daemon-client): wait for an acknowledged quiesce instead of killing the daemon - #3780
Conversation
…d of killing the daemon After the daemon answers draining, ensureDaemon waits up to 60 s for it to exit and release its registration. Signals are sent only to a daemon still running at the deadline that also fails its liveness probes; one that still answers fails with daemon-drain-timeout. Part of #3747, refs #3754 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 8 files
You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…hten drain tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
This PR is ready at 65b5043. The acknowledged-quiesce flow reads correctly, and all 17 checks pass at this commit. Not blocking, and you can take or leave these: (1) client-api.md should list the new I did not run the tests. The drain tests use a stand-in child process and a scripted HTTP server, so nothing here drains a real daemon of another version through Five bot threads are fixed at this head, so please resolve them: #3780 (comment) (leaver signals now asserted), #3780 (comment) (start-time guard), #3780 (comment) (identity-unverified mapped to drain timeout), #3780 (comment) (comment says four ways), #3780 (comment) (doc comments say identity unproven). Nothing blocks human review. The best next step is the docs update in note (1). |
|
…ment * origin/main: refactor(daemon): publish a single package entrypoint (#3781) fix(daemon-client): wait for an acknowledged quiesce instead of killing the daemon (#3780) fix(daemon): refuse leases for providers without a registered runtime (#3773) # Conflicts: # packages/daemon/src/sessions/handlers/__tests__/lease.test.ts # src/daemon-client/daemon-client-ensure.ts
…refactor/daemon-runtime-no-process-globals * origin/refactor/host-environment: refactor(cli): resolve one transport per run and one host per MCP tool call; default the lease provider cwd to the bound host refactor(daemon): publish a single package entrypoint (#3781) fix(daemon-client): wait for an acknowledged quiesce instead of killing the daemon (#3780) fix(daemon): refuse leases for providers without a registered runtime (#3773)
Part of #3747, references #3754.
After a daemon answered the authenticated quiesce with
draining,ensureDaemonstill calledretireDaemonForTakeover: SIGTERM, then SIGKILL after 3 s. On Windows SIGTERM ends the process outright, skipping plugin disposal, lease finalization and registration cleanup; on POSIX a healthy drain over 3 s was killed.Now the client signals nothing after
draining:stopDaemonProcessstill signals only a process whose command line is a daemon entry, so an embedded host is never signaled (feat(host): startAgentDevice() for embedder-owned daemons #3757 will register embedded ownership explicitly).daemon-drain-timeoutand a hint namingagent-device daemon stop.Tests use a virtual clock: a 5 s drain (past the old 3 s kill window) sees no signal, no signal arrives before the deadline, and a responsive daemon at the deadline is left running. Existing replace tests now let the stand-in daemon exit by itself after it answers.
ADR 0006 and the changelog are updated.
🤖 Generated with Claude Code