Repository navigation
feat(chartstats): cache compiled measurement programs - #44
Merged
Merged
Conversation
This was referenced Oct 9, 2026
nichinichisou0609
force-pushed
the
feat/chart-stats-program-cache
branch
from
October 10, 2026 04:39
df86cc7 to
14c8ded
Compare
nichinichisou0609
marked this pull request as ready for review
October 10, 2026 04:48
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.
Problem
A whole-chart cache loses useful work when unrelated master metadata or a skill catalog changes. It also cannot retain an expensive completed subprogram if a later measurement fails.
Changes
ChartStatsCache,chart_stats_with_cache,document_with_cacheand--stats-cache, with work counters on stderr. Existing uncached APIs and chart-stats/3 output remain unchanged.Validation
cargo fmt --all -- --checknative-fixtures, with-D warningsFull regression and snapshot validation
Full workspace
cargo test --release: 813 passed, zero failed, 5 ignored. The ignored tests are the repository's existing manual fixture/corpus exports. The validation build used a temporary single-codegen-unit setting; repository build profiles are unchanged.A complete real snapshot update grows from 348 charts and 37 aptitude shapes to 352 charts and 38 shapes, including a changed shape and shifted catalog indices:
The incremental, warm and uncached new-snapshot outputs are byte-identical: 12,668,775 bytes, SHA-256
7b48dda69ee9e828ac78bdc383f466fa572c733de3d4a1908d86c4d0dd266448. Counters represent operations across the three cache tiers, not chart counts; an expectation hit avoids lower-tier requests.The actual Python extension in StarMoe-org/nnnotes#21 also passed warm reuse, seed-prefix/provenance-only changes, invalid-original-input rejection, interrupted-build recovery and one-record corruption recovery.
Integration
The coordinated producer is StarMoe-org/nnnotes#21. Nominal expectation consumers are empty-sekai/ournotes-player#18 and nichinichisou0609/moenotes#7. Production replay/recommendation bundles require a release with matching model commit and source identities; this PR does not publish a release.
See
docs/chart-stats-cache.mdfor the identity boundary, APIs, counter meanings and storage lifecycle. The cache is disposable and has no automatic garbage collection; obsolete source namespaces can be removed independently.