Skip to content

refactor(replay): pass runtime hosts through replay and device selection - #3827

Merged
thymikee merged 1 commit into
chore/process-globals-daemonfrom
chore/process-globals-replay
Oct 19, 2026
Merged

thymikee merged 1 commit into
chore/process-globals-daemonfrom
chore/process-globals-replay

Conversation

@thymikee

@thymikee thymikee commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Part of #3753. Part of #3747.

Pass the owning host and explicit environment through replay-port, maestro, ad-script, plugins, and device selection. Required daemon callers and fixtures are included: 68 files, 816 gross lines.

Second layer, based on #3826. #3823 remains the top gate layer. The rebase preserves the original cleanup changes and includes #3818/#3820 from main.

Validation

Head efb97886892ab3342970a2560883e34dd82d22e1.

pnpm check:affected --run --base chore/process-globals-daemon --head efb97886892ab3342970a2560883e34dd82d22e1 passed; receipt run-sfbw1g, exactCommit=true.

Coverage failures were fixture races: 7e2cae20ed replaces a directory-order assumption with explicit files; 288e6cceae waits 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 e223d37244 in #3823’s review-response comment. This round changes only test fixtures and ancestry. Full coverage and GitHub-owned lanes remain CI obligations.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.44 MB 5.44 MB +769 B
Package (unpacked) 5.44 MB 5.44 MB +769 B
Package (download) 1.64 MB 1.64 MB +292 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 30.6 ms 32.6 ms +1.9 ms
CLI --help 56.2 ms 56.6 ms +0.4 ms

@thymikee
thymikee added this pull request to stack #3830 October 19, 2026 16:29
@thymikee
thymikee force-pushed the chore/process-globals-replay branch from fd0dde1 to 51d5a75 Compare October 19, 2026 16:55
@thymikee

Copy link
Copy Markdown
Member Author

Coverage follow-up: 7e2cae20ed fixes the daemon progress fixture by passing explicit files; the failing assertion assumed filesystem directory order. Restacked this unchanged replay patch to 51d5a75793; range-diff is identical. Foreground check:affected passed at 51d5a75793 (run-cdxM2Z, exactCommit=true). CI is running on the pushed head.

…tion (#3753)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee
thymikee force-pushed the chore/process-globals-replay branch from 51d5a75 to efb9788 Compare October 19, 2026 17:25
@thymikee

Copy link
Copy Markdown
Member Author

Second coverage fix: 288e6cceae polls the detached bridge’s expected cwd contents; the shell creates the evidence file before writing it, and CI read an empty file (run 39289751890). Head efb9788689 inherits both this fix and 7e2cae20ed; upper-layer range-diff is unchanged. Foreground check:affected passed (run-sfbw1g, exactCommit=true). Cold self-review found no issue in the test-only diff. CI is running on this head.

@thymikee

Copy link
Copy Markdown
Member Author

The code in efb9788 looks ready: I found no problems that need a change before merge, and I did not run the tests myself. CI on this head was still pending when I looked, so Integration, Coverage and Smoke must finish green, since they exercise the replay, device-selection and daemon handler routes this PR touches. There are no conflicts. I did not review the stacked base #3826, which supplies sessionStore.host and the handler host, so #3826 must land first; I assumed both carry the same daemon host environment, based on the reads in request-router.ts. Live device evidence is not needed, because the env value is unchanged. Not blocking, and you can take or leave these: the updated tests all pass process.env as the host env, so a wrong env at a production call site would go unnoticed, and one router-level test with a distinct env (for example an AD_VAR_* entry) would pin the wiring; includePathKey in engine-flow.ts now uses dirname(flow.sourcePath) instead of process.cwd() for a sourceless runFlow, which fixes the cycle key quietly and has no test; and handlers read the host from two places (sessionStore.host.env versus params.host.env or args.host in doctor, lease and session-open), where the handler host parameter would be the better single source.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 19, 2026
@thymikee
thymikee merged commit d6f3172 into main Oct 19, 2026
18 of 25 checks passed
@thymikee
thymikee deleted the chore/process-globals-replay branch October 19, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant