Skip to content

docs(agents): document how to verify a "superseded" closure claim - #1906

Merged
seonghobae merged 3 commits into
mainfrom
docs/verify-supersession-before-close
Sep 5, 2026
Merged

docs(agents): document how to verify a "superseded" closure claim#1906
seonghobae merged 3 commits into
mainfrom
docs/verify-supersession-before-close

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

AGENTS.md already requires "verified complete successor carryover of every unique valid delta" before retiring a PR (docs/org-required-workflow-rollout.md), but never said how to verify it — so a closure whose comment reads convincingly can discard real, tested delta. This adds the verification method, and the caveats that make each command trustworthy.

The motivating case: .github#1661 was closed as "superseded by protected main… later focused PRs also landed the queue/concurrency, telemetry, credential, and review-gate slices represented in this branch." Checking that against the tree instead of reading it: git grep -lF "cancel-superseded-noema-runs" origin/main -- returned nothing (a ~450-line Actions concurrency-deadlock fix, with tests, was on no other branch), and 3 of the 4 doctoring docs the PR body cited were absent from main. It was reopened with that evidence. Nothing in the closing comment's wording distinguished it from a correct one — only running the commands did.

This PR was itself corrected by a cross-model audit

The first draft was audited by an independent read-only codex exec pass, which found seven factual problems. That is worth stating plainly, because it is direct evidence for the cross-model review bullet peer 3 landed in #1907:

Draft claim Verdict
An in-workflow admission job makes cancel-in-progress: true safe Wrong — workflow-level concurrency cancels before any job runs, so no job can precede it. It also contradicted AGENTS.md's existing "put concurrency at workflow scope" line, and the SHA-suffix point was already covered two bullets above. Bullet dropped entirely.
git diff --stat origin/main <head> shows the PR's scope Wrong — two-dot renders everything main gained since the fork point as deletions by the branch, so a stale PR reads as a mass revert. Now three-dot.
git show origin/main:<path> failing means it "never landed" Wrong — it may have landed and later been deleted. Now says the path exists now.
git grep -l "<symbol>" proves inheritance Partly wrong — proves string presence/absence only (a successor may rename or restructure), and the pattern is a regex. Now -F, with the inference qualified.
Closure requires these four conditions Unverifiable as stated — now quotes the repo's actual documented rule instead of an invented list.
"Several PRs here carry a stale title" Unsupported — named no PRs. Dropped.
"When verification fails, reopen" Overstated — conflated inconclusive evidence with disproven succession. Now qualified.

A peer then corrected the correction: the added ancestry caveat first claimed this repo squash-merges everything, generalized from eight commit titles. A parent-count census settled it — 153 single-parent vs 47 two-parent over 200 commits — so the repo mixes both, and the accurate statement is that git merge-base --is-ancestor is unreliable in both directions here.

What this adds

  • AGENTS.md — "Verifying a 'superseded — closing' claim": three-dot diff for real scope, git grep -lF and git show with their actual evidentiary limits, the ancestry caveat, and a qualified reopen instruction.
  • CLAUDE.md — a pointer plus the two repo-specific traps (two-dot diff, --is-ancestor).

Doc-only. No code, no behaviour change.

Test plan

  • Full suite on this exact head: coverage run -m pytest tests -q2883 passed, 1 skipped, 21 subtests passed
  • The three test files asserting on AGENTS.md/CLAUDE.md content — 118 passed
  • Two-dot vs three-dot difference reproduced directly before rewriting the bullet
  • Parent-count census re-run independently before accepting the peer's correction

Coordination

Part of a five-session split of this documentation work, merging sequentially to avoid conflicts in these two files. Stacked behind peer 3's #1907 (merged, already rebased onto). Peer 2's test-gate section rebases behind this one.

🤖 Generated with Claude Code

"repair, don't close" is already a standing convention, but the *verification
method* was never written down -- so a closure whose comment reads convincingly
could discard real, tested delta. Records the commands that actually caught one
(#1661, closed as "superseded by protected main" while a ~450-line concurrency
fix and 3 of 4 cited doctoring docs were provably absent from main):
git grep -l "<symbol>" origin/main --, git show origin/main:<path>, and
git diff --stat origin/main <head> because a long-lived branch's title records
what it was opened for, not what it now contains. Narrowing a PR into
successors is the same claim and needs the same proof.

Also records why cancel-in-progress: true is safe on a PR-scoped group once an
admission job re-verifies the live head -- the SHA-suffix and
cancel-in-progress: false workarounds are then unnecessary.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: d59d6329-c413-4ec6-b48a-af37c708b725

📥 Commits

Reviewing files that changed from the base of the PR and between 27d7331 and daf8f8e.

📒 Files selected for processing (2)
  • AGENTS.md
  • CLAUDE.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…odel audit

An independent read-only Codex audit of the first draft found seven factual
problems. Corrected here rather than shipping guidance that would mislead:

- Dropped the cancel-in-progress bullet entirely. It claimed an in-workflow
  admission job makes cancel-in-progress: true safe, but workflow-level
  concurrency cancels before any job runs, so no job can precede it. It also
  contradicted the existing "put concurrency at workflow scope" guidance, and
  the SHA-suffix point was already covered two bullets above.
- git diff now uses three-dot (origin/main...<head>). Two-dot reports main's
  own newer commits as phantom deletions by the PR -- precisely wrong for the
  stale PR this section is about.
- git grep gains -F (it is a regex otherwise), and no longer claims absence
  proves the delta is missing: a successor may have renamed or restructured it,
  and a match does not prove behaviour was inherited.
- git show now says the path exists *now*; a non-zero exit does not mean the
  content never landed, since it may have landed and later been deleted.
- The closure conditions are quoted from the repo's actual documented rule in
  docs/org-required-workflow-rollout.md instead of an invented four-item list.
- Dropped an unnamed "several PRs" claim, and qualified the reopen advice:
  inconclusive evidence is not disproven succession.

Adds the ancestry caveat: git merge-base --is-ancestor answers a different
question, and is unreliable in both directions here because this repository
mixes squash merges with real merge commits (measured: 153 single-parent vs
47 two-parent over 200 commits).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@seonghobae
seonghobae merged commit 525d16b into main Sep 5, 2026
3 of 12 checks passed
@seonghobae
seonghobae deleted the docs/verify-supersession-before-close branch September 5, 2026 08:38
seonghobae added a commit that referenced this pull request Sep 5, 2026
#1906 landed "Verifying a 'superseded — closing' claim", which already
covers ancestry-vs-content in more depth than my draft's version did
(three-dot diff, `git grep -lF`, `git show origin/main:<path>`, and the
squash/merge-commit mix that makes `git merge-base --is-ancestor`
unreliable in both directions). Removed my duplicate bullet and pointed
at that section instead.

What remains here is the part a single-PR closure check does not cover:
a PR split across several successors fails differently, because no
individual successor looks wrong. Added the union question explicitly,
and kept the end-to-end check — git-level commands show whether text
moved, not whether behaviour is restored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant