Repository navigation
test(host-kit): stub os.homedir for the exec-trace late-close test - #3898
Merged
Merged
Conversation
vi.stubEnv('HOME') does not reach os.homedir() in worker threads, which is
the pool Stryker's vitest runner forces. The diagnostics homedir fallback
then wrote outside the temp home and the test read an undefined path,
failing the Mutation Harness Canary dry run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
I found no problems in 495cd8d. The test change in exec-trace.test.ts looks correct and stays within that one file. The failing check is the snapshot-route.test.ts cap (#3890). Your diff does not touch that route, so it looks unrelated. It needs to clear on main before this PR can merge. There are no conflicts. I did not run the test with HOME unset. I also did not confirm that os.homedir() ignores a stubbed HOME in worker threads. That claim comes from the oxlint comment. |
Contributor
|
thymikee
added a commit
that referenced
this pull request
Oct 22, 2026
Brings in #3892, which fixes the iOS simulator logs stop hang. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * origin/main: perf(ios): read each resolved text input through one snapshot (#3882) fix(gate): take the host validation lock for heavy gates (#3900) fix(logs): keep an early iOS simulator logs stop from hanging the session (#3892) fix(apple): clean the runner derived path the runner uses (#3897) test(provider-scenarios): open deadline scenarios without the test IME (#3903) test(host-kit): stub os.homedir for the exec-trace late-close test (#3898)
thymikee
added a commit
that referenced
this pull request
Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ps/ios-suite: fix(perf): stop the log stream right after it starts perf(ios): read each resolved text input through one snapshot (#3882) fix(gate): take the host validation lock for heavy gates (#3900) fix(logs): keep an early iOS simulator logs stop from hanging the session (#3892) fix(apple): clean the runner derived path the runner uses (#3897) test(provider-scenarios): open deadline scenarios without the test IME (#3903) test(host-kit): stub os.homedir for the exec-trace late-close test (#3898)
thymikee
added a commit
that referenced
this pull request
Oct 22, 2026
* origin/main: perf(ios): confirm fill focus from the tapped input before the keyboard (#3906) feat(perf): time every iOS command against the fixture app (#3885) fix(ios): stop the XCTest-channel penalty from re-arming itself (#3896) test(android): pin that a child vanishing mid-read reads as gone (#3905) ci: skip device smoke lanes when a PR changes no lane input (#3904) fix(ios): verify deep-tree back on the sole screen (#3894) fix(ios): synthesize long presses and the gesture viewport on deep trees (#3893) perf(ios): read each resolved text input through one snapshot (#3882) fix(gate): take the host validation lock for heavy gates (#3900) fix(logs): keep an early iOS simulator logs stop from hanging the session (#3892) fix(apple): clean the runner derived path the runner uses (#3897) test(provider-scenarios): open deadline scenarios without the test IME (#3903) test(host-kit): stub os.homedir for the exec-trace late-close test (#3898) feat(test-app): add a Bluesky-depth heavy feed screen (#3884)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The advisory Mutation Harness Canary (kernel-errors) has failed since #3846 added the "environment-only late close" exec-trace test. Stryker's vitest runner forces the thread pool, where
vi.stubEnv('HOME')only changes the worker's copy ofprocess.env.os.homedir()reads the real process HOME, so the diagnostics homedir fallback wrote outside the temp home and the test readundefined.The test now redirects
os.homedir()withvi.spyOn, asreplay-port/source-discovery.test.tsdoes. Production code and the assertions are unchanged: the late close must still append to the finalized record with no second file. 1 file touched (test only). No linked issue.Validation
origin/main(9935ef5):vitest run exec-trace.test.ts --pool=threadsfails withENOENT .../undefined. At head 495cd8d it passes under both--pool=threadsand the default pool.event === 'close' && falseinexec-trace.tsfails both late-close tests (and the other flush tests); reverted.pnpm gate mutation --modules kernel-errors --shard 1/5at 495cd8d: dry run passes, lane envelopepass.pnpm check:affected --runat 495cd8d fails lint only onsnapshot-route.test.ts(1003 lines) already on main; test(ios): bring snapshot-route.test.ts back under the line cap #3890 fixes it. With test(ios): bring snapshot-route.test.ts back under the line cap #3890 merged into a throwaway local branch, all 6 checks pass (exit 0). This PR's lint will stay red until test(ios): bring snapshot-route.test.ts back under the line cap #3890 merges.mutation-affected.yml, because a diff without lane sources selects no kernels): kernel-errors shards 1-5 and snapshot-occlusion all succeeded.🤖 Generated with Claude Code