open-code-review/cmd
kite 82fe45a110 fix(cmd): resolve review repo dir to git top level for monorepo subdirs
When ocr review runs from a subdirectory of a monorepo, the working dir
differs from the git repository root. git diff emitted subdir-relative
paths (with diff.relative) while the file_read tool's `git show <ref>:<path>`
resolves paths relative to the repo root, so every file_read failed on the
first try and only succeeded after the LLM retried with the repo-root prefix,
wasting extra LLM calls (#287).

Resolve the review working dir to `git rev-parse --show-toplevel` so diff and
file_read agree on repo-root-relative paths. The scan path (requireGit=false)
intentionally keeps the working-directory scope so scanning a subdirectory
stays limited to it.
2026-07-06 19:08:47 +08:00
..
opencodereview fix(cmd): resolve review repo dir to git top level for monorepo subdirs 2026-07-06 19:08:47 +08:00