Repository navigation
test(cli): isolate fixture PWD from ambient working directory - #822
Merged
agenteinstinct1-max merged 3 commits intoNov 7, 2026
Merged
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit 25b7896)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 25b7896)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous review (commit e0d1014)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by free · Input: 26.6K · Output: 2.4K · Cached: 116.2K |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #823. Narrow CLI fixture isolation defect only; this does not establish a fix for the broader test-suite bottleneck.
Type of change
What does this PR do?
Keep CLI fixture children from inheriting the repository's ambient PWD. The CLI resolves session.directory from env.PWD before cwd, so a stale parent PWD can escape fixture isolation even when HOME and cwd are isolated.
Default PWD to the fixture home for spawn, startRun and serve, and to the resolved requested cwd for ACP. Explicit caller env overrides still win. Add an isolated subprocess regression that sets an ambient PWD containing spaces and checks the child session.directory is the fixture home. Production code is unchanged.
How did you verify your code works?
5167dd0a...) found no must-fix. Canonical identities are captured inside the live fixture scope, after the child run and before home cleanup. The old post-scope catchall returned raw paths after home had been removed; it is now removed. Assertions and all four source budgets are unchanged.bun test --timeout 30000 test/cli/run/pwd-isolation.test.ts: exit 0 in 7.633 seconds; inner 1 pass / 0 fail with 14 assertions, outer 1 pass / 0 fail with 2 assertions. The diagnostic captured canonical home equal to session.directory and different from ambient PWD containing spaces.Earlier CI exposed stream typing, Windows short/long-path comparison, and a permission fixture that depended on stale ambient PWD. The previous revision passed typecheck and Linux CI but failed the Windows canonical comparison. This revision fixes the proven scope-lifetime/raw-fallback path; it is not Windows runtime qualification.
Runtime evidence for this correction is Linux only. Fresh exact-head CI and review are required. Full local typecheck was not rerun; the earlier local attempts ended in OOM and a narrow wasm-module error. The prior Windows suite took 1969 seconds: no full-suite speedup, suite-wide pass, or universal cleanup claim is made.
Screenshots / recordings
Not a UI change.
Checklist