open-code-review/cmd/opencodereview
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
..
config_cmd.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
config_cmd_test.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
config_dispatch_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
emit_run_result_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
flags.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
flags_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
git.go fix(security): block git ref option injection (#112) 2026-06-13 11:07:59 +08:00
git_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
llm_cmd.go feat(vscode): add full-width BYOK provider config panel (#204) 2026-06-25 10:37:25 +08:00
main.go feat: add ocr scan for full-file code review (#93) 2026-06-24 22:07:25 +08:00
output.go feat: add tool_calls field to JSON output (#216) 2026-06-25 13:53:06 +08:00
output_helpers_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
output_test.go fix: sanitize terminal control characters in text output to prevent escape-sequence injection (#143) 2026-06-16 14:48:56 +08:00
procattr_unix.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
procattr_windows.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
provider_cmd.go feat: improve config provider TUI interaction (#213) 2026-06-26 17:01:57 +08:00
provider_cmd_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
provider_tui.go feat: improve config provider TUI interaction (#213) 2026-06-26 17:01:57 +08:00
provider_tui_funcs_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
provider_tui_test.go feat: improve config provider TUI interaction (#213) 2026-06-26 17:01:57 +08:00
review_cmd.go fix(cmd): resolve review repo dir to git top level for monorepo subdirs 2026-07-06 19:08:47 +08:00
review_cmd_test.go fix(cli): reject --to without --from in review flags (#151) 2026-06-16 20:26:22 +08:00
rules_cmd.go feat(rules): add ocr rules check command to preview effective rule for a file path 2026-05-26 22:11:39 +08:00
scan_cmd.go feat: add tool_calls field to JSON output (#216) 2026-06-25 13:53:06 +08:00
scan_cmd_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
shared.go fix(cmd): resolve review repo dir to git top level for monorepo subdirs 2026-07-06 19:08:47 +08:00
shared_test.go fix(cmd): resolve review repo dir to git top level for monorepo subdirs 2026-07-06 19:08:47 +08:00
shell_unix.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
shell_windows.go feat: add standard MCP tool support (#212) 2026-07-01 19:10:16 +08:00
smallfiles_test.go test: improve coverage for cmd/opencodereview package from 42% to 70% 2026-06-27 01:47:48 +08:00
version.go feat(cli): display GitHub repository URL in version and help output 2026-06-02 22:50:36 +08:00
viewer_cmd.go feat: init 2026-05-20 22:03:52 +08:00