Planning bug: a ratchet number was attached to a counter that measures a SUBSET of the population the card's own reason quantifies over
Telemetry about the planner, filed from the run of MOTIR-3997. The correction is already applied — the card is amended on the record and the pull request ships the working form — so this holds nothing up and joins no sprint. It is filed because the failure has a shape worth having in the corpus, not because anything is outstanding.
What happened
MOTIR-3997's What to do section identified the guard that would break — tests/theme/styleRegistry.test.ts's material-layer finder — by naming its counter and its floor in the same sentence:
materialRulesCheckeddrops to 0 against its owntoBeGreaterThanOrEqual(4)floor. Re-point it at the@scopeform … and ratchet the count floor to 69.
Acceptance criterion 2 then restated it as "its material-rule count floor is 69".
materialRulesChecked does not count material rules. It counts the material rules whose body carries a colour-bearing declaration — it is the loop variable of the two palette-derivation assertions, which continue past any rule that paints no background / background-color / background-image / border-color / color. Measured at origin/main 00e949a68 with a postcss classifier:
- 69 material rule blocks of the form
[data-style='X'] <descendant>(88 selectors across them — 14 blocks carry a selector list sharing one anchor; 0 blocks carry more than one distinct anchor) - 32 of those 69 carry a colour-bearing declaration; the other 37 set only shadow, radius, transform or transition
So expect(materialRulesChecked).toBeGreaterThanOrEqual(69) is unpassable on a correct tree, and a runner following the criterion literally would have produced a red guard on a correct rewrite and then gone looking for the fault in their own work.
Why it is worth recording
The card's own REASON was right and was the thing that resolved it. The sentence after the number — "so a material rule authored outside a scope in future fails here instead of going uncounted" — quantifies over ALL material rules, which is a different set from the one the named counter holds. The remedy was to put the ratchet on the population the reason describes (a new MATERIAL_RULES.length >= 69, which also guards the matcher) and leave the two existing assertions on their own population with their floor of 4. Both sentences of the card then hold.
The generalisable shape: a card that identifies the right guard, quotes its real code and names its real floor has done everything that looks like diligence — and the precision is what makes the number look checked. The counter's NAME (materialRulesChecked) reads as the count of material rules, and the two populations differ only by a continue several lines below the declaration. This is the "a number in a card is a measurement — name the command, the ref, and the scope" lesson in its subtler form: the ref was fine, the number was fine, and the SET the counter measures was never stated.
And nothing mechanical could see it. validate_work_item returned valid: true with one unrelated subsumption advisory; readiness.ready was true. No check compares a card's criteria against the code they name.
Disposition
- Amended on MOTIR-3997's AC 2, on the record, with the measurement.
- Shipped in motir-core#2482 with both counters and a demonstrated red at 68.
- Two existing global lessons were reinforced from this run rather than a new one written, since no re-plan was in flight: "A number in a card is a measurement — name the command, the ref, and the scope" and "A card's PROSPECTIVE half is disciplined by nothing — check its counted set and its named test home". The second also covers the run's own instance of the same shape: a headless-render non-regression harness that compiled both stylesheets under one
from:path, hit@tailwindcss/postcss's per-path cache, compared the old sheet with itself and reported0 difference(s)— a green that could not have gone red.
Acceptance criteria
- Read as telemetry. No code change is owed and no plan change is owed — both are already applied.
- Close it once read, or fold its takeaway into a planning rule about criteria that quantify over a code-level counter, if that pattern recurs.