Skip to content

Commit 70c901d

Browse files
committed
Merge remote-tracking branch 'origin/refactor/host-environment' into refactor/daemon-runtime-no-process-globals
* origin/refactor/host-environment: refactor(react-native): drop the redundant outer catch around the scoped Metro session read; changelog the PNG worker change
2 parents 66f0b27 + 4f6dd3e commit 70c901d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- The PNG worker no longer calls `process.emitWarning` when it is unavailable, and it starts with an empty environment (`env: {}`). The unavailable reason is reported once as the `png_worker_unavailable` diagnostic, by the first request that reaches the in-process fallback, instead of also printing a process warning at daemon startup.
56
- Behavior change: `resolveHubAppReference`, shipped through `agent-device/plugins/webdriver`, now needs `cwd` to resolve a relative app path. Without it the call fails with `INVALID_ARGS` and `details.reason: provider_app_cwd_missing`; it used to resolve against the process's working directory. Absolute paths, URLs and provider references are unaffected. The daemon fills it from the client's working directory (or its host's) for every provider lease request, so `connect` and `lease_allocate` are unchanged.
67
- The `daemon-not-running` hint now always names `--state-dir <dir>`, and a daemon force-retired for outlasting its drain is reported as `Replaced unreachable daemon` instead of `Replaced idle daemon`. `daemon-drain-timeout` and the post-drain force retire are documented in the client API and `help`.
78
- Fix `ensureDaemon()`, the CLI and MCP killing a daemon they had just asked to leave. After the daemon answers the quiesce request with `draining`, the client now waits up to 60 s for it to exit by itself and clean up its registration, so plugin disposal and lease finalization finish (on Windows a signal ends the process outright, and on POSIX a drain longer than 3 s was killed). A daemon still running at the deadline that fails its liveness probes is force-retired; one that still answers is left running and the call fails with `details.reason: 'daemon-drain-timeout'`, with a hint naming `agent-device daemon stop --state-dir <path>`.

‎packages/react-native/src/metro/metro-session-hints.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ function readScopedMetroSessionRuntime(scope: MetroSessionScope): SessionRuntime
123123
export function readMetroSessionRuntime(
124124
options: MetroSessionOptions,
125125
): SessionRuntimeHints | undefined {
126+
let scope: MetroSessionScope;
126127
try {
127-
return readScopedMetroSessionRuntime(resolveMetroSessionScope(options));
128+
scope = resolveMetroSessionScope(options);
128129
} catch {
129130
return undefined;
130131
}
132+
return readScopedMetroSessionRuntime(scope);
131133
}
132134

133135
function runtimeServerUrl(runtime: SessionRuntimeHints | undefined): string | undefined {

0 commit comments

Comments
 (0)