Commit 5227ea5
committed
mudlark: close mutation-testing gaps; rewrite README with doc-tested examples
A cargo-mutants run produced ~305 surviving mutants, revealing
systematic blind spots in value-correctness, boundary-precision,
and type-coverage testing. ADR-M-039 documents the analysis and
classifies survivors into seven mutant classes; this commit closes
the gaps it identified.
Test count: 868 → 1 311 (+443 tests across all three surfaces).
New crate-level test modules:
- config_validation: rejects invalid Config combinations
- decompose_basis: value-exact basis-element assertions
- invariant_self: checker self-consistency (kills class-1 mutants)
New integration tests:
- pedagogy: 10-step narrative walkthrough of the worked example
from §IDEA M-16 — bootstrap split, catalytic split, skip-
promote, uncle shield, PEWEI extraction, proportional sampling,
subtree decay, and post-decay rebalancing. Every assertion
maps to a spec claim; every step prints a teaching narrative.
- pedagogy_advanced: 18-step companion covering the read surface
— construction alternatives (from_observations, Extend, Clone),
gnode_info / is_ancestor_of introspection, range_sum pro-ration
subtleties, full contour-range query pipeline (endpoint lattice,
basis consolidation, energy-field algebraic identity,
energy-only variant, invalid-endpoint rejection), plateau
selection with outward snap, progressive PEWEI reconstruction
with truncation, and budget-limited eviction under a tight
budget=10 ceiling.
- eviction_diagnostic: step-by-step diagnostic replay (replaces
eviction_debug)
- eviction_plateau: plateau integrity through eviction cycles
(replaces eviction_p_i2)
Both pedagogy tests use `harness = false` (custom main) so the
steps execute in sequence on a shared graph, printing a continuous
narrative that can be read alongside the formal spec.
Removed (superseded):
- eviction_debug → eviction_diagnostic
- eviction_p_i2 → eviction_plateau
Every existing test file receives a doc-header index table per the
new AGENTS.md "Test Doc-Headers" convention, plus targeted new tests
to kill mutation-testing survivors.
README rewrite:
- New "Choose GvGraph" section (when to use, when not to)
- Quick Start rebuilt around a minimal N=3 graph with five
canonical observations; each section is a runnable doc-test
(compiled via `include_str!` in lib.rs)
- New sections: adaptive splitting with ASCII contour diagrams,
entropy-adaptive sampling, targeted subtree decay, advanced
usage (checkpoint/fork, gnode_info, contour-range decomposition,
progressive PEWEI reconstruction, budget-constrained operation)
- "Limitations" section (1D only, f64 cost, single-writer, no
signed accumulators)
- Performance table softened to "typical latencies" with caveat
that absolute numbers vary by hardware
- Cross-reference conventions reformatted as a tag→document table
- License section updated for the new LINKING-EXCEPTION
LINKING-EXCEPTION:
AGPL-3.0-only linking exception (v1.0) permitting unmodified use
through Surfaces 1 and 2 without copyleft obligations on the
consumer's code. Surface 3 (pub(crate) / #[doc(hidden)]) remains
fully AGPL. Explicitly notes the Legacy Exception does not apply
to this package.
Other changes:
- Cell / api.md docs expanded: sample() can land on internal
G-nodes whose V-entry carries frozen pre-split intensity
(ADR-M-019, §IDEA M-6.5)
- GNode::Internal doc-comment expanded with the same detail
- Config<V> derives PartialEq (needed by config_validation and
the pedagogy test's README_CONFIG == worked_example_config guard)
- Testing presets: no_split_config, f64_no_split_config,
decay_config, contour_range_config, plan_multi_plateau
- Testing runners: run_diagnostic, run_diagnostic_budgeted
(step-by-step invariant-checking replay with full diagnostic
dump on first violation)
- ADR tables reformatted for consistent column alignment
- AGENTS.md: "Test Doc-Headers" convention added, table and
prose refinements
- CHANGELOG date corrected to 2026-03-21; test counts updated
- rand 0.10 added to dev-dependencies
- updated `project-words.txt`1 parent 342c389 commit 5227ea5
95 files changed
Lines changed: 17868 additions & 4290 deletions
File tree
- packages/mudlark
- adr
- docs
- src
- testing
- tests
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments