test: isolate runtime state and PTY integration - #175
Draft
Lint111 wants to merge 2 commits into
Draft
Conversation
This was referenced Jul 29, 2026
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
HOME.HOME/USERPROFILEand explicitVITESTmarker before application imports can resolve runtime paths.
state, then restore the caller environment and remove only the temporary
fixture directory during teardown.
tmux/agent geometry calls, so integration tests exercise input/output without
creating or controlling host sessions.
Root cause
The test harness did not reliably identify itself as a test environment and
allowed module-level paths to resolve from the developer's real home directory.
The quick-start suite could therefore clean up the real
~/codeman-cases/testcasedirectory, including the checkout running Vitest.Session integration tests could also launch real tmux/agent processes.
Scope
This is the test-infrastructure slice extracted from #173. It changes the
quick-start fixture, global test setup, and a
VITEST-guarded session adapter.Normal application execution is unchanged.
Validation
npm run test:ci -- test/quick-start.test.ts test/integration-flows.test.ts:2 files, 23 tests passed
git diff --check: clean