Skip to content

fix(cache): decouple publication scheduling from history delivery - #399

Merged
k-taro56 merged 2 commits into
mainfrom
fix/cache-publication-history-20261030
Oct 29, 2026
Merged

k-taro56 merged 2 commits into
mainfrom
fix/cache-publication-history-20261030

Conversation

@soleil-colza

@soleil-colza soleil-colza commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Cache projection for a new change currently waits for the previous run's history storage and delivery, even after that run has finished publishing its cache records. A slow history destination can therefore delay later publication and response completion.

Separate the ordered projection tail from the ordered history and retry tail. KV, tag, marker, and continuation work still complete before a successful publication acknowledgement. Maintenance, repair preparation, retention, erasure, and test drains continue to wait for full completion. Native cache scheduling remains serial.

The projection fence is independent of early acknowledgements, and queued history receives only small completion metadata rather than carried values or record buffers. This preserves publication visibility without adding calls or waits to the cache-hit request path. The existing response wait limit and local record-copy behavior are unchanged.

Validation

  • 91 targeted local tests passed across 13 files, covering phase ordering, actual CacheScope integration, KV/tag/marker acknowledgement boundaries, failure recovery, private marks, full drains, request streaming, static navigation, cross-isolate record copies, commit fencing, repair, retention, and Native cache maintenance.
  • Formatting and file-scoped lint checks passed for the changed production and test files.
  • Repository-wide checks are left to PR CI. No deployed Cloudflare tests or benchmarks were run.

This removes history-related queue blocking; artifact upload and KV write latency remain unchanged.

@arkor-deploy

arkor-deploy Bot commented Oct 29, 2026

Copy link
Copy Markdown

Arkor — Preview deployments for arkorlab-upwind

Use the checkbox below to choose whether this pull request gets preview deployments.

  • Build and deploy previews for this pull request

Checking this builds the latest commit and future pushes. Unchecking stops queued and future builds; a running build can finish and an existing preview stays available.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 606ee247-1c1a-4cdd-b7c1-c53839862ba9
Commits

Reviewing files that changed from the base of the PR and between 32f3465 and d72154b.

Files selected for processing: 9
  • packages/cache/src/scope/cache-scope.ts
  • packages/cache/src/scope/history.ts
  • packages/cache/src/scope/scope-settle.ts
  • packages/cache/src/scope/settle-schedule.ts
  • packages/cache/src/scope/settle-serial.ts
  • packages/cache/src/scope/settle.ts
  • packages/cache/test/settle-order.test.ts
  • packages/cache/test/settle-projection.test.ts
  • packages/cache/test/settle-scope.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T15:53:28.303826Z d72154b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest changes preserve publication ordering and full-completion waits.

Summary

Separates ordered cache publication from ordered history and retry work, so slow history does not block later publication.

  • Cache publications move ahead while earlier history delivery finishes.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  P1[First projection] --> P2[Next projection]
  P1 --> H1[First history and retries]
  P2 --> H2[Next history and retries]
  H1 --> H2
  P2 --> A[Successful publication answer]
  H2 --> D[Full completion]
Loading

Reviews (2) · Last reviewed commit: "refactor(cache): keep settle phases with..." · Reviewed by Greptile

@k-taro56
k-taro56 merged commit 1deabf3 into main Oct 29, 2026
52 checks passed
@k-taro56
k-taro56 deleted the fix/cache-publication-history-20261030 branch October 29, 2026 16:00
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.

2 participants