Repository navigation
fix(doctor): compare real paths in the bridge check; macOS-stable tests - #2494
Merged
Merged
Conversation
- squad doctor: the bridge reports its team dir resolved (/private/var/...) while doctor expected the unresolved spelling (/var/...), so the check failed on macOS temp and symlinked folders. Compare real paths. - Tests that assumed os.tmpdir() is already resolved, or that macOS ignores XDG_CONFIG_HOME, now hold on macOS: upstream-source-hardening, profile-fs-guard, export-import. Local full suite on macOS: 26 failures before #2492, now 0 besides timing flakes that pass when re-run alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🟡 Impact Analysis — PR #2494Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (2 files)
squad-cli (1 file)
tests (3 files)
This report is generated automatically for every PR. See #733 for details. |
Contributor
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 12 check(s) still running |
Files Changed (6 files, +20 −11)
| File | +/− |
|---|---|
.changeset/doctor-real-paths.md |
+5 −0 |
CHANGELOG.md |
+1 −0 |
packages/squad-cli/src/cli/commands/doctor.ts |
+7 −4 |
test/cli/export-import.test.ts |
+3 −5 |
test/cli/upstream-source-hardening.test.ts |
+2 −1 |
test/profile-fs-guard.test.ts |
+2 −1 |
Total: +20 −11
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the bridge path-resolution fix and related test adjustments.
No open issues 🎉
What changed in this PR
Follow-up to #2492 that fixes false squad doctor bridge failures when symlinked paths identify the same team folder, and adjusts tests for macOS path and configuration behavior.
Changes:
- Compare resolved team-directory paths in the bridge check.
- Align test setup and assertions with resolved temporary paths and
XDG_CONFIG_HOMEprecedence. - Document the fix and add a CLI patch changeset.
| File | Description |
|---|---|
test/profile-fs-guard.test.ts |
Resolve the temporary directory used in the guard assertion. |
test/cli/upstream-source-hardening.test.ts |
Resolve the test directory to match CLI clone paths. |
test/cli/export-import.test.ts |
Redirect XDG_CONFIG_HOME on all POSIX platforms. |
packages/squad-cli/src/cli/commands/doctor.ts |
Compare real paths when validating the bridge’s team directory. |
CHANGELOG.md |
Document the bridge-check fix. |
.changeset/doctor-real-paths.md |
Add a patch release entry for the CLI. |
Review effort: Balanced (dynamic)
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.
Follow-up to #2492. Six tests still failed on macOS after #2492. One was a real
squad doctorbug; the rest were test assumptions.squad doctor(product fix)The bridge check compares the team folder that
squad_state_healthreports with the one doctor expects. The bridge reports it resolved (/private/var/...) and doctor expected the original spelling (/var/...), so the check failed with "bridge resolved X, expected Y" whenever the folder had two spellings. On macOS that includes anything under the temp folder. It now compares real paths. This caused theupgrade-profile-teamrootfailure.Tests
upstream-source-hardening: the CLI clones into the resolved path, so the test now resolves its temp folder too.profile-fs-guard: the guard creates its root under the resolved temp folder, and the check now compares against that.export-import: on macOS it redirectedHOME, butXDG_CONFIG_HOME(which the test harness always sets) takes precedence. It now redirectsXDG_CONFIG_HOMEon every POSIX platform.Result
Local full suite on macOS: 26 failures before #2492, now 3. All 3 are known timing flakes that pass when re-run alone (
e2e-integrationand twogh-aw-install-stagingtests).🤖 Generated with Claude Code