Repository navigation
GitHub practice: document the --match-head-commit merge guard; re-require sota-sources - #430
Conversation
a9b7fb9 to
d9e90e0
Compare
Strict up-to-date checks stay off and this User-owned repository cannot use a merge queue (docs/decisions/2026-09-22-github-automation-closure.md), so `gh pr merge <N> --squash --match-head-commit <SHA>` is the guard against merging a head nobody reviewed (https://cli.github.com/manual/gh_pr_merge). It was practised but not written down: grep for match-head-commit across docs, recipes, adoption, examples and AGENTS.md returned nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The live ruleset 23739774 now requires the committed eight checks. Before-GET 21:00:04Z (seven, no sota-sources); PUT of .github/main-ruleset.json at main e82e6be at 21:00:13Z; after-GET matches the committed file. Records the open PRs affected at PUT time and the rollback. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
d9e90e0 to
1525c10
Compare
|
Relabelled |
…dence manifest, PR files re-registered) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t before merge (B1, B2) B1: <SHA> is the full 40-character headRefOid read with gh pr view <N> --json headRefOid,statusCheckRollup immediately before the merge, on which the review completed and every required check ran with none running or failed. The hot-file protocol's rebase or merge of main comes before that read; if main changed a shared hot file after <SHA>, merge main again, wait for the checks on the new head and pin it; the review carries over only if the reviewed files are byte-identical (GitHub's stale-approval rule, available-rules-for-rulesets). Sources: gh 2.101.0 'gh pr merge --help'; cli/cli v2.101.0 pkg/cmd/pr/merge/http.go L77-80 (expectedHeadOid); GraphQL MergePullRequestInput.expectedHeadOid read by schema introspection and in github/docs src/graphql/data/fpt/schema-pulls.json. B2: the flag guards the head, not the base: with strict up-to-date checks off and no merge queue, two PRs green against an older main can still break it together (GitHub docs, loose required status checks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ls, executable rollback (B3, B4, B5) B4: the before-GET, PUT, after-GET and PR-status claims are labelled historical, recorded by the PR author, output not retained. Measured today (2026-09-29T03:18:04Z, read-only): the recorded diff of the live ruleset 23739774 against origin/main (b0fb65b, GitHub's main tip then) exited 0 after stripping eight response-metadata keys and sorting rules by type; the rules order is the only other difference; the 57fb6d8 negative control exits 1 on the sota-sources context only; updated_at is still the recorded PUT second. packet.md L90-92 cited as historical corroboration. B3: rollback is git show 57fb6d8:.github/main-ruleset.json | gh api --method PUT .../rulesets/23739774 --input - (not run); verified 57fb6d8's file equals 7bbb021's minus sota-sources (jq -S, cmp exit 0) and main still carries 7bbb021's file. B5: a rebase is not the only way to get a sota-sources run (validate.yml L6-9 reopened/edited; docs/lanes.md merge path), GitHub starts no pull_request run while a PR conflicts, and reporting is not passing (the job reads only the description, L517-521); #205/#216 measured CONFLICTING with no sota-sources run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecord in manifests/evidence.json Registered with host_receipts.register_file; component_matrix.py --write and new_host_grand_list.py --write left the four generated reports unchanged; scripts/validate.py passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ks --required; move merge-guard mechanics to the decision record The round-one verifier showed the documented statusCheckRollup filter prints superseded runs, so 'none failed' could not be judged with it (merged #389, #411 and #413 each show an earlier sota-sources failure and a later success on the final head). gh pr checks --required lists only the required checks with the latest run of each; measured exit 0 (all passed), 1 (one failed, none pending) and 8 (pending). The implementation-level citations move to the decision record, the stale-approval comparison is called an analogy, and 'today' leaves the dated record. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t, branch files re-registered) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review record, 2026-09-29 (native-agent-stack-10). Merge candidate: head
|
|
Trading lane acknowledgement (
No objection. |
Scope
docs/lanes.mdnow documents the merge guard,gh pr merge <N> --squash --match-head-commit <SHA>. The guard was already practised but not written down. The live ruleset now has its committedsota-sourcesrequirement back: the PUT ran at 2026-09-27T21:00:13Z, and this PR records the dated GETs before and after.55fc8d17(the parent of this branch's first commit). Corrected 2026-09-29: the earlier text named0f76651d, which is not the base.lane:shared. Corrected 2026-09-29: the earlier text saidlane:foundation, but this PR editsdocs/lanes.md, anddocs/lanes.mdL30 makes any change to that file shared. Under L149-150 the trading lane's acknowledgement is required, on this PR at the head SHA it acknowledges, before merge. The PR label is alreadylane:shared.docs/lanes.md,docs/decisions/2026-09-22-github-automation-closure.md(the drift-closed entry) and the hash re-registration inmanifests/evidence.json.SOTA sources
gh pr merge.--match-head-commitis the "Commit SHA that the pull request head must match to allow merge".docs/decisions/2026-09-22-github-automation-closure.md: strict mode is off (L553-563). Thesota-sourcesdrift is recorded as open (L1543-1550)..github/main-ruleset.jsonL34-43 is the committed target.Evidence-class table
grep -rn 'match-head-commit' --include=*.md docs recipes adoption examples AGENTS.mdreturned nothing (2026-09-27)sota-sourceswas missinggh api repos/seathatflowsinourveins/native-agent-stack/rulesets/23739774(2026-09-27)sota-sourcesrun; 4 of them also showed an earlier failed or cancelled rungh pr list --state merged --limit 60 --json number,statusCheckRollup(2026-09-27)gh api --method PUT .../rulesets/23739774 --input .github/main-ruleset.json; before and aftergh api .../rulesets/23739774.github/main-ruleset.jsonatmainb0fb65b4in name, target, enforcement, bypass actors, conditions and every rule; the 8 response-metadata keys and the rule order are normalized away, and the negative control at57fb6d89differs only by thesota-sourcescontextdiff <(gh api ...) <(git show ...)command in the decision-record entry: exit 0, and exit 1 for the controlsota-sources, #205 and #216 had no run (their last runs predate the job), and #415 and #417 passedgh pr checks <N>(2026-09-27 21:00Z); on 2026-09-29 #205 and #216 are stillCONFLICTINGwith nosota-sourcesrungh pr checks <N> --requiredlists the required checks with the latest run of each; exit 0 all passed, 1 one failed, 8 pendinggh pr checks 389 --requiredexit 0 (8 checks pass);#436exit 1;#409exit 8;gh pr view 389 --json statusCheckRollupshows the earliersota-sourcesfailure that--requiredhidesLocal commands run
Status
Ready for review. The ruleset PUT ran at 21:00Z on 2026-09-27 as announced to the owners of the open PRs failing
sota-sources(messaged at about 19:58Z); its before-GET and after-GET were not retained. This PR's record of the drift closure, its rollback (git show 57fb6d89:.github/main-ruleset.json | gh api --method PUT .../rulesets/23739774 --input -, not run) and the 2026-09-29 read-only re-derivation are in the decision record.Review round (2026-09-29, native-agent-stack-10)
Head reviewed:
35b7ed74, by two model families, read-only. GPT-6 (gpt-6-astra, effort max,codex exec -s read-only; the model is the-mrequest, not an observed resolution): needs_changes (1 major, 2 minor). Claude evidence-reviewer (Opus, max): needs_changes (2 major, 4 minor, 2 nit). Repairs, with an independent Opus stack-verifier that re-ran the checks: the merge-guard procedure now defines<SHA>as the head on which review and required checks completed, reads it withgh pr checks --required(after the verifier showed the first draft'sstatusCheckRollupfilter prints superseded failed runs), and separates head protection from base freshness; the rollback is an executable command; claims without retained output are labelled historical and replaced by the measured re-derivation; the #205/#216 sentence no longer says a rebase is required. This body's Lane line and base commit were corrected. Not fixed: the hot-file edit sits in an earlier commit than the last one in this branch's history (moot under a squash merge).🤖 Generated with Claude Code