Skip to content

feat(fmt): add persistent cache store - #223

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/feat-fmt-cache-store
Aug 6, 2026
Merged

feat(fmt): add persistent cache store#223
chenjiahan merged 1 commit into
mainfrom
chenjiahan/feat-fmt-cache-store

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Persistent fmt caching needs a failure-tolerant store that can safely reuse entries across partial runs.

This adds a validated v1 cache schema with namespace invalidation, subset-preserving updates, and atomic same-directory replacement; malformed or unwritable caches degrade to misses.

The warm load path reuses the original JSON string as its change baseline, reducing a 4,325-entry (0.8 MiB) cache load from 2.85 ms to 2.02 ms in a local microbenchmark.

This is internal-only and does not yet enable fmt caching.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b70553af63

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/rstack/src/fmt/cacheStore.ts
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: b70553a
Status: ✅  Deploy successful!
Preview URL: https://7fd8b38b.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-feat-fmt-cache-st.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit f2949b5 into main Aug 6, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/feat-fmt-cache-store branch August 6, 2026 13:31
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