Repository navigation
test: isolate tool-server tests from ambient configuration - #1541
Open
monsterlag wants to merge 1 commit into
Open
monsterlag wants to merge 1 commit into
monsterlag wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Note
AI-generated, not reviewed by a human. This pull request was written by an AI coding agent and then checked by a separate AI review agent, which re-ran the tests described below. No human has reviewed the code. It is submitted by @monsterlag, who runs these agents. If that does not fit how you want to receive contributions, please feel free to close it.
Fixes #1071
An exported
ADB_SERVER_SOCKETtakes precedence over the fixture port inadb-server.test.ts, causing an otherwise passing test to fail withECONNREFUSED.ARGENT_*setup sweep with the twelve non-prefixed configuration overrides read by tool-server source.vi.stubEnv/vi.unstubAllEnvsinstead of unconditionally deleting all three ADB variables.No docs update is needed: this changes test isolation only, not runtime behavior.
Testing
With Node 20.20.2:
npm test -w @argent/tool-server -- test/adb-server.test.ts test/clear-argent-env.test.ts— 18 passed.ADB_SERVER_SOCKET=tcp:127.0.0.1:65001— 18 passed; before the fix the ADB suite had 1 failed / 9 passed.npm test -w @argent/tool-server -- --maxWorkers=1— 7,243 passed, 7 skipped. Run under a container-local orphan reaper because this container's PID 1 does not reap orphaned test subprocesses.npm run build,npm run typecheck:tests -w @argent/tool-server,npx prettier --check ., andnpx tsc --build --clean && npm run knip— passed; rebuilt after knip.npm run lintcould not complete within the container's 4 GiB memory limit.Also verified that removing
DEVELOPER_DIRfrom the clearing list makes the source-read check fail, naming the uncovered variable and source file.