Skip to content

Test the support roster's pending class on a toy spec - #1548

Merged
MaxGhenis merged 4 commits into
mainfrom
be/support-roster-pending-toy
Nov 10, 2026
Merged

MaxGhenis merged 4 commits into
mainfrom
be/support-roster-pending-toy

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Adds toy coverage for one classification branch in _support_roster. No source file changes.

Why

_support_roster classes a money-routed column with no owner after CREATE and no structural_columns row as pending (transport/compose.py, the route in {"quantile_mapped", "pending", "normalized"} branch). The support gate then fails any derived row that reads it. In test_transport_evidence_kernels.py before #1547, two tests reached that branch through NZ's packaged spec, and only test_the_nz_roster_classes asserted its result.

#1547, now on main as f023db0b, gave NZ's last two such columns real producers, so those tests stopped reaching the branch. A recorder on the branch logged 10 hits from the two tests before #1547, and 0 hits across 32 test files on #1547 at b35dd641 with its third shared-test hunk [executed].

What it changes

Test code only, in test_transport_evidence_kernels.py. The diff from the base 3db65154 adds 200 lines and removes none, so no existing test changes. TestMoneyAwaitingItsProducer builds a toy spec with CREATE, a battery and the toy graph's money routes (graph_declaration()), and no node that maps money:

  • A column on each of the three routes (normalized, quantile_mapped, pending) reads as pending, with the reason that names what it awaits.
  • A donor concept with no money route still reads as copied.
  • A derived row that reads a pending column, directly or through another derived row, lists that column as a source with its reason. The real support gate then fails the row, names the source, and reports nothing else. The toy roster's other rows pass that gate, and a control row on a copied source passes it too.
  • A derived row lists each column of each input its owner reads, directly or through a derived input, and the gate names each pending source. After G8-x0: real producers for NZ rent and liquid assets #1547, no other test in this file catches a walk that stops at a node's first input or an input's first column, or a flatten that keeps only a derived input's first source.
  • compose.SUPPORT_COVERED and the gate's own _SUPPORT_COVERED, two separate sets, hold the same classes.

Invariant

Take a money-routed column with no owner after CREATE and no structural_columns row. _support_roster classes it as pending. A derived row that reads it, directly or through another derived row, lists it as a source, and the support gate fails that row.

Composition refuses such a spec earlier. compose_transport_graph calls validate_transport_activation first, and its money check names the column for each of these toy specs [executed]. The gate's failure is the second line of defence.

Evidence [executed]

Check Tree Result
The whole test file this head 166 passed
The whole test file this head merged with main 70b9e691 166 passed
The whole test file this head merged with main 4dac02e9 (#1552), tree e769ac0f 166 passed
The whole test file this head merged with main 5509c921 (#1555), tree bb9eee71, the tree a squash lands 166 passed
TestMoneyAwaitingItsProducer this head 10 passed
ruff@0.15.16 format and check this head's test file clean

#1552 and #1555 reached main after this head's CI run. Neither touches test_transport_evidence_kernels.py, the one file this PR changes, and the diff's git patch-id --stable reads 8ede95500cc707c9 on each of the three bases.

Each mutant ran against TestMoneyAwaitingItsProducer, and each fails it:

Mutant Cases that fail
The branch disabled (if False:) the 3 route cases, both derived cases, both breadth cases
The branch always taken (if True:) the copied control, the copied-source control, both breadth cases
"quantile_mapped" removed from the route set its route case, both derived cases, both breadth cases
"pending" removed from the route set its route case, both breadth cases
"normalized" removed from the route set its route case
The reason's fallback loses its or the normalized route case
"pending" added to compose.SUPPORT_COVERED the differential test
"pending" added to the gate's _SUPPORT_COVERED both derived cases, both breadth cases, the differential test
A derived input passes on only its covered sources both through-a-derived-row cases
A derived input passes on only its first source the breadth case through a derived row
A source's reason dropped both derived cases, both breadth cases
The gate's failure line drops the source's class both derived cases, both breadth cases
The walk reads only a node's first input both breadth cases
The walk reads only an input's first column both breadth cases
The gate's if missing: disabled both derived cases, both breadth cases
The gate names only the first missing source both breadth cases
The gate fails a row only when every source misses both breadth cases

On this head merged with main 70b9e691, in TestMoneyAwaitingItsProducer or TestSupportRoster, each walk mutant fails both breadth cases (2 failed, 27 passed), and the flatten mutant fails the breadth case through a derived row (1 failed, 28 passed).

Checklist

  • A first independent review. It approved e277e6f7 with five findings. This head and body take up all five.
  • A second independent review (Opus 5.5) approved 7d739f12, with no P1 or P2 and five optional findings. 77ab4564 takes up three: the status check that couldn't fail, the walk's breadth, and a docstring's reason. A squash with a written body closes the fourth, a stale commit message. The fifth predates this PR, and a separate follow-up records it.
  • The same reviewer approved 77ab4564, with no P1 or P2 and two optional findings. 8f050b76 takes up the first: a flatten that keeps only a derived input's first source survived every file the reviewer ran after G8-x0: real producers for NZ rent and liquid assets #1547. The second asks for the written squash body above.
  • The same reviewer approved 8f050b76, with no P1 or P2 and two optional findings, both on wording. This body and the squash body take up both: "Why" now scopes pending as the invariant does, and the line above now says "after G8-x0: real producers for NZ rent and liquid assets #1547".
  • CI at 8f050b76: run 42708961335 passed all 11 jobs on the merge with main 70b9e691. The evidence table covers the two main commits since.

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits November 9, 2026 05:10
_support_roster classes a money column that no node produces as
pending. Today only test_the_nz_roster_classes reaches that branch,
through NZ's packaged spec, and #1547 gives NZ's last such columns real
producers. These tests drive the branch from the toy graph's money
routes, and check that a derived row names a pending source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review of e277e6f found that the last assertion pinned
compose.SUPPORT_COVERED, which only tests read, while the gate reads
gate_bindings._SUPPORT_COVERED. The derived-row test now runs the toy
roster through the support gate and checks that the failure names the
pending source.

It also covers a derived row that reads another derived row, since
nothing else guards that path once #1547 lands, and it pins the
source's reason. A differential test ties the two covered-class sets
together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second review found two gaps in TestMoneyAwaitingItsProducer. The
toy frame fails the support gate on four columns that the one-row roster
never names, so the derived test's status assertion held whatever the
row read. And every case read one input with one column, so after #1547
no test would catch a walk that reads only a node's first input or an
input's first column.

The derived cases now run the gate with the toy roster's rows beside
their own, so the derived line is the only failure, and a control whose
row reads a copied source passes the same gate. A new case reads two
columns of one input and a second input; it checks that the row lists
all three sources and that the gate names both pending ones. The
battery spec's docstring now gives the reason CREATE owns no column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The third review found that a flatten keeping only a derived input's
first source survives every file it ran after #1547. The derived cases
read one column through their derived input, and the breadth case reads
no derived input. Before #1547, test_the_nz_roster_classes caught that
mutant on an NZ row with two pending sources.

The breadth case now also runs on a row that reads the mix column
through a derived input. That row must list the same three sources, and
the gate must name both pending ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 10, 2026 01:27
@MaxGhenis
MaxGhenis merged commit 764ae3a into main Nov 10, 2026
11 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Landed as 764ae3aa, a squash onto main 5509c921 with tree bb9eee71, the tree the last whole-file run in the evidence table passed on.

The gates, rechecked just before the merge at 01:28Z:

  • CI: run 42708961335 passed all 11 jobs at 8f050b76, on the merge with main 70b9e691, and gh pr checks exited 0.
  • Main since CI: Refuse a view binding in a spec with no input closure #1552 and NZ: wire measurement_prefit's evidence from real producers (G8-x1) #1555 don't touch test_transport_evidence_kernels.py, the one file this PR changes. The diff's git patch-id --stable reads 8ede95500cc707c9 on all three bases, and the whole test file passes 166 on the merges with 4dac02e9 and 5509c921.
  • Reviews: four independent reviews. The first approved e277e6f7 with five findings. A second reviewer (Opus 5.5) approved 7d739f12, 77ab4564 and 8f050b76, the last with no P1 or P2 and two wording findings, which the PR body and the squash message take up.
  • State: GitHub read the PR MERGEABLE and CLEAN with no CHANGES_REQUESTED review, and the merge pinned --match-head-commit 8f050b76.

The squash message is the written body, not the default list of commit messages.

@MaxGhenis
MaxGhenis deleted the be/support-roster-pending-toy branch November 10, 2026 01:29
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