Repository navigation
refactor(daemon): resolve configuration from the owning runtime host - #3826
Conversation
… not the process (#3753) Every daemon and session-journal module that read `process.env` or `process.cwd()` now takes the runtime `HostEnvironment` its owner already holds. `SessionStore` receives the host at construction and hands its cwd to `SessionScriptWriter`, the recorder, and the replay coordinator; the event-log cap, idle-reap window, and session-idle expiry take their env as a required parameter; the HTTP server's env and cwd are required options and reach the download-archive spawn explicitly. No behavior changes: the daemon always passed exactly these values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The D-pad fixture does not model IME registration. Explicitly opt out so building Android artifacts cannot turn this scenario into an unrelated helper readiness wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
Pass explicit source files so progress event expectations do not depend on native directory enumeration order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Coverage follow-up: |
File creation precedes the shell write, so poll the expected cwd evidence rather than file existence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Second coverage fix: |
|
The code looks ready at 288e6cc. I found no problems in the change. Configuration now resolves from the owning runtime host, and I saw no change in behavior. Not blocking: SessionStore now exposes a public CI on 288e6cc is still running: 8 jobs are queued or in progress, including Coverage, Integration Tests, Smoke and Repo Guards, and none has failed yet. The latest head only changes the apple I did not run the tests or |
|
Summary
Part of #3753. Part of #3747.
Pass the runtime host through SessionStore, session journals, artifact paths, idle expiry, HTTP setup, and daemon callers. Remove daemon ambient configuration reads. Required caller and test plumbing touches 136 files (2,087 gross lines). The TV remote fixture explicitly disables unrelated IME setup so building Android artifacts does not exhaust its test timeout.
Bottom layer of daemon → replay/device-selection → runtime → commands → R86. #3823 remains the top gate PR. Rebased onto
a661e43d83, including #3818 and #3820.The progress fixture now passes explicitly ordered files instead of assuming directory enumeration order.
Validation
Head
288e6cceaec5d2e52fd619499465aec6e1f429a4.pnpm check:affected --run --head 288e6cceaec5d2e52fd619499465aec6e1f429a4passed; receiptrun-0o0t8g,exactCommit=true.Coverage failures were fixture races:
7e2cae20edreplaces a directory-order assumption with explicit files;288e6cceaewaits for bridge evidence contents rather than file creation. Both fixes are inherited by all layers. Upper patches are unchanged by range-diff.Prior full-check and Android daemon/provider evidence stays attributed to
e223d37244in #3823’s review-response comment. This round changes only test fixtures and ancestry. Full coverage and GitHub-owned lanes remain CI obligations.