Repository navigation
Commit 2819be4
feat(host): capture HostEnvironment once at entry points (#3763)
* feat(host): capture HostEnvironment once at entry points
Add HostEnvironment to the kernel and captureHostEnvironment to host-kit.
The CLI, the daemon executable and the client factory capture it once;
startDaemonRuntime requires it and the request scope exposes it. Host-kit,
kernel and daemon-contracts no longer read the process environment or
working directory.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): resolve relative state dirs against the captured working directory
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): give platform code the command host instead of process reads
Platform packages may not read process; they take the environment and
working directory of the enclosing command host. Unit tests enter the live
process environment as their host.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): answer review of the host environment foundation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): keep the test host setup out of mutation scope and finish CLI env plumbing
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): bind the test command host per suite, not globally
The global setup made every test related to every mutated source. Suites
that reach host-reading code through neither a daemon request nor the
CLI bind a host with bindTestCommandHost().
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* chore(deps): declare test-kit in the HarmonyOS and Linux platform packages
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): bind the test command host in the stale-provider admission scenarios
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): resolve every client read from the client's host
createAgentDeviceClient's default transport, the daemon launch and the
CLI run's transport read the host the client was given, not the process.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): resolve the daemon policy path against the host working directory
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* style: format the daemon policy reuse test
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: merge the duplicate test-kit import in the handler chain routing test
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): start a launched daemon in the launching host's working directory
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: keep the registration-owner test under its size ratchet
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: merge the duplicate test-kit import in the stale provider admission scenarios
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): read configuration from the request host instead of the ambient scope
Handlers, claim writers and lease admission take the host (or its env) from the request
execution scope, runtime-owned timers take it at construction. commandHostEnvironment() stays
for command execution until the platform and root packages convert.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(daemon): drop the unused host from install-from-source and tighten test envs
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(cli): resolve one transport per run and one host per MCP tool call; default the lease provider cwd to the bound host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: pin the one-transport CLI run and one-host MCP call; document the bound host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: keep the failure that explains a missed materialization in the transport test
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): read the host cwd where the deploy handlers use it, leaving their shared prologue untouched
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: give the iOS recording scenario's daemon host the PATH and Swift cache its process already had
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: fail the transport test on an unexpected exit or throw and always remove its workspace
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: keep the scenario harness's state dir and transport out of reach of its env override
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(daemon): abandon a transient device claim under the same env that cleared it
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(host): read host settings from HostEnvironment in root src and remaining packages (#3775)
* refactor(host): thread the client host through remote artifact preparation and materialization
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(host): pass the composition's env to the platform runtime, diagnostics, toolchain and deployment hosts
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(host): refuse a relative provider app path that names no working directory
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(host): require the host's env and cwd where the CLI resolves options, binding and auth
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): keep the upload client suite under its size ratchet
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(host): pass the run's host to CLI command handlers
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): bind host-taking commands once in a shared helper
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* docs(changelog): resolveHubAppReference needs cwd for a relative app path
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): give the new handler suites a host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
* test: build the scenario gateway on the daemon host's env and pin the host claims directory on a failed release
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test: say which package still reads PATH from the process in the recording scenario
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(platforms): read host settings from HostEnvironment in platform and capture packages (#3777)
* refactor(capture-kit): read swift cache, app-log and PNG worker settings from the command host
The PNG worker starts with an empty environment and reports unavailability
through diagnostics instead of a process warning.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(provision-kit): read proxy settings from the command host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(react-native): read dev-server settings from the command host
The detached companion process starts with an explicit env and cwd, and its
process entry captures its host from its own spawn environment.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): run the dev-server helpers inside the client's and the SDK's host
The helpers moved from process reads to the command host, so the released
agent-device/metro functions and the client bind one at their boundary.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(platform-apple): give detached runner and bridge children an explicit env and cwd
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(platform-apple): read runner settings from the command host
The runner reaches the host through its port. The container bundle ids were
fixed at import time from the process environment; they are now resolved from
the host a caller passes in.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): run the daemon clean script's runner lease cleanup inside its own host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(host): hand leaf modules their environment instead of importing the command host
The eager-closure budgets forbid the host-kit command import in the install
source download, the app-log file policy and the Maestro HTTP helper, so their
callers pass the environment they already hold. Client tests that change PATH
give the client a host instead.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): bind the command host in the install-artifact suites
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(host): answer review of the platform host environment change
Redaction patterns come from the command host, the maestro child reads its
own environment without a working-directory lookup, local ~ install sources
expand against the host environment, and the runner launch resolves its host
inside the try that closes its log descriptor.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(react-native): take the host explicitly instead of reading the command host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(platforms): pass the host explicitly where a platform package reads configuration
Android install artifacts read the environment from the Android adb host port,
Apple install artifacts take it as an option from the root deployment executor,
and the Apple runner names its host port member hostEnvironment.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(daemon): hand the app-log marker the request host's environment
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(capture-kit): report an unavailable PNG worker in the first diagnostics scope that sees it
A startup pre-warm runs outside any scope, where the event is dropped; it no
longer latches the one-time report.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): share the test command host binding through test-kit and test the runner's bound host behaviorally
test-kit no longer depends on capture-kit: its app-log live-handle alias is
gone (callers use the capture-kit constructor) and its keyboard fixture builds
its own snapshot state. capture-kit's tests take the helper from test-kit.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(capture-kit): expose the app-log live handle adapter through its own entry
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(test-kit): build the test app-log handle without importing capture-kit
Replaces the capture-kit subpath entry, which grew the declared export surface.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(capture-kit): take the host explicitly for Swift cache and recording tooling
capture-kit no longer reads the command host, so its suites need no bound host
and its local test-host copy is gone; the root recording seams supply the host.
test-kit keeps depending on capture-kit again, and capture-kit does not depend on
test-kit.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(capture-kit): report a worker that dies under a request in that request
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(platform-android): take the install environment from the caller
The Android adb host port's environment is bound at module load, so a host
whose environment differs from the process's got the process's proxy settings
on a network install.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(platform-apple): pin the detached snapshot bridge's starting directory
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(capture-kit): fail when the pre-warm starts no worker to kill
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): keep the provider scenario host's Swift cache directory for scenarios that set it on the process
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(capture-kit): key the cached Swift helper paths on the host they were built for
The video validator is cached per Swift cache root and the overlay scripts per
working directory, so a second host does not reuse the first host's paths.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): give the Android recording scenarios their host env through the harness
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): scenarios name their own host env; the harness no longer forwards the process's Swift cache
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(host): drop the iOS recording scenario's process-env block now that capture-kit takes the host
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
* test: pass the host to the iOS e2e live runner's request
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(react-native): drop the redundant outer catch around the scoped Metro session read; changelog the PNG worker change
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(capture-kit): report an unavailable PNG worker in every scope that takes the fallback; the daemon pre-warms it inside a daemon diagnostics scope
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* refactor(capture-kit): report each PNG worker transition to unavailable once, through a daemon-registered sink with a typed reason
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>1 parent f2e60e9 commit 2819be4
479 files changed
Lines changed: 5324 additions & 1820 deletions
File tree
- packages
- capture-kit/src
- capture-admission
- recording
- __tests__
- daemon-contracts/src
- daemon
- src
- __tests__/support
- core
- __tests__
- execution
- __tests__
- handlers/__tests__
- resources
- __tests__
- device
- __tests__
- server
- __tests__
- http
- sessions
- __tests__
- replay-maestro
- replay-repair
- replay-suite
- handlers
- __tests__
- session-lifecycle
- __tests__
- internal
- __tests__
- session-observability
- __tests__
- internal
- __tests__
- test/nightly/concurrency-torture
- device-selection/src
- host-kit/src
- internal
- kernel/src
- maestro/src/daemon-port
- __tests__
- platform-android/src
- __tests__
- platform-apple/src
- __tests__
- core
- __tests__
- os/macos
- runner
- __tests__
- snapshot-source
- platform-harmonyos
- src
- __tests__
- platform-linux
- src
- __tests__
- platform-vega/src
- platform-web/src
- __tests__
- provider-webdriver/src
- provision-kit/src
- react-native/src
- companion
- metro
- remote/src
- __tests__
- replay-port/src/daemon-port
- test-kit/src
- scripts
- src
- __tests__
- daemon-composition
- test-utils
- cli
- commands
- __tests__
- connection
- replay-test
- commands
- management
- recording/runtime
- core
- daemon-client
- __tests__
- mcp
- __tests__
- sdk
- test
- integration
- ios-simulator-e2e
- live-device-e2e
- provider-scenarios
- support
- wire-compat
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 | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 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 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | | - | |
42 | | - | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
| 83 | + | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| |||
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
105 | | - | |
| 104 | + | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
| 108 | + | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
| 112 | + | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
118 | | - | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
179 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
187 | 198 | | |
188 | 199 | | |
189 | 200 | | |
| |||
| 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 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments