CB-WP-0006 T02: instrument AM-2; report AM-3 blocked, with the argument
Both rows were unmutatable for the same stated reason. They resolved
differently, and the difference is the point.
AM-2 is instrumented and enforced — tools/size-metrics.py, in `make all`:
AM-2: 27.2 LOC/rule [ok target <= 40] (1.47x headroom)
1,575 impl lines / 58 rules
Tests are excluded because AM-2 asks what a rule costs, not how much it is
exercised; lib.rs is ~18% test code and including it would have flattered
the number. This matters because AM-2 is AM-1's anti-gaming pair: 100%
rule coverage means nothing if the rules are trivially small, and AM-1 has
been reported met since CB-WP-0001 with its pair uninstrumented.
Verified red by a property mutation — ~800 lines of filler injected into
the impl, pushing the ratio past 40 — not a threshold tweak. The expect
string is the precise failure signature "FAIL target <= 40"; my first
attempt used "AM-2", which also matches passing output and would have
made the FA guard vacuous.
AM-3 is BLOCKED, not uninstrumented, and that is a finding rather than a
deferral. It measures LOC to express the CB-RES-0001 synthetic game on our
kernel, against a boardgame.io baseline of ~36 LOC for a declarative 3p
commit/reveal game object. That artifact has never been built: games/
contains only ground, and benches/synthetic.rs drives GROUND rather than
defining a synthetic game. Measuring GROUND's 1,575 impl lines against a
36-line synthetic game object would compare two different games and call
the difference a D1 result.
So the tool ships the measurement — a marker-delimited region, self-tested
— and reports the row blocked, naming the missing artifact. A number would
have been worse than a blank. It stays unmutatable and still counts
against M-D1-MUT per ADR-0005 §1: a row that cannot fail asserts nothing,
however good the reason.
M-D1-MUT: 5 -> 6 of 14.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
a12861b85c
commit
1c3019c7e8
8 changed files with 301 additions and 10 deletions
|
|
@ -88,15 +88,32 @@ def rows():
|
|||
mutate=("scenarios/ground/gr-r06-round-resolve.yaml",
|
||||
"GR-R06, ", "")),
|
||||
|
||||
# A PROPERTY mutation: inflate the implementation past the ratio.
|
||||
# 58 rules x 40 = 2,320; the impl is 1,575, so ~800 lines of filler
|
||||
# crosses it. Raising the threshold instead would only prove the
|
||||
# comparison runs.
|
||||
Row("AM-2", "<= 40 spec lines per rule in games/ground",
|
||||
unmutatable="no instrument computes it. `make loc` prints LOC "
|
||||
"and nothing divides by rule count or compares to 40; "
|
||||
"CB-EV-0001 records AM-2 as unreported."),
|
||||
verify=py + ["tools/size-metrics.py"],
|
||||
mutate=("games/ground/src/lib.rs",
|
||||
"impl Aggregate for GroundState {",
|
||||
"fn _am2_filler() {\n" + " let _x = 0;\n" * 800
|
||||
+ "}\n\nimpl Aggregate for GroundState {"),
|
||||
expect="FAIL target <= 40"),
|
||||
|
||||
Row("AM-3", "synthetic workload definition <= 50 LOC",
|
||||
unmutatable="no instrument. The synthetic workload is hardcoded "
|
||||
"in benches/synthetic.rs (see K18) and its LOC is "
|
||||
"never measured or compared."),
|
||||
unmutatable="BLOCKED, not uninstrumented — the distinction "
|
||||
"matters. `make size-metrics` ships the measurement "
|
||||
"(a marker-delimited region) and reports the row "
|
||||
"blocked, because the artifact it measures has never "
|
||||
"been built: games/ contains only ground, and "
|
||||
"benches/synthetic.rs drives GROUND rather than "
|
||||
"defining a synthetic game. The baseline is a "
|
||||
"declarative 3p commit/reveal game object (~36 LOC, "
|
||||
"boardgame.io); measuring GROUND's 1,575 impl lines "
|
||||
"against it would compare two different games and "
|
||||
"call the difference a D1 result. Still counts "
|
||||
"against M-D1-MUT (ADR-0005 §1) — a row that cannot "
|
||||
"fail asserts nothing, however good the reason."),
|
||||
|
||||
Row("AM-4a", "third-party LOC, shipped runtime <= 250,000",
|
||||
verify=py + ["tools/dep-weight.py"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue