Skip to content

Two ledger rows name checks that no longer exist, so the census over-counts; nothing compares the ledger's keys against a run's #983

Description

@OffgridwithJD

Two ledger rows name checks that no longer exist anywhere in the tree, so the census counts two checks that cannot run. Nothing detects this, and it has been true since #917.

harness_selftest  330-the-incomplete-path-must-run-whole  'premise: all three runner functions were extracted, not empty ranges'  never  -
harness_selftest  330-the-incomplete-path-must-run-whole  'premise: and all three are callable'                                  never  -

Both names appear in exactly one file in the repository:

$ grep -rlF "all three runner functions were extracted" test/
test/check_ledger.tsv

They are not in 330-the-incomplete-path-must-run-whole.sh, not in any other part, not anywhere. git log -S points at the commit that removed them:

51b73fdb4  test: selftest 330 ran a collect loop whose reconciliation could not execute (#917)

The checks were deleted; their ledger rows stayed.

Found while doing something else, which is the point

I was adding an orphan check to my own regeneration for #982no row may remain for a check the run did not emit — expecting it to confirm that the three rows my rename orphaned were the only ones. It reported five, not three.

The other two are these, and they are not mine to have created. f80ca7d05's commit message describes them as "two pre-existing conditional checks in part 330", which was either wrong then or has stopped being true since: a conditional check still exists in the source and simply does not run. These do not exist.

Why it matters

checks_never_observed_red is documented in check_ledger_budget.txt as "a measurement that must be true" — a census of the ledger, asserted against the committed file. It is 903 after #982's first pass, and two of those 903 are checks that cannot be observed red because they cannot run.

So the number is not wrong against the ledger — it is exactly the count of rows — but it is wrong as a statement about checks, which is what anyone reading it will take it for. Same shape as the collapsed keys in #982, arriving from the other direction:

#982   two checks share one row   ->  the census UNDER-counts checks
this   one row has no check       ->  the census OVER-counts checks

Both are invisible because every number reconciles: the run reconciles against its own records, the ledger reconciles against its own rows, and nothing compares the two sets.

The guard, and why it cannot be a per-suite check

Set-compare the ledger's (suite, part, name) keys against the keys a run emits, and refuse a row with no matching check.

It needs a run of every covered suite, not one suite's log. A single-suite log would flag every other suite's rows as dead — which is the false-positive that makes the naive version unusable. So it belongs where the matrix already reconciles across suites, next to pgc_log_shows_accounting and the population reconciliation, not in a selftest part.

pgc_ledger.py already has the other half: rename-scan reports vanished=N against a log. What is missing is a refusal over the full set, and a rule for what to do with a vanished row that carries historyf80ca7d05 established that a row with a date or a mutation must travel with its rename rather than be dropped, and a row whose check simply vanished has no rename to travel with.

The two rows here are safely removable, but not by me in #982's first pass

Both carry never and no mutation, which is f80ca7d05's criterion for dropping a row without losing history. So the cleanup is two lines.

I am deliberately not doing it in the part-400 rename PR. That PR removes the three orphans it creates; removing two unrelated ones would widen a diff whose whole purpose is to propose a phrasing rule, and it would tidy away the evidence for this issue. Better as its own two-line change with the guard, or alongside whoever takes the guard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions