Skip to content

prcheck: a completeness guard asked of the filtered half — it could only ever say COMPLETE - #3224

Merged
gHashTag merged 4 commits into
masterfrom
loop/complete-asked-of-the-filtered-half
Sep 5, 2026
Merged

gHashTag merged 4 commits into
masterfrom
loop/complete-asked-of-the-filtered-half

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 5, 2026

Copy link
Copy Markdown
Owner

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:

&format!("repos/{repo}/pulls?state=closed&per_page={page}"),
"--jq", ".[]|select(.merged_at!=null)|.number",
...
let complete = read_is_complete(rows.len(), page);   // rows = MERGED, page = CLOSED page size

read_is_complete(returned, limit) is returned < limit — "the page was not full, so the read saw
everything."
It was handed the merged count and the closed page size, and closed is a
superset of merged.

Measured on the live repository

per_page closed returned merged of those guard said page actually 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 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_complete sees the closed count, and the merged
filter is applied afterwards.

Reverting the guard to the filtered count no longer compiles — rows does not exist at that
point. 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 test
calls 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 uses
everywhere.

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

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
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 01:48:27 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 11
PRs with All Checks Green 5
READY 0
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:03:45 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 11
PRs with All Checks Green 5
READY 0
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
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
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:48:23 UTC

Summary

Status Count
Total Open PRs 18
PRs with Failing Checks 14
PRs with All Checks Green 4
READY 1
FAILING 14
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit d30aced into master Sep 5, 2026
27 of 29 checks passed
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