Repository navigation
Commit 120ca3c
committed
feat(pm/fleet-write): run_rerun_failed's seventh fence — the run's head is its pull's current head
A run_rerun_failed is now refused unless the run's head_sha equals the
current head of the pull it names. The pull is the run's
pull_requests[0].number, and its head is read with the pull's own
GET /repos/{repo}/pulls/{n}, never from the copy the run embeds. A run
naming no pull (a fork pull request's run, or the field empty) is refused
by name. ci.yml's concurrency group is keyed by the pull number with
cancel-in-progress true, so a stale head's re-run would cancel the
current head's run.
The executor judges it authoritatively: the run and then the pull are
the last two reads before the POST, and a stale head, a run naming no
pull or an unreadable pull is zero writes with the POST row not sent.
The wrapper judges it earlier as an advisory refusal naming the fence.
RERUN_FAILED_FENCES gains the head fence, every predicate now takes
(run, pull), and the self-test batteries that judge it gain cases on
both sides, with their pins raised: validate 30 to 33, execute 17 to
21, rerun-failed's seat fences 8 to 11.
Claude-Session: https://claude.ai/code/session_01FM29ZqLTrnPNXxijioZwMp
Co-authored-by: Claude <noreply@anthropic.com>1 parent f2ee5ad commit 120ca3c
5 files changed
Lines changed: 225 additions & 104 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
0 commit comments