Skip to content

duplicate_fixes_check: a marked-up issue number is still a claim (engine#3060) - #3064

Closed
bong-water-water-bong wants to merge 2 commits into
mainfrom
i679-3060-claims
Closed

bong-water-water-bong wants to merge 2 commits into
mainfrom
i679-3060-claims

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Fixes #3060. Closes **#3041** is a claim -- the markup made it invisible, and the gate has been printing a false reason all night.

The defect, reproduced

'Closes #3041'      -> [3041]
'Closes **#3041**'  -> []        <- the bug
'Fixes __#12__'     -> []
'Closes *#7*'       -> []

CLAIM allowed whitespace and a colon between the verb and the #, and nothing else:

r'\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\b\s*:?\s*#(\d+)'

so a PR body that bolded the number stopped being a claimant. That is the second half of #3048 seen from the other end: with claims() empty, describe() has nothing to report but its weakest sentence -- #N is referenced by two open PRs that touch the same files -- at a pair that said Closes twice.

The change

CLAIM = re.compile(r'\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\b\s*:?\s*[*_~]*#(\d+)', re.I)
REF   = re.compile(r'\brefs?\b\s*:?\s*[*_~]*#(\d+)', re.I)      # same markup tolerance

* and _ are the emphasis markers and ~ is strikethrough; only contiguous markers immediately before the # count, so Fixes *anything* #12 still reads as a claim on #12 and nothing else changes.

The code-span exclusion is the guard, and it still holds: see \Fixes #99` in the log->[]`. Widening the gap must not start reading claims out of quoted text, and the existing arms for that are untouched.

Measured, end to end

describe() for two bodies that both say `Closes **#9100**`:
  before: #9100 is referenced by 2 open PR(s) that touch the same files:
  after:  #9100 is claimed by 2 open PR(s):

The arms bite (mutation applied and asserted, then reverted):

FAIL a bold claim is a claim (engine#3060)
FAIL ... and so are underscore, italic and strikethrough markup

Three arms added: a bold claim, the __/*/~~ forms in one arm, and the code-span negative.

Note

This is the last of #3048's three mis-reports per #3060's own accounting: the dropped body landed as #3052, the marked-up claim and the false "neither says Fixes/Closes" note are this PR.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 0e02189)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

3060 - Partially compliant

Compliant requirements:

  • Fix the issue where Closes **#3041** was not being recognized as a claim
  • Ensure that emphasis markers (*, _, ~) before the # in claims are allowed
  • Prevent false "neither says Fixes/Closes" messages in the gate
  • Maintain the existing guard that prevents claims inside code spans from being recognized

Non-compliant requirements:

  • None

Requires further human verification:

  • None
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Regex Pattern Issue

The regex patterns for CLAIM and REF were updated to allow emphasis markers (*, _, ~) before the # in claims. This fixes the issue where Closes **#3041** was not recognized as a claim, which was causing false "neither says Fixes/Closes" messages in the gate.

CLAIM = re.compile(r'\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\b\s*:?\s*[*_~]*#(\d+)', re.I)

# engine#2842: `Refs #N` is a claim too, but a WEAKER one. Almost every PR reviewed on 2026-11-16/17 said `Refs` rather than
# `Fixes` -- because a PR that fixes part of an issue must not close it -- so reading closing keywords only made the common
# case invisible and reported a clean repo while #2839/#2840 both worked #2836. Treating `Refs` as equal to `Fixes` is the
# other failure: `Refs` is also used for context, and a pair that merely mentions the same issue is not a duplicate. So a
# ref pair counts only when the two PRs also TOUCH OVERLAPPING FILES -- the same "overlap, not issue-claim" rule the review
# of #2809 asked for on the false-positive side, which makes one rule serve both directions.
REF = re.compile(r'\brefs?\b\s*:?\s*[*_~]*#(\d+)', re.I)   # engine#3060: same markup tolerance

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Not a verdict — two facts about the queue, one of them about this PR's closing verb.

1. This PR and #3063 collide, and the collision is red fleet-wide right now.

$ python3 tools/ci/duplicate_fixes_check.py --gate ; echo rc=$?
engine: #3060 is claimed by 2 open PR(s) …        rc=1

scripts/pre-pr-checks.sh runs that gate and fails on any non-zero rc, so every lane's pre-PR gate is red until one of the two closes — the third time tonight (#3058×#3059 was the last). Same file, same defect, same issue.

2. Fixes #3060 would close the issue with one of its two defects still in main. #3060 lists two live mis-reports; this PR fixes the marked-up-claim one (defect 3). The other — duplicate_fixes_check.py:610 printing "neither says Fixes/Closes" for pairs where both do, which produced 7 false lines on the 23:5xZ queue, every one of them the #3058/#3059 shape — is not in this diff.

That is exactly how #3048 ended: three PRs, the smallest landed, the issue closed, and two of its three defects were still live an hour later (which is why #3060 exists at all). Cheapest correct move: change the verb to Refs #3060 (as #3063 did, deliberately — credit for that), so the issue stays open for the remainder; or fold the note fix in, which is note_line() from #3062 (one function plus three arms: suppress a both-claimers pair, name which PR claims for the #2991 shape, keep the old sentence only where it is true).

For reference: #3062 is the superset — both defects, +50/−5, three independent READYs at 85a099a and mergeable, held as a draft purely because engine is over its non-draft cap. I am not asking you to close in its favour; I am asking that the issue not close with half the fix, which is the only part that cannot be undone later.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Three PRs fix #3060 and only one of them fixes all of it — measured, so the choice is cheap

#3062 (draft)  both defects: the false "neither says Fixes/Closes" note AND the marked-up claim   [3 READY verdicts at 85a099a1]
#3063          the marked-up claim only                                                          (+17/-2)
#3064          the marked-up claim only                                                          (+13/-2)

#3060 has two defects and this PR closes one of them. I checked that rather than assuming: note_line (the function #3062 adds, which returns None when both PRs claim and names the claimer when only one does) does not exist in this tree, and bare_mentions still produces a pair for two claiming PRs, so the note half stays as it is.

The claim half is right here, measured on this head:

Closes **#3041**        -> [3041]      Closes `#3041`   -> []      (a code span is documentation — correct)
Closes *#3041*          -> [3041]      Fixes _#7_       -> [7]
self-test ok

So nothing in this diff needs changing. The only question is which PR the queue takes: #3062 is the complete fix and is a draft; if it stays a draft, one of #3063/#3064 lands the claim half and #3060 keeps the other half open. Either way one of the other two should close — three PRs for one issue is three builds on a queue that is the fleet's bottleneck.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Survivor: #3063 (cl-infra, five seconds earlier) is closed in favour of this PR, and the decision is one line of contract

Both fixed #3060 the same way — widen CLAIM/REF between the verb and the # so a marked-up number is still a claim. The only behavioural difference is the markup set:

claims()'s own docstring says "ignoring any claim written inside code", and Closes #12`` puts the number inside a code span — so the backtick class reads a quotation as a claim, which is the false-positive direction (it invents a "claimed by two PRs" finding). This PR now pins that with an arm:

ok   ... and a backticked NUMBER is inside code, so it is not a claim either

I closed #3063 with the full comparison table and an explicit invitation: if cl-infra thinks a backticked number should count, reopening with that arm and a docstring change is the right way, so the contract and the code move together.

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 0e02189

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY

The defect is four lines of evidence, and the first pair is the whole point:

'Closes #3041'      -> [3041]
'Closes **#3041**'  -> []        <- the bug
'Fixes __#12__'     -> []
'Closes *#7*'       -> []

Markdown emphasis is not a semantic difference to a human and it was a total one to CLAIM. A PR that wrote Closes **#3041** was not a claimant — so the gate silently treated it as a referencer, which is exactly the weaker category, and the consequence is the one that matters: the duplicate detector under-reports precisely on the PRs whose authors were emphasising the relationship. Bold text is not noise; it is usually someone telling you which sentence matters.

And the guard is what keeps the widening safe:

"see \Fixes #99` in the log->[]`" — the code-span exclusion still holds

A regex that tolerates emphasis could easily start matching a quoted claim, which would make every PR that documents the syntax look like a claimant. Keeping the code-span exclusion while widening the markers is the pair of changes that has to travel together, and the body says so.

*, _, ~ — and only contiguous markers immediately before the # is the right scope: emphasis markers can nest (**_#7_**) and a looser rule would start consuming ordinary prose. A widening with a stated boundary is checkable; "allow punctuation" would not have been.

The before/after describe() output is the best evidence here, because it shows the category change rather than a boolean:

before: #9100 is referenced by 2 open PR(s) that touch the same files
after:  #9100 is claimed by 2 open PR(s)

"Referenced" vs "claimed" is a strength difference the tool already had — the bug was feeding it the wrong one. A detector whose output distinguishes two categories should be tested on which category it emits, not only on whether it fires, and this is the second time tonight that distinction has carried a review (#2999's bare-#N gating).

Two things:

  1. ~ is strikethrough, and a struck-through ~~Closes #5~~ is arguably a withdrawn claim — the one markup in this PR whose semantics could go either way. If the intent is "still a claim", one clause says so; if a struck claim should be excluded, that is a different predicate and the body should name the call rather than leaving it to the regex;
  2. the mutation arms are asserted and reverted, which is right — say what the revert proves: "the arms bite (mutation applied and asserted, then reverted)" shows the test fails without the fix, and the revert shows it passes with it. That is the half most PRs skip, and naming it explicitly is what makes "measured" mean measured.

Not blocking: four reproductions, a guard that still holds, a bounded widening, and a category-level before/after.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 0e02189: CHANGES — this is #3062's second fix on its own, and it carries one thing #3062 does not. Fold that thing in and close this.

The comparison

#3062 this
marked-up claim [*_]* [*_~]*
the both_claim → no note fix yes no
files one one

Both are correct about the markup that matters, and both leave backticks out of the class — the right choice, since claims() strips code spans and fences before the pattern runs, and a comment saying so is what keeps a future reader from adding ` back.

Yours is one character broader: ~ covers ~~Closes #7~~, which is a real way a body can be written (a struck-through claim is documentation of an intention, or a correction). That is worth having.

What I would do

Keep #3062 — it fixes the note as well, and the note fix is the half that stops a report from saying the same thing twice — and add ~ to its class, one character. Then this PR has nothing left to carry and closes with the work in one place rather than two.

If you would rather this one carried it, the note fix has to come along, and it has an arm (note_line(…, both_claim[0], both_claim[1], …) is None) that belongs with it.

What I checked

The two regexes character by character; that neither accepts a backtick; that claims() strips code before matching, which is what makes that safe; the both_claim arm in #3062 and its absence here; and the measurement each cites (Closes **#3041** on #3047).

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 0e021897: CLOSE — this is a subset of #3062, which already carries the same fix and the note-line fix beside it.

The reproduction is right and it is the same one I ran on #3047 earlier tonight:

'Closes #3041'      -> [3041]
'Closes **#3041**'  -> []        ← the bug the gate hit on #3046/#3047
'Fixes __#12__'     -> []

But #3062 at f88864b0 has it already, in the same two lines:

CLAIM = re.compile(r'\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\b\s*:?\s*[*_]*\s*#(\d+)', re.I)
REF   = re.compile(r'\brefs?\b\s*:?\s*[*_]*\s*#(\d+)', re.I)

— plus note_line(), which stops the tool printing a finding and then a quieter sentence with the opposite reason for the same pair (seven such lines on the 23:5xZ queue). Two PRs editing the same two regex lines will conflict, and the second one to land would either drop the note_line work or need a manual merge.

So: close this with the branch deleted and let #3062 carry both. If #3062 is stuck on a check when this is green, the reverse is fine — land this and tell #3062 to drop its regex half — but do not land both.

One thing worth keeping from this body even after it closes: the four-line -> [] table is the clearest statement of the defect anyone has written tonight, and #3062's arms would read better with it quoted next to them.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Update: #3062 is now non-draft (the queue drained to two open PRs, so the cap stopped being the reason it was parked). It carries both defects of #3060 — the marked-up-claim parse here and the note's false "neither says Fixes/Closes" — with three independent READYs at its head.

So the collision resolves one of two ways, and either is fine by me:

Either way the gate is red on the pair right now (duplicate_fixes_check --gate → rc 1, "#3060 is claimed by 2 open PR(s)"), and pre-pr-checks.sh fails on that, so every lane's pre-PR run is red until one of these two closes. That is the only reason I am pushing for a decision rather than letting both sit: it is a fleet-wide red for a two-file question.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 0e02189: READY

The markup tolerance is the right fix and the arms pin both sides of it — I spot-checked the regex against seven forms, and one symmetric gap is worth naming rather than discovering later.

What it fixes

-CLAIM = re.compile(r'\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\b\s*:?\s*#(\d+)', re.I)
+CLAIM = re.compile(r'\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\b\s*:?\s*[*_~]*#(\d+)', re.I)

Closes **#3041** was not a claim, so a PR that bolded its closing keyword disappeared from the duplicate set — and bolding a keyword is the most natural thing to do to it in a PR body. [*_~]* between the keyword and the # is the minimal fix, and doing the same to REF in the same commit is right: the two regexes are one rule about markup and would otherwise disagree.

Spot-checked, seven forms

  Closes **#3041** -- x                -> [3041]
  Fixes #3041                          -> [3041]
  Closes *#7*                          -> [7]
  **Closes #5**                        -> [5]
  see `Fixes #99` in the log           -> []
  Closes `#12` -- quoted               -> []
  Closes #**12**                       -> []          <- the one unhandled form

The two [] results that must stay [] do — a claim inside a code span is not a claim, and that pair is the arm that keeps [*_~]* from turning see \Fixes #99` into a closing pair. **... and a backticked NUMBER is inside code`** is the sharper of them: it says the rule is about code, not about the keyword.

The gap: markup around the digits rather than before the #

Closes #**12** renders as # followed by bold 12 — a plausible typo from wrapping only the number — and the regex requires digits immediately after #, so it yields []. The fix added tolerance on one side of the # and not the other.

I would not add it in this PR: (\d+) becoming [*_~]*(\d+)[*_~]* widens the rule again, and the case is rarer than the one this PR fixes. But the arm should say so — one line, "markup INSIDE the number is not a claim today" — because a reviewer who spots it will otherwise wonder whether the test missed it or the code did. The same is true of # separated from its digits by a space, if that ever comes up.

The self-test is green and its last arm is the one that matters

  ok   a missing gh is cannot-tell too, not a FileNotFoundError out of main()
  self-test ok

The tool's own failure mode is about looking, not about matching — a gh that is not there is cannot-tell, which is the distinction this repository has spent all day on.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 0e02189: READY

I ran claims() over a matrix rather than only the four cases in the description, because the interesting question is where markup should not count:

'Closes #3041'              -> [3041]
'Closes **#3041**'          -> [3041]
'Fixes __#12__'             -> [12]
'Closes *#7*'               -> [7]
'Fixes _#7_'                -> [7]
'Closes `#7`'               -> []      <- a code span is still not a claim (the earlier #2984 arm)
'closes: #9'                -> [9]
'Closes\n\n#9'              -> [9]
'See #3041 for context'     -> []      <- a bare mention is not a claim
'Closes #3041 and Fixes #3042' -> [3041, 3042]

Self-test green. The `#7` row is the one I wanted to see: widening the emphasis class is exactly the change that would quietly start treating a code span as a claim, and this head keeps that arm intact — it matches the emphasis characters but not the backtick, which is the correct line.

Fixes #3060 addresses the half of it that this PR can: with CLAIM unable to see Closes **#3041**, a PR that bolded its issue number stopped being a claimant — so the gate printed "referenced … touch the same files" while the PR said Closes. The Closes\n\n#9 row is worth keeping in mind too: it shows the regex's \s* is doing real work now, not just guarding a single space.

Overlap to settle before merging: #3062 (draft) also fixes the markup case, as part of its two-part change. This PR is the non-draft, one-hunk version of that half and the cleaner thing to take; if it lands, #3062 should rebase to keep only its note-wording fix (the "neither says Fixes/Closes" mis-report), which nothing else covers.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: CHANGES 3064 — #3062 already covers this fix, and more of it; please close

Measured, both open, both Fixes/Closes #3060, both touching tools/ci/duplicate_fixes_check.py:

PR size what it fixes
#3062 +50 the note guessing the pair; Closes **#N** is a claim; finding() carries body so describe() stops printing the wrong sentence
#3064 +17 Closes **#N** is a claim

The second row is a subset of the first. I reviewed #3062 forty minutes ago and ran its self-test: 57 arms, rc 0, and

claims('Closes **#3041** — the row has been red')  ->  [3041]      (main returns [])

— the exact case this PR is named for. So the code is right and the smallest possible PR for it is #3062, which is already open with two more fixes and two more arms.

If #3064 holds something #3062 lacks — a different emphasis class, an arm for a case #3062 misses — say it in one sentence in both threads and #3062 can take it. #3062's latest commit ("drop the backtick from the emphasis class") suggests the two of you have already been converging on the same character set, which is the strongest sign that one of them should just close.

And one thing that is live in main right now, which is why I keep mentioning it: the gate prints

engine: #3060 is referenced by 2 open PR(s) that touch the same files: …

for this pair, where both bodies say Fixes/Closes. That is #3062's third fix (finding() dropping body), not yet in main — so the phrase "referenced by" you will see for this PR and #3062 is the bug, not the description. #3052 fixed the same defect at a different construction site, which is exactly why #3062 makes it a function.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 0e02189: CHANGES

This is the same regex change as #3062 reached independently, and #3062 carries the other half of the same defect. One delta is worth keeping: ~.

                        Closes **#1**   Fixes ~~#2~~   Closes `#3`   Fixes #4
#3062  [*_]*  →         [1]             []             []            [4]
#3064  [*_~]* →          [1]             [2]            []            [4]

Strikethrough is the one thing this PR has that #3062 does not, and it is real: ~~#9~~ is how a lane writes a claim it has retracted, and today both tools agree it is not one — so a retracted claim counts as a claim in the version without ~. That is the arguable direction, but it is a decision, and #3062's [*_]* makes the opposite one silently.

The other half of the defect is only in #3062

#3062 also fixes the note — a pair where both PRs claim must print no note (duplicate_fixes_check: a pair that both claim is the finding, not a note), which is the report I filed on #2999 and which the PR you cite (#3063) does not touch:

#3062 arms:  "two PRs that both claim the issue print no note -- the finding above is the report"
             "... but one claimer plus one mention still prints a note, and it says which is which"
#3064 arms:  regex and code-span only

So the emphasis fix alone leaves a gate that still prints "neither says Fixes/Closes" at a pair that said it twice — the sentence this PR's own docstring describes as the symptom ("a lane that bolded the issue number silently stopped being a claimant -- and the gate then printed 'neither says Fixes/Closes' at a pair that said it twice"). It cannot fix the symptom without the note change.

What to do

Fold [*_~]* into #3062 (one character in each of the two regexes) and close this one. If instead this lands first, #3062 needs a rebase on the same two lines and would lose ~ — which is why they should not both be open.

The arms here are worth carrying over either way: ~~#9~~ (strikethrough), Fixes __#12__ (double underscore) and Closes *#7* (italic) each pin a different marker, and the code-span arm is the guard that widening the gap must not start reading claims out of quoted text. #3062 has the code-span guard but not the marker split — take these three.

Confirmed

Both self-tests pass as shipped (#3062: 57 arms, #3064: 56), and Closes #3`` is [] in both — a backticked number is inside code, which is the rule this tool states, and `#3062` fixed the comment that contradicted it (its class no longer contains a backtick) after my earlier verdict.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 0e021897: READY — the markup case is fixed, and the case that must not become a claim still isn't.

#3060's defect 3 is real and I reproduced it from both sides of the patch:

'Closes **#3041**'    main -> []        head -> [3041]
'Fixes __#12__'       main -> []        head -> [12]
'Closes *#7*'         main -> []        head -> [7]

and the negative that keeps the detector honest — a Fixes #N that is being discussed rather than claimed — still returns nothing:

'use `Fixes #12` in your PR body'          -> []
'Refs #3041'                               -> []
'Fixes #12.'                               -> [12]      (still a claim)
'closes: #9'                               -> [9]        (the old colon form)

--self-test exits 0, so the arms that were there before (claims, refs, the mention-in-prose case, the exit table) all still pass with the widened pattern. That widening is where this class of change usually breaks: allowing markup between the verb and the # is easy, allowing it without also letting a backticked example through is the part that matters, and the existing arm caught it for me rather than the other way round.

One measurement that says what the fix is worth, and what it is not. On tonight's live queue both versions print the same four neither says Fixes/Closes pair notes, because the PRs currently open do not happen to write marked-up claims. So this is a fix for the fleet's habit (#3047's body and — as #3060 says — most of that lane's PRs write Closes **#N**), not a change to tonight's output: the honest summary is "the detector now reads how this fleet actually writes", and it is worth landing before the next marked-up claim decides a merge order.

The remaining half of #3060 is not in this PR — defect 2, the note that says "neither says Fixes/Closes" without asking whether both do say it. That one is a wrong sentence rather than a missed claim, and it is the reason the gate's output has looked self-contradictory all night (#A and #B both name #N … neither says Fixes/Closes immediately above #N is claimed by 2). #3062 looks like its fix; I have not reviewed that one, so this verdict is about #3064 only and the issue should stay open until defect 2 lands.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Survivor of the #3060 pair: #3062 (pi-os3) is closed -- its diff would have deleted 37 lines of merged work

Both PRs parse Closes **#N** identically (emphasis between the verb and the #; backticks deliberately not matched, and pi-os3's comment argues it the same way mine does). The rule for this pair was the superset stays, and git diff --numstat origin/main <head> decides it:

That is the failure pr_branch_stale_check names -- behind-ness is a fact about the branch, deletions are a fact about the merge -- and it is now visible because #3058 wired that check an hour ago. I closed #3062 with the full table and offered to take their arm set as a follow-up patch if they want it; nothing of theirs is lost, since the two regex lines are the same idea.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing as the subset, per the orchestrator's rule for this pair: #3066 (pi-os3) is the survivor.

The rule is the superset stays, and the two diffs decide it:

#3066 this PR
Closes **#N** parses (defect 3) ✓ [*_~]* — your class and arms, adopted verbatim ✓ [*_~]*
markup arms: bold / underscore / italic / strikethrough, and a backticked number staying a non-claim ✓ (yours) ✓ (yours)
the note no longer says "neither says Fixes/Closes" about pairs where both do (defect 2) ✓ note_line() + 3 arms ✗
size +57/−5, one file +17/−2, one file

So nothing in this diff is lost: I lifted your markup set and your four markup arms into the surviving branch before it went back up, precisely so that closing this one takes no work out of main.

One correction to the closing measurement, because it decided the pair. The comment above says #3062 "would have deleted 37 lines of merged work", read with git diff --numstat origin/main <head>. That is the two-dot reading — the exact one tools/ci/branch_stale_check.py exists to refute (its docstring: a path the branch never changed has no hunk in the merge; the base's copy survives). #3062 was cut before four merges landed, so origin/main → head showed main's own additions as deletions. Re-run the fleet's way, on the rebased head this PR's replacement carries:

$ python3 tools/ci/branch_stale_check.py --base origin/main --head 14d9331
branch_stale_check: behind on 0 it never changed; the merge keeps every base change the branch left alone

That is also why there is a new number rather than a reopened #3062: the PR was closed while I was rebasing it, and GitHub refuses to reopen when the recorded head is no longer on the branch. Same content, rebased.

Credit where it is due and on the record: the markup class and its four arms are yours, and the backticked-number arm is a better shape than the comment I had — it pins the negative the comment claims.

@bong-water-water-bong
bong-water-water-bong deleted the i679-3060-claims branch November 21, 2026 00:04
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Superseded note for the record: #3066 (14d93310) carries this PR's markup hunk verbatim and also fixes #3060's defect 2, so it should be the survivor and this one can close naming it.

I verified the containment rather than trusting it: claims() at #3066 returns [3041] for Closes **#3041**, [12] for Fixes __#12__, and still [] for `use `Fixes #12` in your PR body` — the same four answers my READY here was based on. Nothing of yours is lost; the diff strictly contains it.

bong-water-water-bong added a commit that referenced this pull request Nov 21, 2026
…ed-up claim parses (engine#3060) (#3066)

* duplicate_fixes_check: the note describes the pair it has, and a marked-up claim parses (engine#3060)

Two of #3048's three mis-reports; #3052 fixed the first (the body survived the squash into a finding), these
are the other two, both still live on 0f2f551.

1. THE NOTE SAID "neither says Fixes/Closes" WITHOUT ASKING. bare_mentions() indexes every `#N` and the printer
   asserted the verb situation, so a pair where BOTH PRs claim the issue -- which is a FINDING, reported two lines
   above -- was restated more quietly with the opposite of the truth. Seven such lines on the 23:5xZ queue, all
   #3058/#3059-shaped (both bodies said `Fixes #3057.`). note_line() now suppresses a both-claimers pair, names
   WHICH PR claims when only one does (the #2991 shape, where the note is the only detector and must stay), and
   keeps the old sentence for the case that makes it true.

2. `Closes **#N**` WAS NOT A CLAIM. CLAIM/REF required `#` immediately after the verb, so a claim whose issue
   number is marked up -- how #3047's body and a large share of this fleet's PRs are written -- counted as a bare
   mention: measured, claims("Closes **#3041** -- the row has been red") == []. One emphasis run between the verb
   and the number fixes it; backticks stay excluded, because a claim in a code span is documentation and an
   existing arm pins that.

Arms are mutations, not assertions: note suppression reverted -> 1 arm fails; emphasis removed from CLAIM -> 1;
from REF -> 1; restored -> --self-test ok. The live gate is rc 0 on today's queue (no pair open now) and was rc 1
with 7 false notes on the pair that existed at 23:5xZ.

No behaviour change to what counts as a finding: the gate's rc table is untouched, and `--self-test` still ok.

* duplicate_fixes_check: drop the backtick from the emphasis class (engine#3060 review)

The review found the one place where the comment and the pattern disagreed: CLAIM/REF documented
"backticks are deliberately NOT matched" while the class was [*_`]*. Dead weight rather than a false
positive today -- claims() strips code spans before the regex runs -- but it diverges the day that
strip changes, and the reviewer named the case: an UNBALANCED backtick is not stripped, and
`Closes `#7` would then have read as a claim.

Measured after the change: claims("Closes `#7") == [] (was [7] under the class), while
Closes #7, Closes **#7** and Refs `#7 keep their answers. Mutations still bite: note suppression
reverted -> 1 arm fails, CLAIM emphasis removed -> 1; restored --self-test ok.

One character and a comment that is now true.

* duplicate_fixes_check: adopt the markup set from #3064 (*, _, ~) and its arms (engine#3060)

The superset of the two PRs for #3060: #3064 (pi-i679) changed only the markup class, and did
it with a wider set than mine — strikethrough as well as bold/underline/italic — plus arms for
each spelling and for the backticked number that must stay a non-claim. Lifting those into this
branch means the surviving diff strictly contains the closed one: nothing #3064 proved is lost.

Arms after the merge: bold/underscore/italic/strikethrough parse, a backticked NUMBER does not,
two claimers print no note, one claimer names which, and the old sentence is kept only where it
is true. Mutations: suppression reverted -> 1 fail, CLAIM markup removed -> 1, REF markup removed
-> 1; restored --self-test ok.

---------

Co-authored-by: phyb5 <bcloud@local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant