You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
impl(atlas): D1 hot-cache schema, binding, and store module for the atlas-search Worker #13100
Implementation follow-on 1 of 6 under #9134 (Atlas D1 tenant hot cache design, doc/2026-11-23T08-06-00Z_design_atlas_d1_tenant_hot_cache/2026-11-23T08-06-00Z_design_atlas_d1_tenant_hot_cache.md, merged via PR #13098).
Scope (§5, §8 item 1 of the design): the D1 schema from the design's storage section, the wrangler D1 binding for the atlas-search Worker (pkgs/atlas-search/worker — it has no D1 binding today), and a cache store module exposing get/put/evict primitives over the hot_cache table, behind a config flag, default off.
Acceptance: schema migration lands; store module round-trips entries for all three classes (A/B/C) in tests against a local D1 (miniflare or equivalent); flag off = zero behavior change on existing read paths.
Claimed by Lane OL (sandbox fix lane) for implementation: D1 schema migration, wrangler D1 binding, and the hot-cache store module (get/put/evict over hot_cache, flag-gated, default off) per the #9134 design §5/§8 item 1. Working in a laptop worktree off current main.
Binding:HOT_CACHE D1 binding + HOT_CACHE_ENABLED flag (default "false") in both wrangler.toml and cloudflare.config.ts. The committed database_id is the repo's local-placeholder convention (mirrors 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 — recorded in the worker README.
Store module:src/hot_cache.ts — HotCacheStore with get/put/touch/evict over the shared table (tenant in the key), plus hotCacheEnabled/hotCacheStore gating: flag off or binding absent → no store, pre-cache path unchanged. Env gained only the optional fields; no read path touched.
Verification:test/hot_cache.test.ts applies the real migration file to a local miniflare D1 and round-trips entries for all three classes (A/B/C) byte-for-byte, plus tenant isolation, put-replace bookkeeping reset, touch hit-counting, evict semantics, and flag gating — 10/10. Full package suite 41/41 (31 pre-existing + 10 new); npm run typecheck clean.
Next slices stand as filed: #13101 (freshness evaluator), #13103 (admission/eviction), #13105 (read-path integration), #13106 (invalidation), #13107 (measurement).
Activity
developing-today commentedon Nov 23, 2026
CODE-4785
dezren39 commentedon Nov 23, 2026
Claimed by Lane OL (sandbox fix lane) for implementation: D1 schema migration, wrangler D1 binding, and the hot-cache store module (get/put/evict over
hot_cache, flag-gated, default off) per the #9134 design §5/§8 item 1. Working in a laptop worktree off current main.Merge pull request #13141 from developing-today/lane-ol-13100
dezren39 commentedon Nov 23, 2026
Done — Lane OL. Landed via PR #13141 (merged
9db2efc7ce0, head SHA-guarded atcfe0eabf758).pkgs/atlas-search/worker/migrations/0001_hot_cache.sql— the design(atlas): D1 tenant hot cache — admission, invalidation, Turso-hop skip #9134 design §5hot_cachetable + eviction index, verbatim;migrations_dirwired inwrangler.toml.HOT_CACHED1 binding +HOT_CACHE_ENABLEDflag (default"false") in bothwrangler.tomlandcloudflare.config.ts. The committeddatabase_idis the repo's local-placeholder convention (mirrorspkgs/id/worker-poc/d1-journal-poc); the realatlas-hot-cachedatabase is created at deploy time and its id replaces the placeholder in both files — recorded in the worker README.src/hot_cache.ts—HotCacheStorewith get/put/touch/evict over the shared table (tenant in the key), plushotCacheEnabled/hotCacheStoregating: flag off or binding absent → no store, pre-cache path unchanged.Envgained only the optional fields; no read path touched.test/hot_cache.test.tsapplies the real migration file to a local miniflare D1 and round-trips entries for all three classes (A/B/C) byte-for-byte, plus tenant isolation, put-replace bookkeeping reset, touch hit-counting, evict semantics, and flag gating — 10/10. Full package suite 41/41 (31 pre-existing + 10 new);npm run typecheckclean.Next slices stand as filed: #13101 (freshness evaluator), #13103 (admission/eviction), #13105 (read-path integration), #13106 (invalidation), #13107 (measurement).