prcheck: a completeness guard asked of the filtered half — it could only ever say COMPLETE - #3224
Merged
Merged
Conversation
The units fan-out flagged prcheck.rs and I had not checked it. Checking
found a guard that is wrong on every real input.
`merged_recently` asks the API for CLOSED pull requests and keeps the
MERGED ones, then calls read_is_complete(rows.len(), page) -- the merged
count against the closed page size. `read_is_complete` is
`returned < limit`, "the page was not full so the read saw everything",
and closed is a superset of merged.
Measured on gHashTag/t27:
per_page closed returned merged guard page full
30 30 29 COMPLETE YES
60 60 59 COMPLETE YES
90 90 88 COMPLETE YES
The page was full every time and the guard said complete every time. It
can only say otherwise when EVERY closed pull request on the page is
merged: one unmerged row anywhere is enough to silence it forever.
Fixed by asking the completeness question of the read the PAGE bounded.
The request now returns `number<TAB>merged?` for every closed row,
read_is_complete sees the closed count, and the merged filter is applied
afterwards. Reverting the guard to the filtered count no longer compiles,
because `rows` does not exist at that point.
The first test for the merged filter rebuilt it inline from the same TSV
and a mutant removing the filter from production passed it. Extracted to
`merged_numbers`; the test calls it now. A test that reimplements the
thing it tests is a second copy agreeing with itself.
And the count of ratio prints was itself undercounted: 16 by the first
regex, 49 by a wider one, because the first required a bare `{}` and
skipped every `{named}` interpolation -- which this crate uses
everywhere. Counting the population of a units defect, in the pass about
units, with a matcher that had a dead half.
SKILL 583.
Refs #3195
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-09-05 02:03:45 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
# Conflicts: # .claude/skills/ci-gates/SKILL.md
Contributor
PR DashboardGenerated at: 2026-09-05 02:48:23 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The units fan-out flagged
prcheck.rsand I had not checked it. Checking found a guard that iswrong on every real input.
merged_recentlyasks the API for closed pull requests and keeps the merged ones:read_is_complete(returned, limit)isreturned < limit— "the page was not full, so the read saweverything." It was handed the merged count and the closed page size, and closed is a
superset of merged.
Measured on the live repository
per_pageThe page was full every time and the guard said complete every time. It can only say otherwise
when every closed pull request on the page is merged — one unmerged row anywhere silences it
forever.
Fix
The completeness question is asked of the read the page bounded. The request returns
number<TAB>merged?for every closed row,read_is_completesees the closed count, and the mergedfilter is applied afterwards.
Reverting the guard to the filtered count no longer compiles —
rowsdoes not exist at thatpoint. That is the strongest form of a killed mutant.
The test rebuilt the filter instead of calling it
The first test for the merged filter reconstructed it inline from the same four TSV lines, and a
mutant that removed the filter from production passed. Extracted to
merged_numbers; the testcalls it now.
A test that reimplements the thing it tests is a second copy agreeing with itself — the same shape
as SKILL 546's mutation that also edited the test, one level down.
And the population of this class was itself undercounted
Before building anything I counted the ratio prints: 16. A wider pattern found 49. The first
regex required a bare
{}and silently skipped every{named}interpolation — which this crate useseverywhere.
Counting the population of a units defect, in the pass about units, with a matcher that had a dead
half.
744 crate tests. SKILL 583. Refs #3195