Skip to content

test(floor): the L6 projectRoot() test passes on macOS and exercises CLAUDE_PROJECT_DIR (6.32.1) - #296

Merged
PrzemekGalarowicz merged 1 commit into
mainfrom
claude/relaxed-antonelli-d1bdcb
Sep 28, 2026
Merged

PrzemekGalarowicz merged 1 commit into
mainfrom
claude/relaxed-antonelli-d1bdcb

Conversation

@PrzemekGalarowicz

Copy link
Copy Markdown
Contributor

Summary

The 6.31.2 test ★ L6: projectRoot() follows CLAUDE_PROJECT_DIR when cwd is a subdirectory failed on macOS:

+ '/private/var/folders/.../T/pharn-run-marker-XXXX'
- '/var/folders/.../T/pharn-run-marker-XXXX'
  • Cause. On macOS os.tmpdir() is under /var, a symlink to /private/var. projectRoot() walks up from process.cwd(), which the OS reports resolved, and resolves CLAUDE_PROJECT_DIR with realpathSync, as the hooks' workTreeRoot() does. The test compared that with the unresolved mkdtemp path. Linux CI has no such symlink, so it never failed there. run-marker.mjs is unchanged: the resolved root is correct.
  • A second defect. The fixture also held a .git, which stops the walk on its own, so the CLAUDE_PROJECT_DIR assertion held with the variable unset. Measured: with only the realpathSync fix, the test passed after the CLAUDE_PROJECT_DIR branch was deleted from a copy of run-marker.mjs.
  • Fix. The test compares against realpathSync(root) (the marker check uses the same resolved root) and runs three phases on one fixture: no stop (a negative control, not root), CLAUDE_PROJECT_DIR alone (root), then .git alone (root). On copies of run-marker.mjs, deleting the CLAUDE_PROJECT_DIR stop fails phase 2 and deleting the .git stop fails phase 3.
  • Release. Every merge to main is a release, so this ships as 6.32.1: SKILLS_VERSION, the README badge and a ## [6.32.1] CHANGELOG section. MIN_CLI is unchanged.

Verification (macOS, rebased on c7449e4)

  • node --test --test-name-pattern='L6: projectRoot' pharn/floor/run-marker.test.mjs: pass.
  • npm run check: exit 0, 4267/4267 tests, reconcile NO_BASELINE. No nested .claude/worktrees/.
  • npm run check:changelog-entry: GREEN, opens ## [6.32.1] - 2026-09-28.

🤖 Generated with Claude Code

…CLAUDE_PROJECT_DIR (6.32.1)

On macOS os.tmpdir() is under /var, a symlink to /private/var. projectRoot() walks up from process.cwd(), which the OS reports resolved, and resolves CLAUDE_PROJECT_DIR with realpathSync, as the hooks' workTreeRoot() does. The test compared that with the unresolved mkdtemp path, so it failed locally on macOS and passed on Linux CI. run-marker.mjs is unchanged.

The fixture also held a .git, which stops the walk on its own, so the CLAUDE_PROJECT_DIR assertion held with the variable unset (measured). The test now runs three phases on one fixture: no stop (a negative control), then CLAUDE_PROJECT_DIR alone, then .git alone. Deleting either stop from a copy of run-marker.mjs fails its phase.

Every merge to main is a release, so this ships as 6.32.1 (SKILLS_VERSION, README badge, CHANGELOG section). MIN_CLI is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b6576372-e96a-44e4-9db4-c55c8d04ae9c


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PrzemekGalarowicz
PrzemekGalarowicz merged commit 933cf7f into main Sep 28, 2026
8 checks passed
@PrzemekGalarowicz
PrzemekGalarowicz deleted the claude/relaxed-antonelli-d1bdcb branch September 28, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant