Repository navigation
Commit 8628e93
feat(daemon): the runtime owns its state and never the process (#3772)
* feat(daemon): the runtime reports its shutdown instead of exiting the process
startDaemonRuntime no longer calls process.exit or installs process
handlers; src/daemon.ts owns signals, fatal errors and the exit code.
close() is idempotent and resolves to a ShutdownReport. A runtime that
fails during startup rolls back what it acquired.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* feat(daemon): per-runtime state for admission, resolution, artifacts, uploads and requests
Provider admission, interactor resolution, artifact and upload tracking,
resumable uploads, materialized paths, session-open locks and request
cancellation are owned by the runtime instance instead of module scope.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* feat(daemon): per-runtime Apple runner state and a shared PNG worker
The Apple runner's sessions, locks, recycle ledger and owner state belong
to the daemon runtime that composed them. The PNG worker is held by every
runtime that uses it and stops with the last one.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* chore(daemon): drop re-exports nothing consumes yet
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(daemon): a failed shutdown step releases the rest, and dispose removes temp files
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(daemon): assert registration release on a failed close and share one removal helper
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(apple): scope start admissions, prep builds and bad-artifact marks to the runtime
Closing one daemon runtime no longer retires another runtime's start
admissions or signals its prep builds.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(move): keep daemon-runtime.ts under the size limit
The runtime context, the per-runtime state list and the session teardown
helpers move beside the other shutdown mechanics.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: drop the empty daemon-runtime imports left by the runtime-state migration
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: run the Limrun public HTTP test on the runtime shutdown contract
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(daemon): bound the runtime close and report work that outlives it
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(daemon): record abandoned requests in the daemon log and print unfinished shutdown work
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): report the close through one function the executable and its test share
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(android): own the snapshot-helper sessions, failed starts, retirements and shell probes per runtime
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* chore(layering): enumerate the Android helper runtime-state subpath beside Apple's runner-owner
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): split the plugin close into its budget race and its report
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: pin the close report beside the unfinished-work lines and drive the real entrypoint through a signal and an idle reap
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(android): keep the helper runtime state inside the adb module the helper already loads
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(android): export the per-runtime helper state from the adb host module, not a seventh subpath
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Merge origin/main and adapt to the platform host migration
* refactor(runtime): give the Android helper state to the root's slot store through the adb host port
The Android package declares only its slot keys; the root keeps the one slot store
(host-kit's defineRuntimeSlots) and binds its accessor into the host port. Daemon
composition registers the same store's handle without loading the Android mechanics, and a
composition test pins the registered handles.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(runtime): move Apple runner state and request-cancel onto defineRuntimeSlots
The maintainer accepted the one-module eager-closure addition for host-kit's runtime-slots.ts,
recorded as an approved closure addition (#3752) in the budget gate. The Android port drops the
unused disposer parameter.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): keep the five per-runtime daemon states in defineRuntimeSlots slots
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(gate): count an approved closure addition only when it is not a rename of a base module, and require its reason
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): take RuntimeStateHandle from host-kit's runtime-slots, not the request re-export
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(android): define the helper runtime slots in the adb host module, as Apple does for the runner
The root no longer keeps a store and binds its accessor into the adb host port.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* chore(layering): let daemon composition import the adb host module for the helper runtime state
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(android): drop the host stub the shell-protocol probe test no longer needs
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>1 parent 2819be4 commit 8628e93
79 files changed
Lines changed: 2247 additions & 787 deletions
File tree
- packages
- capture-kit/src
- contracts/src
- daemon/src
- __tests__/support
- core
- resources
- server
- __tests__
- http
- sessions
- session-lifecycle/internal
- host-kit
- src
- internal
- platform-android/src
- __tests__
- platform-apple/src
- core
- runner
- __tests__
- scripts
- __tests__
- layering
- src
- __tests__/test-utils
- test/integration/provider-scenarios
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
188 | 190 | | |
189 | | - | |
190 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
191 | 195 | | |
192 | | - | |
| 196 | + | |
193 | 197 | | |
194 | | - | |
195 | | - | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
198 | 211 | | |
199 | 212 | | |
200 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
| |||
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
416 | | - | |
417 | | - | |
| 418 | + | |
| 419 | + | |
418 | 420 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 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 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | | - | |
| 50 | + | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
42 | | - | |
| 54 | + | |
43 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
29 | | - | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
33 | | - | |
| 45 | + | |
34 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments