feat(p19): a cost code must have a FORM where the input offers forms
P18's round 2 ended with two VALIDATED proposals whose affected_item codes were ordinary words from a road standard's prose -- impulsventilator (4 of 270 N500 documents) and bituminoest baerelag (4 of 1133 N200). Both are grounded in P7's sense and neither is inert in P18/B1's sense; they are simply not identifiers of a cost line, and the gate had no stage that could say so. Known positive MEASURED, not asserted: replayed offline against the bases those runs were given, both come back Rejection naming the denominator. IDENTIFIER_FORMS moved from generate.py to validator.py: they now drive both P8's report and this gate, and two copies of "what an identifier looks like" would let the two disagree about one run's own input. B1 -- two new forms, transcribed from measurement. R761's requirement numbers are bare dotted numbers and all six refs in kontrakt-sorasen's fasit are of that shape, which neither pre-P19 form matched: r761's whole offer was 3 identifiers over 6.5 MB, and is now 2332. The FIRST form was widened in the same pass because B2 made these forms decide prose vs identifier, and this repo's own ENERGI-TOTAL-EL matched none of them -- a gate may only be wrong in the direction that admits too much. Three things keep the gate from being a rule about shapes: the generality guard (it fires only where the input offers forms), the baseline exemption (stage 0 has already ruled that code real), and full-matching. Honesty limit, measured and given its OWN arm: a decimal and an R761 process number are typographically identical, so the form counts both. P8's existing "bare numbers" arm is narrowed to bare INTEGERS accordingly. Measured over all nine round-1+2 outboxes: 26 of 36 codes are prose. Load-bearing measured (22 arms), four mutations all red against the whole suite (16 / 10 / 1 / 2), green control 1734/5 and the golden byte-unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
c84e8bf6f1
commit
d74f32dc1c
15 changed files with 446 additions and 36 deletions
|
|
@ -148,11 +148,31 @@ def test_the_known_positive_input_reports_a_positive_offer() -> None:
|
|||
def test_a_bare_number_is_not_counted_as_an_offer() -> None:
|
||||
"""LOAD-BEARING (b), the other half. K2 carries 46 394 bare-number occurrences over 2 117
|
||||
distinct values (P7 § 2), so counting them would make every report positive and the whole
|
||||
measurement inert — the repo's cardinal class, a gate that can only come out green."""
|
||||
offer = grounding_offer(_project(), None, Grounding.of("1234 5678 90 42.5 1000000"))
|
||||
measurement inert — the repo's cardinal class, a gate that can only come out green.
|
||||
|
||||
**NARROWED in P19/B1, and the narrowing is a measured honesty limit rather than a weakening.**
|
||||
The list used to carry ``42.5`` as well. R761's requirement numbers — all six ``ref`` values in
|
||||
``contexts/kontrakt-sorasen-2027/fasit.json`` — are ``12.1`` / ``52.11`` / ``22.1``, which is
|
||||
the SAME typography as a decimal. There is no rule that separates them, so the form counts
|
||||
both; the arm below states that in the open instead of leaving it in the docstring. What this
|
||||
arm still refuses is the class the K2 number was measured on: bare INTEGERS."""
|
||||
offer = grounding_offer(_project(), None, Grounding.of("1234 5678 90 1000000"))
|
||||
assert offer.identifiers == 0, offer
|
||||
|
||||
|
||||
def test_a_dotted_number_is_counted_and_that_is_an_honesty_limit() -> None:
|
||||
"""P19/B1: a decimal and an R761 process number are typographically the SAME token.
|
||||
|
||||
Counted, therefore — which is the direction that keeps r761 measurable (its whole offer was 3
|
||||
identifiers over 6.5 MB before this form) at the price of a decimal in prose being counted as
|
||||
one. Stated here rather than hidden: for the REPORT it inflates the count, and for P19/B3's
|
||||
gate it can turn the guard on in a base that carries decimals and no real identifiers — where
|
||||
the only proposals it can then refuse are ones naming a cost line by a word from the prose,
|
||||
which is what the gate is for."""
|
||||
assert grounding_offer(_project(), None, Grounding.of("12.1 og 52.11")).identifiers == 2
|
||||
assert grounding_offer(_project(), None, Grounding.of("42.5")).identifiers == 1
|
||||
|
||||
|
||||
# ----------------------------------------------- (c) measured on the SAME text the gate will see
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue