Invariant
Whenever check accepts a carried verdict, every fact it relies on is proved
against the same PR payload it just fetched — the PR is open, its head is the
state head, and its base still matches what the carry recorded.
Current violation (observed 2026-08-11)
The carry-acceptance path in check re-fetches the pull request to revalidate
the base after a retarget (PR #410 shepherd round 4), but reads only
.base.ref and .base.sha from that response. The same payload already
carries .state and .head.sha. So if the PR closed, or another push landed,
after the earlier provider_head check but before this fetch, check accepts
and emits a clean result for a head the PR has left — or for a PR that is no
longer open — despite holding the evidence that says otherwise.
Narrow window and fail-open, which is why it was P2 rather than blocking:
the payload proving the problem is already in hand, so the fix is reading two
more fields, not another request.
Verify
rg -n -A12 'carry_pr_payload=' \
ai/skills/universal/shepherd/assets/check-codex-cloud-review.sh
If that block reads only .base.ref / .base.sha and never .state or
.head.sha, this is still open.
Found by the current-head Codex review of #410 (comment 3759562087), settled
by filing because that PR had reached its shepherd round cap.
Invariant
Whenever
checkaccepts a carried verdict, every fact it relies on is provedagainst the same PR payload it just fetched — the PR is open, its head is the
state head, and its base still matches what the carry recorded.
Current violation (observed 2026-08-11)
The carry-acceptance path in
checkre-fetches the pull request to revalidatethe base after a retarget (PR #410 shepherd round 4), but reads only
.base.refand.base.shafrom that response. The same payload alreadycarries
.stateand.head.sha. So if the PR closed, or another push landed,after the earlier
provider_headcheck but before this fetch,checkacceptsand emits a clean result for a head the PR has left — or for a PR that is no
longer open — despite holding the evidence that says otherwise.
Narrow window and fail-open, which is why it was P2 rather than blocking:
the payload proving the problem is already in hand, so the fix is reading two
more fields, not another request.
Verify
rg -n -A12 'carry_pr_payload=' \ ai/skills/universal/shepherd/assets/check-codex-cloud-review.shIf that block reads only
.base.ref/.base.shaand never.stateor.head.sha, this is still open.Found by the current-head Codex review of #410 (comment 3759562087), settled
by filing because that PR had reached its shepherd round cap.