Repository navigation
Order persistent cache mutations within each tiered cache - #69
Merged
Merged
Conversation
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.
Change
Order persistent mutations admitted through one
TieredObjectCache. Same-keysets and deletes wait for predecessors;
clearAllanddestroywait forearlier admitted work and fence later mutations. Unrelated keys remain
independently runnable. Memory updates, read invalidation, admission checks
and failure behaviour are preserved.
The only production change is in
src/browser/cache.ts: 46 insertions andeight deletions. There is no public option, dependency, entry clone, retry,
stored-format or IndexedDB schema change.
Evidence
The report, exact tables, graph and raw evidence
record the prospective protocol and its 85/100 threshold. Source and collector
were pushed at
c727304a0e83bcefde722b321de6e0109ad674eebefore the firstand only detached comparative capture.
Across 384 matched pairs, expected outcomes improve from 264/384 to 384/384;
all 120 declared reverse-order conflicts reproduce in the baseline. Strict
adapter ordering improves from 72/384 to 384/384. Every pair preserves action
memory traces, clone work, metrics, admissions and adapter-attempt counts.
Both arms start five held unrelated-key operations. Each arm makes 1,392
adapter calls including cold verification, 768 action entry clones and
115,584 logical clone-input bytes. These are structural observations, not
latency or heap measurements.
Local qualification passes 37 focused cases, 275 existing controls, all
48 corrected native encrypted-IndexedDB/delayed-WebCrypto cases, types,
package build/exports, canonical documentation and website link checks.
The first native attempt passed 42/48 because two multikey fixture templates
used ineligible lower-case HEAD paths under the locations policy. Correcting
those two fixture lines changed neither runtime code nor protocol gates.
Both attempts and all runner digests are accounted for in the report.
The assessment is 91/100: 38/40 mutation correctness, 23/25 concurrency and
failure compatibility, 18/20 reproduction and 12/15 scope and simplicity.
Normal exact-head CI and human review remain required.
Costs and boundaries
Promise chains add scheduling, callbacks and active-key bookkeeping.
Conflicting operations can block behind a hung predecessor; cleanup can
retain dependency snapshots and block subsequent work. Caller concurrency
can create an uncapped backlog beyond resident-cache limits.
Adapters must report accurate completion promises, and set inputs must
remain stable until settlement. This does not order separate instances or
direct adapters, cover reads begun during unfinished mutations, or provide
cross-tab consistency or durable logout. No infrastructure, workflow,
deployment, release or shared-host runtime change is included.