test(host-config): skip the claude-detect case when claude is not on PATH - #2484
Open
tranthanhnhatkhoa wants to merge 1 commit into
Open
test(host-config): skip the claude-detect case when claude is not on PATH#2484tranthanhnhatkhoa wants to merge 1 commit into
tranthanhnhatkhoa wants to merge 1 commit into
Conversation
…PATH `detect` reports hosts whose binaries are on PATH, so asserting it finds claude is an assertion about the machine, not about the code. It holds in CI and in a developer's own session. It does not hold when the suite runs as a service account, or anywhere claude is installed under a different user — /root/.local/bin/claude is not on a non-root PATH. test.skipIf (already used in diagram-render-drift, setup-windows-fallback and gbrain-sync-voyage-code-3-integration) keeps the check where it is meaningful and skips it where it can only report the environment. Coverage in CI is unchanged: claude is on PATH there, so it still runs. Renamed to drop "since we are running in claude", which is the assumption that turned out not to be universal. Verified: claude absent (this box) 76 pass, 1 skip, 0 fail fake claude on PATH test runs and passes
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
detectreports the hosts whose binaries are on PATH, so this asserts something about the machine, not about the code. It holds in CI and in a developer's own session. It does not hold when the suite runs as a service account, or anywhere claude is installed under a different user —/root/.local/bin/claudeis not on a non-root PATH.test.skipIfkeeps the check where it's meaningful and skips it where it can only report the environment. The idiom is already used indiagram-render-drift,setup-windows-fallbackandgbrain-sync-voyage-code-3-integration.Coverage in CI is unchanged — claude is on PATH there, so the case still runs. It only skips where it would have been testing the host rather than the product.
Also dropped "since we are running in claude" from the name, since that's the assumption that turned out not to be universal.
Verified
I tested the positive branch with a stub on PATH rather than only confirming the skip — a guard that always skips would look identical from the passing side.
Context
Last of the failures I hit running the suite on a headless Ubuntu VPS as a service account. The others are #2480, #2481, #2482 and #2483.
For the record, the two remaining failures on that box are also environmental and not worth a code change:
browse/test/cdp-e2e.test.tsneedsGSTACK_CHROMIUM_NO_SANDBOX=1on Ubuntu 23.10+ (already documented inbrowser-manager.ts, #1562), andbrowse/test/handoff.test.tsneeds a headed browser, so an X server orxvfb-run. Both are correctly the operator's problem, not the suite's.🤖 Generated with Claude Code
https://claude.ai/code/session_01H3KRWmyJnSvzzxeooDxuU3