Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #827 +/- ##
============================================
+ Coverage 52.20% 71.85% +19.64%
============================================
Files 116 167 +51
Lines 6166 14700 +8534
Branches 6166 14700 +8534
============================================
+ Hits 3219 10562 +7343
- Misses 2866 3861 +995
- Partials 81 277 +196 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Introduce the new sub-package called "mudlark", named after the Magpie-Lark. Path: "packages/mudlark"
BREAKING CHANGES: - Replace `GNodeInfo<C, V>` with `Node<C, V>` — `gnode_info()` now returns the same Surface 1 view type used by `layers()`. A new `#[doc(hidden)] GNodeChildren` covers the child-linkage use case. - Demote `VNodeId` to `pub(crate)` — no public consuming method exists (ADR-M-032 handle test). - Demote `v_root()` to `pub(crate)`. - Mark `GNodeId::from_index()` and `GNodeId::index()` as `#[doc(hidden)]`. - Split `Observation::scale()` (panicking default) into a separate `ScalableObservation<V>` sub-trait. Cross-type impls (f64→uint, f32→uint, f64→f32) implement both; same-type impls no longer carry an unusable `scale()`. - Relax `select_plateaus` bound from `V: Proratable + Inspectable` to `V: Inspectable`. - Demote `serde` from a default feature to opt-in. - `Cell` now represents the uncovered interval (terminal or vacated semi-internal half), not always the full G-node range. `sample()` returns the narrowed interval for semi-internals. Bug fixes: - Fix decay factor-table index-out-of-bounds panic for f64 coordinates where G-tree depth can exceed N (ADR-M-038). The factor table is now sized from the actual max depth within the subtree, not from `N - d_root`. - Allow `attenuation = 0.0` in `decay()` (annihilation, §THEORY M-7.3) and handle `attenuation = ∞` (infinite amplification) without NaN from `ln(0) * 0` or `ln(∞) * 0`. - Guard `Attenuatable::attenuate()` for f32/f64 against IEEE 754 `0 * ∞ = NaN` — if either operand is zero, return zero. - Fix invariant checkers and debug assertions to short-circuit `∞ == ∞` before computing `∞ - ∞ = NaN`. Improvements: - Add `Node::parent` field and `Node::is_root()` method. - Add `debug_assert!` P2 guard in `observe()` for negative accumulations (ADR-M-033). - Move `select_plateaus` from graph_query.rs to graph_plateau.rs. - Relax `Pewei` method bounds: `layer_count()`, `node_count()`, `reconstruct_all()` require only `Accumulator`, not `Proratable`. - Correct sampling cost from O(1.44 H + 1.67) to O(1.44 H). - Mark `build_plateaus()` and `build_plateau_basis()` as `#[doc(hidden)]`. Documentation: - Rewrite ADR-M-032 with testable surface-assignment criteria and expanded analogy tables. - Add ADR-M-038 (decay factor-table depth bound). - Significantly expand docs/api.md with Cell/Node/contour-range semantics, cross-references, and worked examples. - Update idea.md, architecture.md, performance.md, testing.md. Tests: - Add `tests/decay_infinite.rs` — infinite amplification, ADR-M-038 regression, and annihilation edge cases (480 lines). - Add `tests/negative_f64.rs` — P2 violation guard and downstream semantic breakage tests (290 lines). - Update test count: 833 → 868 (346 unit, 415 integration, 107 doc-tests). - Update CHANGELOG release date to 2026-03-20.
…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`
Hierarchical online subspace anomaly detection for positionally structured observation streams (e.g. IPv6 addresses), generic over coordinate type, accumulator type, and domain bit-width. The sentinel maintains per-cell low-rank linear subspace models and scores each incoming batch via streaming thin SVD with exponential forgetting. It produces raw statistical measurements — never opinions. Core implementation: - SpectralSentinel<C,V,N> engine with Sentinel128/Sentinel64 aliases - G-V Graph integration for adaptive spatial partitioning - Analysis selector (top-K competitive cells, Steiner-closed ancestry) - SubspaceTracker per cell: Brand incremental SVD, EWMA baselines, CUSUM change detection, four scoring axes (novelty, displacement, surprise, coherence) - Hierarchical coordination: SVD-based cross-cell scoring at internal g-tree nodes with per-member breakdowns - Automatic depth-tiered noise injection for cold-start warm-up - Spatial decay via configurable attenuation and depth selectivity - Serde support behind a feature flag - BatchReport/HealthReport/CellInspection public report types 21 ADRs documenting design decisions (ADR-S-001 through ADR-S-021). Full algorithm specification and implementation status docs. Three-level test suite: - Unit tests inline and in src/tests/ (config, EWMA, CUSUM, tracker, convergence, observation, analysis set, variance, clipping) - Crate tests in tests/ covering: API surface, ancestor chains, clip pressure, coordination, coverage matrix, decay, determinism, deferred warm-up, edge cases, graph routing, health, integration, invariants, noise injection, report structure, serde round-trips, spray resistance, suffix analysis, u64 path, and warm-up sequence - Benchmarks (sentinel.rs)
98b82af to
0d4bf03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft Package, depends on: