Repository navigation
Test low counts and digests, and anchors listed second, in later reports - #1513
Conversation
A third review of #1506, at 212dd72, found six changes to _follow_later_repin_report that left every later-report test passing. Two make an anchor check read only the first record set: in the changed fields, or among the added rows. Four compare with <= in place of ==: the old feed's digest, the old row count, the listing's digest and the new row count. Each anchor case held one record set, and each refusing count or digest sorted above the expected one. The anchor-label and anchor-record-set cases now list a record set outside the anchors first and the anchor second. Four cases join them, each below the expected value: an old feed digest and a listing digest that sort first, an old feed one row short with a new count that still adds up, and a new row count one short. The helper stays the same, so every case passes at once. Each of the six changes now fails one of these cases, under pytest's assertion rewriting and with --assert=plain. Using >= in place of == already fails the cases above the expected value, and each of the 18 changes the earlier cases catch still fails at least one case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A review of 92b1185 found that every later-report case still passed when an anchor check read only the last record set or row, since each anchor case put the anchor last. Other checks that read a list or a mapping had the same gap. Of 23 changes that make such a check read only its first entry or only its last, or pass when any entry passes, 17 left every case passing at 92b1185. Four of them read one of the three anchor record sets that the pin test gives the helper, while the cases gave it only one. Each case for such a check now puts its one bad entry between two good ones. Among the added rows, the row from another source, the row in an anchor record set and the row outside the namespace each come second of three. Among the changed fields, the value change comes second of three. The label change in an anchor record set sits in the second of three fields, where the anchor comes second of three record sets. The cases now give the helper the pin test's three B4923C record sets and touch cy2024, which sorts between the other two. The helper stays the same, and every case passes with it. Each of the 23 changes now fails a case, under pytest's assertion rewriting and with --assert=plain, and each earlier change still fails the cases it failed before. The new row count comment said every count and digest a check compares had a case on each side of the expected value, as this branch's first commit message did. The check that a listing names each key once compares its key count with its row count, and the key count can't exceed the row count. The comment now names the four checks of a feed's digest or row count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A review of 4b84fbf found that the comment above the refusing cases claimed more than they show. It said each case for a check that reads a list or a mapping puts its one bad entry between two good ones, but namespace-not-leading holds a single row. The comment now says a check that reads only the first entry, or only the last, lets through each case whose own comment puts its bad entry between two good ones. The review also found two gaps in the cases. Both cases that touch an anchor record set used only cy2024, so an anchor check that read cy2024 alone, or with one of the other two record sets, let every case through. And no case passed a report that adds no row or changes a dimension value label, so every case still passed with a helper that refused either kind. Only the pin test, which runs the helper over the committed report of microcosm#1343, caught such a helper. Both anchor cases now run once for each of the three B4923C record sets, and a new case passes a report that relabels rows and adds none, as #1343's re-pin did. The helper stays the same, and all 27 later-report cases pass with it. Of 68 changes to the helper, 3 leave every case passing here, against 11 at 4b84fbf, 28 at 92b1185 and 36 on main. Both pytest modes, assertion rewriting and --assert=plain, give the same results. Each case that caught a change at an earlier commit still catches it. As at 4b84fbf, <= in the source check and >= in the key-count check leave every case passing. So does a label check that matches the two layout fields exactly rather than as prefixes, and it accepts both committed reports, which name those fields exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
|
Adds the later-report cases that three independent reviews asked for: one of #1506 at
212dd72, and one each of this branch's first two commits,92b1185and4b84fbf. #1506 merged asad67d0b, and_follow_later_repin_reportstays the same.What changes
In
packages/microcosm-build/tests/engine_free/us/test_us_esi_premiums.py:<=in place of==would still refuse them.Tests
Under real pytest, with assertion rewriting (as CI runs them) and with
--assert=plain, the five later-report tests give these results against changes to_follow_later_repin_report, the same in both modes:ad67d0b)<=for each of the four feed digest and row count checks>=for each of the fourEach set of nine changes limits these readings:
The any-entry changes cover the label check's fields, the anchor check's record sets, the source check (the declared source among the sources), and the anchor and namespace checks' rows.
The earlier cases catch 18 changes: matching the namespace anywhere in a record set id, the two namespace moves, and deleting each check. Each of them still fails at least one case, and each case that caught a change at
ad67d0b,92b1185or4b84fbfstill catches it. Three changes still leave every case passing.<=in the source check differs only for a declared listing with no rows, from a report that adds none: the helper refuses it, and the change accepts it.>=in the check that a listing names each key once can't change the result, since a listing never holds more distinct keys than rows. A label check that matches the two layout fields exactly, rather than as prefixes, refuses only a field name that extends one of them. Both reports the pin test reads pass that check: #1343's lists both layout fields by their exact names, and #1506's lists no changed field.ruff checkandruff format --checkreport nothing new.🤖 Generated with Claude Code