Repository navigation
feat(daemon): the runtime owns its state and never the process #3772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thymikee
merged 49 commits into
refactor/host-environment
from
refactor/daemon-runtime-no-process-globals
Oct 18, 2026
+2,247
−787
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
05be6bf
feat(daemon): the runtime reports its shutdown instead of exiting the…
thymikee 5789838
feat(daemon): per-runtime state for admission, resolution, artifacts,…
thymikee 9793a87
feat(daemon): per-runtime Apple runner state and a shared PNG worker
thymikee 0b83711
chore(daemon): drop re-exports nothing consumes yet
thymikee c3baaec
fix(daemon): a failed shutdown step releases the rest, and dispose re…
thymikee c047776
fix(daemon): assert registration release on a failed close and share …
thymikee 22cea00
fix(apple): scope start admissions, prep builds and bad-artifact mark…
thymikee 5c98812
refactor(move): keep daemon-runtime.ts under the size limit
thymikee 817930f
chore: merge the host environment foundation into the runtime state b…
thymikee 012b50d
Merge branch 'refactor/host-environment' into refactor/daemon-runtime…
thymikee 2f29e99
test: drop the empty daemon-runtime imports left by the runtime-state…
thymikee 5b26ca3
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 7eedaf6
test: run the Limrun public HTTP test on the runtime shutdown contract
thymikee 1a86a19
fix(daemon): bound the runtime close and report work that outlives it
thymikee 7b90408
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee b29df19
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 3aa6def
fix(daemon): record abandoned requests in the daemon log and print un…
thymikee 5a20a1c
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee be191a3
refactor(daemon): report the close through one function the executabl…
thymikee fff0337
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 794c048
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 4ab64cc
Merge branch 'refactor/host-environment' into refactor/daemon-runtime…
thymikee 9c64e47
refactor(android): own the snapshot-helper sessions, failed starts, r…
thymikee 418b072
chore(layering): enumerate the Android helper runtime-state subpath b…
thymikee e445455
Merge remote-tracking branch 'origin/main' into refactor/daemon-runti…
thymikee 29f3e33
refactor(daemon): split the plugin close into its budget race and its…
thymikee db08148
Merge commit 'db55a5dfbd' into refactor/daemon-runtime-no-process-glo…
thymikee b7a9d15
test: pin the close report beside the unfinished-work lines and drive…
thymikee 631d640
Merge commit 'd8a9bd40c0' into refactor/daemon-runtime-no-process-glo…
thymikee 2f4e815
refactor(android): keep the helper runtime state inside the adb modul…
thymikee 8539b30
refactor(android): export the per-runtime helper state from the adb h…
thymikee 0b2939c
Merge commit '870cf663c4' into refactor/daemon-runtime-no-process-glo…
thymikee 2568e52
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee f8251da
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 45458ef
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee d6ba2d9
Merge remote-tracking branch 'origin/main' into refactor/daemon-runti…
thymikee d5682c7
Merge origin/main and adapt to the platform host migration
thymikee b6fd554
refactor(runtime): give the Android helper state to the root's slot s…
thymikee 5a8f1cd
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 3ef9ace
refactor(runtime): move Apple runner state and request-cancel onto de…
thymikee 967dcc7
refactor(daemon): keep the five per-runtime daemon states in defineRu…
thymikee 0658db9
fix(gate): count an approved closure addition only when it is not a r…
thymikee 66f0b27
refactor(daemon): take RuntimeStateHandle from host-kit's runtime-slo…
thymikee 70c901d
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee d9ff517
refactor(android): define the helper runtime slots in the adb host mo…
thymikee d932926
chore(layering): let daemon composition import the adb host module fo…
thymikee 029e82d
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee 1c18440
test(android): drop the host stub the shell-protocol probe test no lo…
thymikee c58e2b0
Merge remote-tracking branch 'origin/refactor/host-environment' into …
thymikee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import fs from 'node:fs'; | ||
| import path from 'node:path'; | ||
| import { expect, test } from 'vitest'; | ||
| import { mkdtempForTestSync } from '@agent-device/test-kit'; | ||
| import { | ||
| createArtifactTrackingRuntimeState, | ||
| trackDownloadableArtifact, | ||
| trackUploadedArtifact, | ||
| } from './artifact-tracking.ts'; | ||
|
|
||
| test('disposing a runtime removes the temporary files it still tracks', () => { | ||
| const root = mkdtempForTestSync('agent-device-artifact-dispose-'); | ||
| const artifactPath = path.join(root, 'artifact.txt'); | ||
| const uploadDir = path.join(root, 'upload'); | ||
| fs.writeFileSync(artifactPath, 'artifact'); | ||
| fs.mkdirSync(uploadDir); | ||
| fs.writeFileSync(path.join(uploadDir, 'payload'), 'payload'); | ||
| const runtime = createArtifactTrackingRuntimeState(); | ||
|
|
||
| runtime.run(() => { | ||
| trackDownloadableArtifact({ | ||
| artifactPath, | ||
| artifactType: 'runtime-artifact', | ||
| fileName: 'artifact.txt', | ||
| }); | ||
| trackUploadedArtifact({ artifactPath: path.join(uploadDir, 'payload'), tempDir: uploadDir }); | ||
| }); | ||
| runtime.dispose(); | ||
|
|
||
| expect(fs.existsSync(uploadDir)).toBe(false); | ||
| expect(fs.existsSync(artifactPath)).toBe(false); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.