Skip to content

fix(backends): resolve physical path in orca repo_ensure for symlinked projects#279

Open
BenWilcox8 wants to merge 5 commits into
kunchenguid:mainfrom
BenWilcox8:fm/orca-realpath-c2
Open

fix(backends): resolve physical path in orca repo_ensure for symlinked projects#279
BenWilcox8 wants to merge 5 commits into
kunchenguid:mainfrom
BenWilcox8:fm/orca-realpath-c2

Conversation

@BenWilcox8

Copy link
Copy Markdown

Summary

  • fm_backend_orca_repo_ensure now resolves the project directory to its physical path (cd <dir> && pwd -P) before passing it to orca repo show and orca repo add --path
  • Secondmate homes hold project clones as symlinks to the primary's canonical clones; the symlink path was causing Orca to mint a duplicate repo entry instead of reusing the canonical one
  • Fix is scoped to the Orca backend only; no other backends are affected

Test plan

  • New test test_repo_ensure_resolves_symlinked_project_to_physical_path proves a symlinked project dir resolves to the same canonical physical path as the canonical dir itself
  • Three existing tests updated to pass real directories (the fix requires the project dir to exist on disk)
  • shellcheck clean on bin/*.sh bin/backends/*.sh tests/*.sh
  • All 50 Orca backend tests pass

🤖 Generated with Claude Code

…d projects

Secondmate homes hold project clones as symlinks to the primary's
canonical clones. fm-spawn computes PROJ_ABS with logical pwd, so
the symlink path reached orca repo add --path, minting a duplicate
repo entry instead of reusing the canonical one.

In fm_backend_orca_repo_ensure, resolve the project directory to its
physical path (cd <dir> && pwd -P) before passing it to orca repo
show and orca repo add. Keeps the fix scoped to the Orca backend;
other backends are unaffected.

Update three existing tests that passed the non-existent path
/repo/path to use real directories, since the physical-path
resolution now requires the directory to exist. Add a new test
proving a symlinked project dir resolves to the same canonical
physical path as the canonical dir itself.
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