Skip to content

docs: review-head-preflight — PR-mode reviews gate the frozen PR head (review_head_root) #1210

Backlog

Description

@jflowers

Documentation follow-up for the review-head-preflight change (fixes #1203, #1204).

What changed for users

  • /uf.review-pr <N> and /uf.review-council <N> now run local gates (pre-flight phases, declared checks, baseline) against the PR's frozen head instead of whatever is checked out.
  • New uf-workflow tool review_head_root (prepare / release):
    • Reuses the current checkout when HEAD is the PR head and the tree is clean (no untracked files).
    • Otherwise adds a detached worktree under .uf/review-head/<id> (self-ignoring, invisible to git status). The user's branch, index, and working tree are never touched.
    • Fork PRs whose author lacks write/maintain/admin on the base repo are refused with UNTRUSTED_HEAD before any fetch.
    • Error codes: UNTRUSTED_HEAD, HEAD_UNAVAILABLE, HEAD_MOVED, WORKTREE_FAILED, INVALID_ROOT, REVIEW_HEAD_ROOT_ERROR.
  • uf_preflight_declared_checks accepts optional root and base_sha.
  • Pre-flight verdicts gain a provenance line: Gates ran at: <head_sha> (<method>); config from <config_sha>.
  • /uf.review-pr: a prepare failure records Local gates: not run (<code>) and the review continues on CI evidence.
  • /uf.review-council: a prepare failure (including UNTRUSTED_HEAD) goes through the Phase 1a FAIL path → INCONCLUSIVE.
  • Gaze (Phase 1b) runs only when the checkout was reused; in a worktree it is skipped with a note (follow-up in unbound-force/gaze for a gaze-reporter analysis-root argument).

Docs to update

  • User-facing docs for /uf.review-pr and /uf.review-council (PR-mode behavior, "Local gates: not run", INCONCLUSIVE on untrusted forks).
  • Pre-flight skill docs: PR-mode inputs and the provenance line.
  • Hero-repo adopters: .uf/review-head/ worktrees, the 24h stale prune, and the trust gate.

Spec: openspec/changes/review-head-preflight/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions