GeezerVison is showing github.com — impl(atlas): D1 hot-cache schema, binding, and store module (#13100) by dezren39 · Pull Request #13141 · developing-today/code
Conversation
dezren39
commented
Nov 23, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Implements #13100 — follow-on 1 of 6 under the #9134 Atlas D1 tenant hot cache design (§5 storage, §8 item 1).
What lands
migrations/0001_hot_cache.sql — the design §5 hot_cache schema verbatim (shared database, tenant in the key, eviction index on (tenant_id, last_hit_at)).
HOT_CACHE D1 binding in wrangler.toml and mirrored in cloudflare.config.ts, plus the HOT_CACHE_ENABLED flag (default "false") in both. The committed database_id is the repo's local-placeholder convention (same as pkgs/id/worker-poc/d1-journal-poc): the real atlas-hot-cache database is created at deploy time and its id replaces the placeholder in both files; the README records this.
src/hot_cache.ts — the store module: get / put / touch / evict primitives over the table, plus hotCacheEnabled / hotCacheStore gating (flag off or binding absent → no store, callers keep the pre-cache path).
src/index.ts — Env gains the optional binding/flag fields only; no read path changes.
Acceptance check
- Schema migration lands: yes, as
migrations/0001_hot_cache.sql with migrations_dir wired in wrangler.toml.
- Store round-trips all three classes (A/B/C) against a local D1:
test/hot_cache.test.ts applies the real migration file to the miniflare D1 and round-trips byte-for-byte per class, plus tenant isolation, put-replace bookkeeping reset, touch/hit counting, evict semantics, and flag gating — 10/10.
- Flag off = zero behavior change: full package suite 41/41 (31 pre-existing + 10 new),
tsc --noEmit clean; nothing outside the new module references the store.
Closes #13100.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Follow-on 1 of 6 under #9134 (design §5, §8 item 1): the hot_cache
schema as migration 0001, the HOT_CACHE D1 binding in wrangler.toml
and cloudflare.config.ts (placeholder id; the real database is
created at deploy time), and src/hot_cache.ts with get/put/touch/
evict primitives over the shared table. The tier sits behind
HOT_CACHE_ENABLED, default off, so existing read paths are
untouched. Env gains the optional binding/flag fields only.
Tests: test/hot_cache.test.ts applies the real migration to a
local (miniflare) D1 and round-trips entries for all three classes
(A/B/C); full package suite 41/41, typecheck clean.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-23T09:06:34.498508Z |
cfe0eab |
PR opened |
ℹ️ 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Caution
Review failed
The pull request is closed.
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|