Skip to content

Fix Git for Claude worktrees under reserved paths - #4849

Merged
vvbandeira merged 5 commits into
The-OpenROAD-Project:masterfrom
vvbandeira:claude-reserved-path-git
Nov 18, 2026
Merged

vvbandeira merged 5 commits into
The-OpenROAD-Project:masterfrom
vvbandeira:claude-reserved-path-git

Conversation

@vvbandeira

Copy link
Copy Markdown
Member

When a linked worktree or its Git data is under /workspace or /home/claude-user, the wrapper skips the Git mounts and Git cannot open the checkout.

Use a separate mount prefix when the host paths would collide with container mounts.
Keep the relative layout that Git submodules use and keep the workspace, settings, and cache mounts available.

Add regression tests that run Git in disposable containers.
Run the wrapper, entrypoint, and worktree tests in GitHub Actions.

Git links failed when the checkout or shared Git data overlapped a
container mount. Keep the relative layout at a separate mount path
and preserve the workspace and settings mounts.

Run the shell tests in CI and exercise the reserved paths with real
Git operations in a disposable container.

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
The checkout mount already includes nested Git data. Translate the
gitfile when the original checkout path is hidden. Verify a commit
through a named ref in each Git fixture.

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Forward signals to Docker and wait before removing the temporary
Git pointer. Check pointer cleanup in the worktree fixture and
explain which path to use for Git commands in submodules.

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
@vvbandeira
vvbandeira requested a review from a team as a code owner November 18, 2026 16:01
@vvbandeira
vvbandeira requested review from sombraSoft and removed request for a team November 18, 2026 16:01

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances claude.sh to support Git worktrees and submodules when host paths overlap reserved container mounts (like /workspace or /home/claude-user) by relocating them under /tmp/claude-worktree and overlaying the .git file via a temporary read-only bind mount. It also introduces a comprehensive integration test suite in docker/test-claude-worktree-paths.sh to verify these scenarios and updates the documentation in docs/user/ClaudeCode.md. There are no review comments, and I have no feedback to provide.

The test shim looked up Docker on a PATH where the shim came first.
Resolve the engine before adding the shim so the CI job can run.
Set a job timeout to bound a stalled container test.

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Hosted CI can write inside /workspace but cannot remove the root
directory as the runner user. Remove the known fixture files and
let the existing exit trap clean the temporary Git repository.

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
@openroad-ci

openroad-ci commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 4048e01 · Jenkins build #3 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 2 without a comparable baseline.

⚠️ 56 design(s) were compared against an approximate baseline, not the build at this PR's merge base, so changes already on the target branch can show up as regressions.

@vvbandeira
vvbandeira merged commit 3a6dfff into The-OpenROAD-Project:master Nov 18, 2026
12 of 13 checks passed
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.

2 participants