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
{{ message }}
Repository navigation
Commit b226fce
Browse filesBrowse the repository at this point in the historyBrowse files
checkout of `head_sha`, and otherwise adds a detached
631
+
worktree at `head_sha` under `.uf/review-head/`. It never
632
+
switches, stashes, or modifies the user's branch, index,
633
+
or working tree. A success looks like:
634
+
635
+
```json
636
+
{"status":"ok","data":{"root":"/repo/.uf/review-head/k3v9x2qa","head_sha":"<40-hex>","base_sha":"<40-hex>","method":"worktree","created":true,"config_sha":"<40-hex>","config_dirty":false,"provenance_line":"Gates ran at: <40-hex> (worktree); config from <40-hex>","gaze_skip_note":"Gaze skipped: the PR head is in a temporary worktree and gaze-reporter has no root argument","changed_files":["internal/a.go"]}}
637
+
```
638
+
639
+
On `status: "error"`, do NOT run local gates anywhere.
640
+
Phase 1a stays mandatory, so every code takes the Phase
641
+
1a FAIL path (step c below) even though no pre-flight
642
+
verdict exists: report the code and message as a
643
+
CRITICAL finding, skip Phases 1a, 1b, and 1c, dispatch
644
+
no reviewer children, and run only the non-child
645
+
planning and finalization portions of the shared
646
+
protocol to record coverage `FAIL`, terminal skipped
647
+
runs, and failing `INCONCLUSIVE`. Then stop. The codes:
648
+
-`UNTRUSTED_HEAD`: a fork PR whose author lacks write
649
+
access. Its code is not fetched or run. The message
650
+
names the opt-in: check out the head yourself
651
+
(`gh pr checkout <N>`) and re-run, which takes the
652
+
reuse path.
653
+
-`HEAD_MOVED`: the PR's head is no longer the frozen
654
+
`head_sha` (it was pushed since); re-run the council.
655
+
-`HEAD_UNAVAILABLE`: no remote names the base
656
+
repository, or a fetch or `gh` lookup failed.
657
+
-`WORKTREE_FAILED`: `git worktree add` failed; the
658
+
message carries git's error.
659
+
-`REVIEW_HEAD_ROOT_ERROR`: an unexpected tool error; the
660
+
message carries the detail.
661
+
662
+
On success, pass the whole prepare result to Phase 1a. After Phase 1b (or on any
663
+
STOP after a successful prepare), call `review_head_root`
664
+
once with `{action: "release", root: <root>}`. No later
665
+
step reads the root. A release failure is a warning in
666
+
the final report and never changes the verdict.
667
+
668
+
Local and uncommitted input skips this block: Phases 1a
checkout of `head_sha`, and otherwise adds a detached
263
+
worktree at `head_sha` under `.uf/review-head/`. It never
264
+
switches, stashes, or modifies the user's branch, index,
265
+
or working tree. A success looks like:
266
+
267
+
```json
268
+
{"status":"ok","data":{"root":"/repo/.uf/review-head/k3v9x2qa","head_sha":"<40-hex>","base_sha":"<40-hex>","method":"worktree","created":true,"config_sha":"<40-hex>","config_dirty":false,"provenance_line":"Gates ran at: <40-hex> (worktree); config from <40-hex>","gaze_skip_note":"Gaze skipped: the PR head is in a temporary worktree and gaze-reporter has no root argument","changed_files":["internal/a.go"]}}
269
+
```
259
270
260
-
2. Execute the pre-flight skill's phases in order:
271
+
On `status: "error"`, do NOT run local tools anywhere.
272
+
Record the failure envelope's rendered `not_run_line`
273
+
verbatim as the Step 3.7 result (e.g. `Local gates: not
274
+
run (<code>): <message>`), skip items 2-3, and continue
275
+
with CI evidence only:
276
+
-`UNTRUSTED_HEAD`: a fork PR whose author lacks write
277
+
access. Its code is not fetched or run. The message
278
+
names the opt-in (check out the head yourself and
279
+
re-run).
280
+
-`HEAD_MOVED`: the PR's head is no longer the
281
+
`head_sha` Step 2 froze (it was pushed since); re-running
282
+
the review picks up the new head.
283
+
-`HEAD_UNAVAILABLE`: no remote names the base
284
+
repository, or a fetch or `gh` lookup failed.
285
+
-`WORKTREE_FAILED`: `git worktree add` failed; the
286
+
message carries git's error.
287
+
-`REVIEW_HEAD_ROOT_ERROR`: an unexpected tool error; the
288
+
message carries the detail.
289
+
290
+
2.**Run pre-flight.** Invoke the `skill` tool with name
291
+
`pre-flight`, in `ci-aware` mode, passing the whole
292
+
prepare result (`root`, `changed_files`, `base_sha`, and
293
+
the provenance fields `head_sha`, `method`, `config_sha`,
294
+
`config_dirty`). Execute
295
+
its phases in order:
261
296
a. CI Workflow Parsing — discover commands from `.github/workflows/`
262
297
b. Local Tool Detection — check for config files and verify binary availability
263
298
c. CI Coverage Matrix — build the matrix using the CI check results from Step 3. Apply ci-aware decision rules:
@@ -267,9 +302,21 @@ Load the `pre-flight` skill and run in `ci-aware` mode:
267
302
- No CI checks at all → MUST run ALL detected local tools
268
303
d. Execution — run only tools marked "Yes" in the coverage matrix. Do NOT stop on first failure.
269
304
270
-
3.**Record results**: CI Coverage Matrix, Execution Results, Verdict.
271
-
If tools pass, skip those categories in the AI review.
272
-
If tools fail, include the failure output as context.
305
+
3.**Release the head root.** Call `review_head_root` once
306
+
with `{action: "release", root: <root>}` as soon as item 2
307
+
finishes, and before any STOP after a successful
308
+
prepare. No later step reads the root: the light check
309
+
and the reviewers read the PR diff through `gh`. A
310
+
release failure is a warning in the report and never
311
+
changes the verdict.
312
+
313
+
**Record results**: the prepare result's rendered
314
+
`provenance_line` (or the failure envelope's rendered
315
+
`not_run_line`, which ends in `: <message>`), verbatim, CI
316
+
Coverage Matrix,
317
+
Execution Results, and Verdict. If tools pass, skip those
318
+
categories in the AI review. If tools fail, include the
319
+
failure output as context.
273
320
274
321
### 3.8. Discover Review Context
275
322
@@ -710,7 +757,7 @@ Present the findings in this structured format:
<provenance_line from the prepare result, or its not_run_line from the failure envelope, verbatim; then a table showing which tools ran, pass/fail status, and summary of failures if any>
0 commit comments