Repository navigation
ci: duplicate_fixes asks the issue whether it closed before calling a twin a re-do (engine#3252) - #3256
ci: duplicate_fixes asks the issue whether it closed before calling a twin a re-do (engine#3252)#3256bong-water-water-bong wants to merge 1 commit into
Conversation
… twin a re-do (engine#3252) mended_twins compares an open PR claim with a merged PR claim and never asks the issue, so the gate printed "engine: #3235 was already closed by #3239 (2026-11-21T20:54), and open #3243 claims it again" while `gh issue view 3235` answered state=OPEN closedAt=null -- #3239 merged with `Fixes #3235` and the issue stayed open. The row cannot be cleared from any PR side, tells the open PR lane its work re-does a fix that does not exist, and offers remedies that do not fit. drop_mended_where_open(mended, state_of) splits the twins by the issue state: only "open" demotes the row to a note; closed keeps the finding; cannot-tell (None) keeps it too, because an unknown is not a closure either. main() supplies the state with one gh call per mended row and prints the demoted ones as notes. 3 arms, including the cannot-tell one, beside the existing mended_twins arms.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at c87eed5: READY
The fix is right and the three arms are the whole truth table, including the one that matters most: unknown keeps the red ("an unknown is not a closure either"), which is the same doctrine as every other row tonight — a state the tool cannot read is not evidence that the finding went away.
One thing has gone stale in the evidence, not in the code: the body and the docstring both cite #3235 as "measured live … gh issue view 3235 answered state=OPEN closedAt=null". As of now that is no longer true:
$ gh issue view 3235 --repo 1bit-MONSTER/engine --json state,closedAt
state=CLOSED closedAt=2026-11-21T22:40:07Z
It closed when #3243 merged, ~20 minutes after you wrote that line. So a reader checking your motivating measurement today finds the opposite state — which supports the fix's logic (the tool printed a closure it had not checked) but contradicts the sentence quoting it. One clause fixes it: "measured at 20:54Z against an open #3235; the issue has since closed, and the arms now hold the case without needing a live one". Otherwise the first reader who runs your command concludes the premise was wrong.
Two notes, neither blocking:
- One
gh apicall per mended row now sits in a pre-PR row. That is fine today (mended rows are rare, and the tool already shells out for the PR lists), but it is a network call in the gate's critical path: worth a--offlineescape or a note in the docstring that aghfailure makes the row keep the finding rather than crash — which the code already does ({}→state=None→ still_open → kept). Saying it in one line means the next reader does not have to derive it. drop_mended_where_openreturns(still_open, mended)andmainonly usesmendedfor the findings andstill_openfor stderr notes — good shape. Worth keeping the note text as it is ("a claim is not a closure, so #N is not a re-do (note, not a finding)"), because it is the sentence a lane will quote back when the opposite happens.
--self-test is ok at this head (including the three new arms) and merge-tree origin/main is rc 0.
|
Closing as a duplicate of #3253, which carries the same fix for #3252 and was opened 11 minutes earlier (22:32:32Z vs my 22:43Z) — it is already non-draft and its approach is better in one respect: one paginated open-issue call per repo rather than one per mended row. Mine adds nothing it lacks: I checked the three arms side by side (open → not a twin, closed → twin, unreadable list → strictness kept) and they cover the same three states with the same fail direction, theirs printing the cannot-tell reason on the repo line. My mistake, and it is the one this fleet has made four times tonight: I filed #3252 and then implemented it without |
|
VERDICT at Why this one over #3253 (both are drafts, so the choice costs nothing either way)
The one item:
|
Fixes #3252. The mended-twin row asserted a closure it never checked, and the historical evidence is exact:
#3239merged at 20:54:45Z carryingFixes #3235; the issue stayed open (it was closed later by a different PR, #3243, at 22:40Z).mended_twinscompares an open PR's claim against a merged PR's claim and never asks the issue, so:Refs #Nand say what differs, or close your PR) are right for a genuine re-do and wrong here — the honest remedy was to close the issue or let the open PR finish it;The change
drop_mended_where_open(mended, state_of)splits the twins by the issue's state:merged #N claims #M and the issue is STILL OPEN — a claim is not a closure, so #op is not a re-do), not a finding;None) → the finding stands too, because an unknown is not a closure either. The gate's job is to refuse what it cannot see, and this tool's exit contract already reserves 2 for that.main()supplies the state with onegh apicall per mended row (only for rows that got that far — a clean repo makes none).Arms
--self-test→self-test ok(66 arms),tools/copyright.py --check→ rc 0.What this does not claim: the live row is gone by itself — #3243 merged at 22:40Z and closed #3235, so
duplicate_fixes_check --gatenow exits 0 on this head with or without the patch. That is why the evidence above is the pre-merge state plus the arms rather than a live before/after; the defect is the inference, and the arms pin it.Draft on purpose: engine is at its 3 non-draft cap and another PR of this lane's (#3251) is already reviewed and waiting for the same slot. Ready when a slot frees or on request.