Skip to content

Coalesce active persistent reads outside publication metadata - #75

Merged
Jason-Doyle merged 4 commits into
mainfrom
experiment/persistent-read-coalescing
Dec 4, 2026
Merged

Jason-Doyle merged 4 commits into
mainfrom
experiment/persistent-read-coalescing

Conversation

@Jason-Doyle

Copy link
Copy Markdown
Owner

Change

Share one active persistent-read promise per key and invalidation generation
within a TieredObjectCache, except publication metadata ending in
/HEAD.json or /current.json. Each waiter keeps its policy/invalidation
checks, hydration, metrics and independently mutable result.

The existing token drains after its last waiter. Completed reads and misses
are not retained. Different keys/instances, metadata-read progress, mutation
fences, formats, public options and encryption remain unchanged.

Preparation and evidence

The report, exact tables, graphs and original evidence
record both prospective protocol revisions, frozen source, limits and
reproduction commands.

The broad preparation prototype blocked HEAD publication behind an older held
read. Its exact patch, both executable graphs, all eight counterexample
observations and initial failures are retained. The narrowed protocol was
published before its metadata exclusion and before scored/native collection.
All existing hydration/client tests remain unchanged. No frozen input or
original capture was edited or rerun.

  • The 528-row controlled comparison reduces exercise delegate gets from 1,376
    to 1,056. All observations independently rebuild/replay, and all 200 complete
    normalised-work controls match.
  • One zero-retry encrypted-browser invocation passes 216 tests and 432
    independently verified observations with 168 same-runtime controls.
    Per engine, exercise IndexedDB gets fall from 392 to 312 and decryptions
    from 344 to 280, while explicit ownership clones rise from 288 to 320 and
    logical clone-input bytes from 90,272 to 101,488.
  • All 852 focused/related cases pass, including 52 new focused cases.
    The exact historical substitution has 38 passes and 14 targeted failures.
    Types, package build, isolated packed-consumer/browser-isolation
    qualification and 72 full built-entrypoint observation probes pass.
    Supplemental built shared-branch invalidation probes cover both policies.
  • Canonical cache, architecture, protocol and evaluation documentation,
    changelog and discovery text describe the shared-read boundary and costs.

Decision and limits

Merge-worthiness is 90/100 against a threshold of 85, conditional on full CI,
CodeQL and all mandatory checks passing on this publication head, followed
by the required review.

This establishes controlled per-instance work reductions with an explicit-copy
tradeoff. It establishes no production incidence, total-allocation, heap,
device-storage, CPU, throughput or latency benefit. Metadata, warm,
sequential, unrelated-key and independent-instance controls show no work
reduction. Windows WebKit does not qualify Apple Safari.

Outside the explicit metadata exclusions, custom get hook calls follow
shared generations rather than caller count. Waiters share a snapshot or
failure; per-caller side effects or progressive snapshots are a poor fit.
A hung read can hold all its waiters, and resident budgets do not bound
pending work. No infrastructure, workflow, runtime, release or deployment
change is included. The separately parked range-candidate prototype remains
outside this branch.

@Jason-Doyle
Jason-Doyle merged commit 48be141 into main Dec 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant