Skip to content

chore(sync): develop → main — board counters + counter guard - #143

Merged
beyondnetPeru merged 1 commit into
mainfrom
develop
Aug 4, 2026
Merged

chore(sync): develop → main — board counters + counter guard#143
beyondnetPeru merged 1 commit into
mainfrom
develop

Conversation

@beyondnetPeru

Copy link
Copy Markdown
Contributor

Brings #142 to main.

The board header said 174 done / 18 pending over a table holding 179 DONE / 13 PENDING. Five rows (CP-02, CP-04, CP-06, CP-14, GAP-020) closed between 2026-08-01 and 2026-08-04 without the header following. Each was checked against its catalog entry before being trusted.

Gap registry coherence passed over all of it because it contrasts board ↔ catalog ↔ registry and never read the header. It now compares the declared counts against the actual rows — total and every status bucket — and treats an unreadable **Progress:** line as a failure.

This is also the first PR to land under main's new branch protection (7 required contexts, enforce_admins: true).

🤖 Generated with Claude Code

…#142)

* fix(gaps): the board header counted five rows that had already closed

The header said 174 done / 18 pending over a table holding 179 DONE and
13 PENDING. The table was right: at 97916eb the two agreed exactly, and
between 2026-08-01 and 2026-08-04 `CP-02`, `CP-04`, `CP-06`, `CP-14` and
`GAP-020` moved PENDING → DONE without the header following.

Each of the five was checked before trusting it rather than assumed: all
five carry a current `Status: DONE` in their catalog entry, and
`GAP-020`'s is dated 2026-08-02 with its reasoning, sitting under an
explicit `Status (superado): PENDING` — the shape this repository already
uses for a reopened item that closed again.

`Gap registry coherence` passed over all of it, and could not have done
otherwise: it contrasts board ↔ catalog ↔ registry and never reads the
header. So the number nobody cross-checked is the one that drifted, which
is the same story the guard's own docstring tells about `Status` lines.

The guard now compares the declared header against the actual row counts:
the total and every status bucket. An unreadable `**Progress:**` line is
a failure, not a pass — a header this scan cannot find is exactly the one
that can lie unchallenged.

Watched failing before the header was corrected, and again on fixtures:

    174/18 against a table of 179/13  → 2 problems, exit 1
    pending off by one                → 1 problem, exit 1
    total off by one                  → 1 problem, exit 1

The return annotation is plain: `tuple[...] | None` needs Python 3.10 and
this laptop runs 3.9, so the first version raised TypeError on import. CI
has 3.12 and would never have shown it — a guard that dies being imported
watches nothing, and it would have died on someone's machine, not here.

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

* test(gaps): the guard had a suite and I did not run it

CI caught what I should have. `check-gap-registry.py` ships
`check-gap-registry.test.py`, and adding the counter contrast broke four
of its nine tests: the fixture writes a synthetic board with no
`**Progress:**` line, and the new check reports a missing header rather
than tolerating it.

The fix is the fixture, not the guard. Relaxing the check so a headerless
board passes would disarm exactly what it watches — so `_repo` now emits a
header derived from the rows it just wrote, and takes a `progreso`
override for the tests that want to declare false numbers.

Three tests added for the contrast itself, each run against the guard
with the new call REMOVED and seen to fail there:

  · a header declaring fewer DONE than the table holds — the real defect,
    the five rows that closed between 2026-08-01 and 2026-08-04;
  · a wrong total, which drifts on its own: a row added without touching
    the header changes no status, only the denominator;
  · a board with no header at all, because illegible is not correct.

Twelve pass now; nine passed before and four of those were passing over a
board shape the guard would reject in reality.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@beyondnetPeru
beyondnetPeru merged commit b5b5373 into main Aug 4, 2026
16 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