Repository navigation
perf(cache): extraction, catalog and notes state survive a release when their code did not change - #293
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | c6f7b63 | Commit Preview URL Branch Preview URL |
Nov 13 2026, 09:23 AM |
…en their code did not change Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The scan found impls by the literal trait name at the start of a line, so `use patchula_cache::State as S; impl S for T` shipped unseen. Any `impl … for …` block whose own items declare `const NAMESPACE` (only State declares it) now counts, wherever it sits on the line; an impl nested in another block's fn counts once. A namespace listed twice in tests/state-exempt.tsv fails instead of keeping the last reason. Edits to a listed file bump the version, always: github-release-head (2), source-head, tag-catalog and tag-object (2), and catalog and catalog-controls (2), whose rows cover all of datasource and engine. osv-listing's exemption names the setting that bounds it.
sweepies
force-pushed
the
perf/state-versions
branch
from
November 13, 2026 09:23
9639cb6 to
c6f7b63
Compare
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.
Follow-up to #291. Every per-build state namespace (
PER_BUILD) carried the release in its key, so each release made every repository cold at once: re-evaluated config, re-extracted files, refetched catalog controls, re-parsed changelogs. That is the moment the server is busiest.PER_BUILDis gone. A state that depends on this build's code setsCODE_VERSIONED, and itsVERSIONnames the derivation, not the release. The key isname@v{VERSION}, so a release keeps every entry whose deriving code did not change. Old+buildrows are still pruned on open.tests/state-versions.tsvgeneralises perf(http): a derived body is versioned by its code, not by the release #291's table: per state, the source files and trees whose text determines it, the locked versions of the dependency crates that do, and their hash. The extraction and config rows covercrates/manager/src, mise, config evaluation, words, versioning, update planning,PatchulaConfig.pkland 19 parsing crates.patchula_testkit::statealso scans each crate forCODE_VERSIONEDimplementations, so none can exist unregistered. The hashing is shared with perf(http): a derived body is versioned by its code, not by the release #291's derived-body guard (testkit/src/versions.rs).config,config-files,extract,files,catalog,catalog-controls,changelog,notes-adapter,not-ours, each bumped once for the cutover. The three notes adapterDeriveds move to v2, because their source file is theirs too.lookup-hintandbranch-hint. They only name what to prefetch, so a stale hint costs one wasted prefetch and never a wrong answer (documented on the types).Behaviour change: a release keeps config, extraction, catalog, changelog and ownership state whose code did not change (
internals/cache.md, with the maintenance rule).Proof:
code_versioned_state_survives_a_releaseanda_saved_extraction_survives_a_release: an entry written by one build is read by the next when its version is unchanged, and missed when bumped; a legacy+buildrow is pruned.crates/manager/src/npm.rs, andsemverbumped inCargo.lock, each fail the guard; both reverted.