Repository navigation
Commit 203aebb
committed
fix(daemon): wait for a slow daemon startup and fail with typed reasons
A client killed a healthy daemon that was still starting: the local
startup used one 15 s wall-clock deadline, and a timeout never retried.
On an overloaded host that is a failed run before any work starts
(#3782, failure class #3342).
- startLocalDaemon now waits while the spawned daemon stays alive, up to
a 120 s ceiling; AGENT_DEVICE_DAEMON_STARTUP_TIMEOUT_MS overrides it
for the CLI, MCP, and Node client alike.
- The daemon records startup phase markers (modules-loaded,
lock-acquired, listening, registered) with timestamps in
daemon-startup-phases.jsonl beside its registration. A live daemon
that publishes no marker for 60 s is retired as stalled; one that
keeps progressing is waited for to the ceiling.
- Failure details carry reason (startup-exited, startup-stalled,
startup-ceiling), the observed phase timings, and the effective
startupTimeoutMs. Each reason has its own hint.
- help commands documents the variable and the three reasons.1 parent 0fb25c4 commit 203aebb
8 files changed
Lines changed: 630 additions & 26 deletions
File tree
- packages
- daemon-contracts/src
- daemon/src/server/http
- src
- commands/schema
- daemon-client
- __tests__
- website/docs/docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
49 | 128 | | |
50 | 129 | | |
51 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
660 | 662 | | |
661 | 663 | | |
662 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
663 | 669 | | |
664 | 670 | | |
665 | 671 | | |
| |||
752 | 758 | | |
753 | 759 | | |
754 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
755 | 764 | | |
| 765 | + | |
756 | 766 | | |
757 | 767 | | |
758 | 768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
| 515 | + | |
511 | 516 | | |
512 | 517 | | |
513 | 518 | | |
| |||
0 commit comments