Skip to content

Support multiple checkouts with unique mount points#17

Merged
adityamaru merged 4 commits intomainfrom
adityamaru/investigate-extraheader-error
Jan 28, 2026
Merged

Support multiple checkouts with unique mount points#17
adityamaru merged 4 commits intomainfrom
adityamaru/investigate-extraheader-error

Conversation

@adityamaru
Copy link
Contributor

@adityamaru adityamaru commented Jan 28, 2026

Each repository checkout now gets its own isolated sticky disk and mount point to prevent conflicts when multiple repos are checked out in the same workflow.

Changes:

  • getMountPoint() returns unique path per repo: /blacksmith-git-mirror-{owner}-{repo}
  • setupCache() requests sticky disk with correct repoName from checkout input
  • Add repoName and mountPoint to state for post step cleanup
  • Add comprehensive tests for multiple checkout scenario

This fixes the issue where second checkout would stacked mount over the first, breaking the first repo's alternates mechanism.

Test plan:

  • All existing tests pass (100 tests)
  • New unit tests verify path uniqueness and multiple checkout isolation

🤖 Generated with Claude Code


Note

Isolates Blacksmith git mirrors per repository to avoid conflicts during multiple checkouts.

  • Introduces getMountPoint(owner, repo) and updates getMirrorPath to live under /blacksmith-git-mirror/<owner>/<repo>/v1/<owner>-<repo>.git
  • setupCache now requests sticky disks with the actual owner/repo and mounts each device at its unique mount point
  • Persists repoName, mountPoint, and mirrorPath in state; cleanup unmounts via the stored mount point and commits using the stored repo name
  • Adds unit tests validating unique/consistent paths, hyphen collision avoidance, mirror path format, environment detection, and multi-checkout isolation

Written by Cursor Bugbot for commit 2d74d60. This will update automatically on new commits. Configure here.

adityamaru and others added 2 commits January 28, 2026 05:51
Each repository checkout now gets its own isolated sticky disk and mount
point to prevent conflicts when multiple repos are checked out in the same
workflow.

Changes:
- getMountPoint() returns unique path per repo: /blacksmith-git-mirror-{owner}-{repo}
- getMirrorPath() uses dynamic mount point for each repo
- setupCache() requests sticky disk with correct repoName (not GITHUB_REPO_NAME)
- Add repoName to state for post step cleanup
- Add tests for multiple checkout scenario

This fixes the issue where second checkout would stacked mount over the
first, breaking the first repo's alternates mechanism.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

adityamaru and others added 2 commits January 28, 2026 06:12
Change mount point naming from flat scheme (e.g., /blacksmith-git-mirror-foo-bar)
to directory structure (e.g., /blacksmith-git-mirror/foo/bar).

This avoids collisions where different repos could produce the same mount point
due to hyphens in owner or repo names (e.g., foo-bar/baz vs foo/bar-baz would
both produce /blacksmith-git-mirror-foo-bar-baz with flat naming).

Also simplified mirror path to use mirror.git since owner/repo is already
in the directory structure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep using owner-repo.git filename inside sticky disks to maintain
compatibility with existing cached mirrors. Only the mount point path
changed (from flat to directory structure), not the mirror filename.

- Mount point: /blacksmith-git-mirror/owner/repo (new, collision-safe)
- Mirror file: owner-repo.git (preserved, backward compatible)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@adityamaru adityamaru merged commit c855305 into main Jan 28, 2026
14 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.

1 participant