Conversation
Callers need durable visibility into topology churn without reconstructing it from live graph state. Saturating split, eviction, and restoration totals make those mutations observable while preserving monotonicity. Expose the live semi-internal population separately as a bounded scan, and exercise every node-count transition so each structural site has direct coverage.
The headroom accessor returns a conservative ceiling even when the configured depth would overflow the structural exponent. Documenting the saturation makes clear that overflow cannot turn an impossible budget into an admissible one.
Publish the additive structural-mutation counters and semi-internal reader as a minor release so callers can depend on the new observation surface. Keep the package manifest, Cargo lock identity, dated changelog section, and release comparison link aligned.
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.
Summary
Release Mudlark 1.1.0 with monotonic counters for structural splits, evictions and restorations, plus a reader for the current semi-internal population. The API change is additive.
Motivation
Consumers can observe the live graph shape, but cannot distinguish accumulated structural churn from the current state: reconstructing split, eviction and restoration history from node-state deltas is expensive and unreliable, and a counter epoch that starts at construction makes interval deltas composable across operations. The semi-internal population is a current-state diagnostic in its own right and had no reader.
Change
StructuralMutationCountswith publicsplits,evictionsandrestorationstotals; each saturates atu64::MAXrather than wrapping, so it never decreases during the graph's lifetime. A split is counted per child created, so a bisection adds two and a legacy promotion that recreates one missing child adds one restoration.bootstrap_split,catalytic_split,evict_tipandhandle_legacy_promotes. The audit ofnode_countmutation sites finds exactly these four.GvGraph::structural_mutation_counts()andGvGraph::semi_internal_count(), the latter computed by scanning the live nodes because the transitions that create and remove a semi-internal node are spread across splitting, eviction and restoration.Verification
At the head commit:
cargo +stable clippy --keep-going --workspace --all-targets --all-features -- -D warnings— exit 0.cargo +stable test -p torrust-mudlark --all-targets --all-features— exit 0 (668 unit tests, the integration targets, 116 doctests).cargo +1.90.0 check -p torrust-mudlark --all-features— exit 0.cargo test -p torrust-mudlark --doc --all-features— exit 0.RUSTDOCFLAGS="-D warnings" cargo doc -p torrust-mudlark --no-deps— exit 0.cargo metadata --format-version 1 --locked— exit 0 and resolvestorrust-mudlark1.1.0 from the committed lockfile.terminal_count_decreases_on_evictionfail withleft: 0, right: 1; restoring the file reproduces its blob, mode and mtime exactly.The public-surface diff is exactly the new struct, its three fields, the two readers and the crate-root re-export; nothing public changed or moved. The lock moves only the
torrust-mudlarkentry. No dependency change.Review notes
Nightly workspace clippy on the newest nightly reports two
double_must_usefindings inindex-cli-common, both present at the base and outside this change; stable workspace clippy is green and is the lint this workspace certifies on.