docs(649): narrow the enumeration's stated guarantees to what it actually proves

Two limitations the cold review surfaced are now written where the guarantees are
described, rather than living only in a review transcript. Both are pre-existing and
tracked separately (#663, #664); neither is fixed here.

- Head-sha binding detects ONE-WAY movement. An A->B->A force-push round trip restores
  the expected sha, so the binding holds while the pages came from two states. The record
  previously read as though the race were closed.
- A commit status is repo-GLOBAL, so a success earned on one PR is inherited by any other
  PR with the same head. Same property that makes the per-sha binding work, read from the
  other end.

Refs #649

Decisions-Edit: yes
This commit is contained in:
2026-07-26 23:29:44 +02:00
parent 322dd43d10
commit 3885fd6aea
@@ -68,7 +68,11 @@ in each caller:
requested well before the real end of the list, so "short page" is not a valid termination signal.
- Head-sha binding: the head is re-read after enumeration, and the caller must refuse to trust the
list if it moved mid-enumeration, since paging is several round-trips and a force-push between them
would otherwise yield a list belonging to no single commit.
would otherwise yield a list belonging to no single commit. **This detects ONE-WAY movement only.**
An A→B→A force-push round trip restores the expected sha, so the binding holds while the pages came
from two different states — see #664. Closing that needs a commit-pinned files endpoint (Gitea has
none) or a local diff, not a tighter check here; the guarantee is stated narrowly rather than left
to read as complete.
**Base-ref checkout — now a property of the tree.** `review-verdict.yml` checks out the PR's BASE
ref (`ref: ${{ github.event.pull_request.base.sha }}`, `persist-credentials: false`), never the
@@ -92,6 +96,13 @@ and mutation testing was what established that `PROTECTED` is load-bearing only
it and `DOCS_ONLY` are disjoint patterns, so on the docs-only path that clause can never fire. A
test written against a docs-only-plus-protected file list passed with the clause deleted.
**A commit status is repo-global, which this record does not fix either.** `review-verdict/h10` is
attached to a sha in the repository, not to a pull request, so a success earned on one PR is
inherited by any other PR with the same head — including one opened against a different base after
the first is closed (#663). That is the same property that makes #622's per-sha binding work, read
from the other end. Out of scope here; noted so the enumeration's guarantees are not mistaken for a
guarantee about *which PR* a verdict belongs to.
**Severity, stated honestly.** Every enumeration defect found in this area (#643) downgraded a
mechanical deny/ask to a human prompt on the hook side; none produced a silent self-merge on their
own. It is still a real weakening worth fixing — the whole point of #649 is that the same class of