From d8b4398096efd621f979ed223dc97bb0a551879c Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 3 Aug 2026 18:21:51 +0200 Subject: [PATCH] Declare CB-WP-0019: the AM-4 family's last two defects, tier M Both owed numbers measured BEFORE declaring, so the work is scoped against facts. AM-4b's scope: 29 crates / 317,021 lines instrumented against 57 / 725,258 real, so 28 crates and 408,237 lines are uncounted -- more than its own 350,000 target. AM-4b's proc-macro share: 109,585 lines, 15.1%. That 15.1% vindicates ADR-0008 D2, which refused to correct AM-4b using AM-4a's measured 36.2% because 'correcting a second instrument on the strength of the first one's ratio is the error this change exists to fix'. Borrowing would have been wrong by more than a factor of two. Also carries the self-quoting rule, which is six-for-six under-reported by never less than 30% with both causes diagnosed, and still lives only in evidence files. Structural tier M: changes a budget's scope and target and a reporting rule. Chaos d8=5, no override -- the first roll at the new rate. Declaration 2 of window 2. Meta budget 0%; ADR-0006 D2 exempts instrument repair regardless. Co-Authored-By: Claude Opus 5 --- workplans/CB-WP-0019-the-am4-family.md | 163 +++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 workplans/CB-WP-0019-the-am4-family.md diff --git a/workplans/CB-WP-0019-the-am4-family.md b/workplans/CB-WP-0019-the-am4-family.md new file mode 100644 index 0000000..a9529d7 --- /dev/null +++ b/workplans/CB-WP-0019-the-am4-family.md @@ -0,0 +1,163 @@ +--- +id: CB-WP-0019 +kind: meta +title: "The AM-4 family's last two defects, and the self-quoting rule" +status: todo +--- + +# Purpose + +``` +structural tier M (changes how the loop constrains its own operation: + a budget's scope and target, and a reporting rule) +chaos d8 = 5 → no override +declared tier M +``` + +Declaration 2 of chaos window 2, and **the first roll at d8**. + +**Meta budget is 0%** over the trailing three, all product. ADR-0006 D2 +exempts instrument repair anyway, and this is the repair four evidence +files have listed as owed. + +## Two numbers that have been owed for five passes + +Both were measured before this declaration, so the work is scoped against +facts rather than an intention to find them. + +**AM-4b's scope**, owed since CB-EV-0012 §3: + +| | crates | lines | +|---|---:|---:| +| AM-4b as instrumented (`games-ground`, `--edges normal`) | 29 | 317,021 | +| the whole workspace, dev edges included | 57 | 725,258 | +| **uncounted** | **28** | **408,237** | + +**The dev-toolchain budget is blind to more source than its own target +of 350,000.** `criterion`, `clap`, `ciborium`, `quick-js` and now +`cb-game-runtime`'s dev graph are all invisible to it. + +**AM-4b's proc-macro share**, owed since ADR-0008 D2: **109,585 lines, +15.1%** of the real graph. + +That 15.1% is worth stating plainly, because it **vindicates a decision +made for the right reason**. ADR-0008 D2 refused to correct AM-4b using +AM-4a's measured 36.2%, saying *"correcting a second instrument on the +strength of the first one's ratio is the error this change exists to +fix."* The shares are 36.2% and 15.1%. Borrowing would have been wrong by +a factor of more than two. + +## Task: give AM-4b a scope, and a target that matches it + +```task +id: CB-WP-0019-T01 +status: todo +priority: high +``` + +Decide what AM-4b is **for**, then instrument that. + +The two honest candidates, and the choice needs an argument rather than a +default: + +- **Widen it** to the whole workspace with dev edges — everything a + contributor's `cargo test` acquires. Then the target must move with the + instrument, exactly as ADR-0008 D3 moved AM-4a's, and **the target moves + to fit the measurement, not the measurement to fit the target.** +- **Narrow the claim** to what it actually measures and rename it, if + "one package's non-dev graph" is the thing worth bounding. + +Whichever wins, **do not repeat ADR-0008 D3's generosity by reflex.** That +decision gave back a small rounding-up because a target with 1.5% of room +fails on a patch release; a target set 130% above the current reading +would not be a budget at all. + +**Controls:** +- the mutation must still go red — AM-4b's row is currently enforced and + must stay so; +- a test that the configuration measures what its name says: if it claims + dev edges, a dev-only dependency must move the number. `quick-js` is the + case to use, because it is dev-only and it is what exposed this. + +## Task: the proc-macro share, decided not just measured + +```task +id: CB-WP-0019-T02 +status: todo +priority: high +``` + +15.1% is measured. What is owed is the **decision**: does the dev budget +exclude proc-macro crates as the shipped one does? + +The shipped case was easy — a proc-macro never reaches a shipped binary, +so counting it in "what a game ships" was simply wrong. **The dev case is +not the same question.** A proc-macro *is* acquired, *is* compiled, *is* +unaudited third-party source on a contributor's machine, and the +acquisition rule (ADR-0007 D3) counts what the build causes to be fetched. + +So the arguments point opposite ways and the answer is not inherited. +Decide it, and say which of the two rules governs when they disagree. + +**Whatever is decided, ADR-0008 D2's note that AM-4b's share is unmeasured +must stop being true in the source.** + +## Task: write the self-quoting rule down + +```task +id: CB-WP-0019-T03 +status: todo +priority: high +``` + +Six passes, six under-reports, both halves of the defect diagnosed, and +the rule still lives only in evidence files: + +| pass | reported mid-flight | settled | under by | +|---|---|---|---| +| CB-WP-0009 | $6.73 | $11.31 | 40% | +| CB-WP-0011 | $4.23 | $7.02 | 40% | +| CB-WP-0012 | $8.82 | $14.52 | 39% | +| CB-WP-0013 | $5.78 | $8.26 | 30% | +| CB-WP-0015 | $15.14 | $22.70 | 33% | +| CB-WP-0017 | $5.19 | $9.48 | 45% | + +**Six for six, always low, never by less than 30%.** That is not noise; +it is a systematic bias with two identified causes (CB-EV-0013 §5, +CB-EV-0015 §6): + +1. a pass's window runs to the **next** pass's first commit, so the + previous pass is not final until the one after it starts; +2. **a figure read earlier in a session is an in-flight figure regardless + of whose name is on it** — quoting from memory defeats the rule even + when the boundary is right. + +Put it in `specs/InnerLoop.md` as a rule with both halves, and make +`loop-lint` check what it can. A rule that lives only in prose has been +re-derived three times already. + +**The honest question to answer while writing it:** is the right rule +"quote two passes back", or "re-run the instrument at quote time", or +both? T03 of CB-WP-0018 used the second and it worked. Say which is load +bearing. + +## Task: evidence + +```task +id: CB-WP-0019-T04 +status: todo +priority: high +``` + +`evidence/CB-EV-0017-*.md`. + +- **The AM-4 family, closed or not.** Four defects found across five + passes, none by looking for them. State whether any remain and whether + the family is now trustworthy — and if a fifth is plausible, say where. +- **What five passes of being "owed" cost.** These two numbers were + carried as open items in four consecutive evidence files. Either the + carrying was cheap and correct, or it was a way of not doing the work; + say which, with the cost. +- **Quote CB-WP-0018's cost by re-running the instrument.** Under the rule + T03 writes down. +- **Chaos: declaration 2 of 12 in window 2, first roll at d8.**