Repository navigation
fix(cache): dependency versions key the cache, so dependency bumps need no hand edits - #324
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | d509f24 | Commit Preview URL Branch Preview URL |
Nov 14 2026, 08:38 AM |
…our sources The first run after upgrading starts with a cold cache: stored extractions, configs, catalogs, parsed notes and derived registry bodies are fetched and derived again once.
A dependency bump or version bump no longer leaves the old entries behind: opening the cache deletes stored values and derived bodies kept under a key this release no longer reads, so the cache stops growing with each upgrade.
sweepies
force-pushed
the
refactor/state-dep-fingerprint
branch
from
November 14, 2026 08:31
1044f3d to
dbb5333
Compare
…h open, document what fingerprints miss
Merged
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.
The Count's own dependency PRs on this repository failed CI whenever they bumped a crate a cached state lists (#311 pklr, #313 toml_edit). The state-version guard hashed those crates' locked versions and demanded a hand-edited
VERSIONbump that a bot can't make.Change
crates/cache/build.rsreads the workspaceCargo.lockand the two tables (tests/state-versions.tsv,tests/derived-versions.tsv). For every row it emits the current key,name@vN~<fp>, wherefpis a short hash of the row's listed crates' locked versions. A dependency bump invalidates exactly the affected cached states and derived bodies, with no hand step. The separator is~because migration 014 deletes keys containing+.Cargo.lock, and a malformed table fails the build. The guard and the build share one parser (crates/cache/build_support.rs).DELETEper table removes rows for a tabled name whose key isn't current, which covers old versions, old fingerprints and the plain keys from before fingerprints. Migration 015 adds the index the HTTP prune needs.patchula-cachebeside state keys.internals/cache.md.User-visible effect
After upgrading, the cache starts cold once, because every tabled key changes format. Two builds that share one cache directory and differ in a version or a locked crate will evict each other's entries for those names, which is documented.
Proof
mise run test:unit(1435 tests), clippy andbuild:cliall pass.This will need a rebase and rehash once #323 merges.