You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a FORK, `gh repo view` resolves to the PARENT repo (a navapbc/ai-chatbot
checkout reports vercel/chatbot), so the dispatcher looked up the wrong PR, ran
the suite against the wrong diff, posted to the wrong repo (review-comment 422
'path could not be resolved' → issue-comment fallback on the upstream), and
recorded a Testing Events row attributed to the wrong slug.
Fix: resolve the owner/name slug from the `origin` remote URL (HTTPS or SSH),
cached, with an AI_REVIEW_REPO=owner/name override. Thread it through all four
gh call sites (--pr lookup, auto-discovery, comment posting, metrics row) via
`-R <slug>` so they all agree on the fork.
Also harden the comment-id capture: on a 422, `gh ... --jq` can print the raw
error JSON to stdout, which slipped past the old non-empty guard and got stored
as comment_id — poisoning the metrics row (the 'Validation Failed' text seen in
the Sheet). Add ai_review::valid_comment_capture requiring a NUMERIC id; reject
otherwise. Both this and the repo fix independently prevent the corruption.
Docs: add a prominent WARNING that AI_RUN_SUITE=1 (OBSERVED) runs the change's
code on your machine with no sandbox — only use it on branches you trust, never
an untrusted --pr; plus a troubleshooting row for the fork/AI_REVIEW_REPO case.
> Only use `AI_RUN_SUITE=1` on a branch **you trust** — typically your own
43
+
> work-in-progress. Do **not** point it at an untrusted or unreviewed PR
44
+
> (e.g. `--pr N` for someone else's contribution): installing and running that
45
+
> branch's code is arbitrary code execution on your laptop. For untrusted
46
+
> changes, use the default **INFERRED** mode (omit `AI_RUN_SUITE`), which only
47
+
> reasons over the diff and never executes anything, or let CI run OBSERVED in
48
+
> its disposable runner.
49
+
35
50
---
36
51
37
52
## Prerequisites
@@ -214,6 +229,7 @@ run (Path B) is still the recorded, metrics-feeding pass; this is your preview.
214
229
|`AI_REVIEW_TOOL … not set`| Export `AI_REVIEW_TOOL=claude` (or `codex`/`copilot`); see `README.md`. |
215
230
| Classification seems to miss recent edits |`--unpushed` excludes *unstaged* changes. `git add` or commit them first. |
216
231
| Everything lands in INFERRED | That's the default. Add `AI_RUN_SUITE=1` to run the suite (OBSERVED). Suites needing services may still fall back to INFERRED, by design. |
232
+
| Posted to / recorded the wrong repo (e.g. the upstream of your fork) | The repo is resolved from your `origin` remote. On a fork whose `origin` isn't the repo the PR lives in, export `AI_REVIEW_REPO=owner/name` to set it explicitly. |
0 commit comments