docs(gp): the reason k844 was deferred was wrong, and the correction is the point

context/code/gp.md §7 said reordering importance_ranking's arithmetic "moves the
bit patterns misclass_rate_and_importance_are_bit_for_bit_what_they_were pins",
and filed the fix on that cost. It does not. That test pins
permutation_importance's RAW scores; importance_ranking consumes them
afterwards, so no path it witnesses runs through the share. Measured on the
commit that actually fixes k844: tests/scoring_known_answers.rs is
byte-identical and not one literal moved.

A cost predicted from a test's name rather than from what it calls is how a
one-line fix stays filed. The wrong prediction is kept and corrected in place
rather than deleted, because that is the part a future reader needs — the fact
was stated in two sections and changing it is a grep, not an edit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
This commit is contained in:
Edward Langley
2026-09-22 16:04:34 -07:00
parent b39b3fbcb5
commit 48a1fa31db
+18 -7
View File
@@ -208,13 +208,24 @@ one function further along.** At `1e18` the map is finite, the fit lands, and
`importance_ranking` computes `100.0 * imp[j] / total` — the multiplication
first, so an importance over `f32::MAX / 100` is `inf` before the division that
would have given 100.0 — and `"#".repeat((inf / 5.0).round() as usize)` is a
saturating cast. The bar is clamped and the arithmetic is filed as
improvise-k844, deliberately unfixed here: reordering it moves the bit patterns
`misclass_rate_and_importance_are_bit_for_bit_what_they_were` pins, and this
change's own evidence is that none moved. The lesson to carry is the one the
*test* taught — a "just under the overflow" fixture at `1e18` aborted for an
unrelated reason, and the fixture that means what it says sits at `1e9`, with
`1e18` kept as its own guard against the second abort.
saturating cast. The bar is clamped and the arithmetic was filed as
improvise-k844, deliberately unfixed here.
**The stated reason for deferring it was wrong, and is worth keeping as the
correction rather than deleting.** This paragraph said reordering the arithmetic
"moves the bit patterns
`misclass_rate_and_importance_are_bit_for_bit_what_they_were` pins". It does
not: that test pins `permutation_importance`'s **raw scores**, and
`importance_ranking` consumes them afterwards, so no path it witnesses runs
through the share. Measured when k844 was actually fixed — the whole file is
byte-identical and not one literal moved. A cost predicted from a test's *name*
rather than from what it calls is how a one-line fix stays filed; §8 carries the
fix and what it really cost.
The lesson to carry is the one the *test* taught — a "just under the overflow"
fixture at `1e18` aborted for an unrelated reason, and the fixture that means
what it says sits at `1e9`, with `1e18` kept as its own guard against the second
abort.
## 8. `RegressionQuality` carries its own baseline