Skip to content

Migrate indefinite Worker cache to bounded tenant-safe cache #10166

Open

Description

@dezren39

Problem and goal

Implement tenant/auth/policy-bound key, pushed corpus watermark, explicit cache flags, immediate revocation fail-closed and bounded eviction.

Version and design basis

Version: V3. Settled design: https://github.com/developing-today/code/blob/main/doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-c/versioned-design.md#9134-tenant-hot-cache-s24s26-s217 (section: #9134 tenant hot cache (S2.4–S2.6, S2.17)).
Tier: recommended.
Statement IDs: S2.4, S2.5, S2.6, S2.17
Enables: tenant-scoped cached search

Scope and ownership

Parent: #9134 (native component/meta parent).

  • pkgs/atlas-search/worker/src/cache_do.ts (existing; owner: C9134-02)
  • pkgs/atlas-search/worker/src/key.ts (existing; owner: C9134-02)
  • pkgs/atlas-search/worker/test/cache_policy.test.ts (new; owner: C9134-02)
    Hard dependencies (native blockers): C9134-01 — cache key, watermark, policy epoch, real-time/bypass and fail-closed contract
    Soft sequencing (not blockers): none

Test / evidence first

Create or validate pkgs/atlas-search/worker/test/cache_policy.test.ts first. Proposed command: npm --prefix pkgs/atlas-search/worker exec vitest -- run test/cache_policy.test.ts
Oracle: model — expected Stale policy cannot serve; event gap fails closed; tenant/auth/policy keys do not collide; max bytes evicts; hot valid result performs zero Turso reads.; verifier: Independent cache policy model and fake Turso-read/event feed counters..

Done and rollback

Done when the declared oracle passes and test/evidence output plus changed-file summary is attached. Research evidence: not applicable.
Rollback: Disable cache serving via the cache-disable path and route requests to the authorized source; do not re-enable legacy indefinite entries.

Manifest SHA-256 approval binding: 3b5bce3523945bf5adaa28739f0b90b7b70ff1d6522b4ac827246654e8ff6b06.

Acceptance criteria

  • The indefinite Worker cache is migrated to the bounded tenant-safe cache per the settled design section cited in the body (parent design(atlas): D1 tenant hot cache — admission, invalidation, Turso-hop skip #9134), with tenant isolation demonstrated.
  • Evidence for the result (test run, live check, or the delivered artifact) is linked on this issue.
  • Follow-on work, if any remains, is filed as its own issue and linked here.

Activity

  1. developing-today commented on Nov 14, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Preflight record — task 17016 / slice C9134-02 (lane code-d, 2026-11-14)

  3. added
    queue/blocked
    status/blocked
    work/assigned
    on Nov 14, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    state: triaged — implementation already routed and correctly dep-blocked
    lane: any-b, worker: repo-worker-code, task 19125

    Triage verdict for #10166 (checked fresh this shift, 2026-11-17): nothing new to route — the slice's task exists and is structurally dep-blocked on the right blocker.

  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 agent=repo-worker-code lane=code-g state=blocked task=17016

    Preflight revalidated 2026-11-17: #10154 still OPEN. Task 17016 self-blocked again on the native blocker; no implementation performed.

  6. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: openchamber-scheduled-lane (code-g) · worker repo-worker-code · queue task 20488
    kind: triage → blocked (no change)
    Fresh check 2026-11-18: #10166 OPEN. Hard dependency C9134-01 (#10154) is still OPEN, so the cache key, watermark and policy work cannot start. Blocked until #10154 closes.

  7. removed their assignment
    on Nov 20, 2026
  8. dezren39 commented on Nov 20, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: blocked
    task: 17016
    worker: repo-worker-code
    lane: oc-code-03
    origin: openchamber-scheduled-lane
    stage: native_blocker_preflight

    Fresh native blocker preflight (2026-11-20 17:48Z): #10154 is OPEN. Per the mandatory preflight packet, no implementation or rollout is authorized while the blocker remains open. Task 17016 is self-blocked with the native issue recorded; no repository files changed.

  9. added
    epic/atlas-program
    primary-parent/atlas-program
    stray-work
    on Nov 27, 2026
  10. added
    priority/normal
    on Nov 29, 2026
  11. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    🤖 Census note — 2026-11-29 (lane CEN-C09, full issue census)

    State verified today: blocked exactly as the preflights record — the migration cannot start until the C9134-01 contract exists.
    Blocker (verified OPEN 2026-11-29): #10154 (cache epoch/hot-result contract), itself down to one gate (#9092).
    Next step: when #10154 closes, migrate cache_do.ts/key.ts to the tenant/auth/policy-bound key + pushed watermark + fail-closed revocation per the contract, with cache_policy.test.ts as the evidence.
    Census fixes: added priority/normal (body tier: recommended).
    Verdict: blocked — detail complete; gated on #10154.

  12. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full recheck of this issue — details, labels, blockers, priority (rechecked from scratch; prior detail did not exempt it).

    STRENGTHS:

    • substantive body (1920 chars)
    • acceptance structure present (0 checklist items, 0 checked)
    • names concrete file/module pointers: com/developing-today/code/blob/main/doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-c/versioned-design.md, pkgs/atlas-search/worker, pkgs/atlas-search/worker/src/cache_do.ts, pkgs/atlas-search/worker/src/key.ts
    • 7 prior comments of triage/work history on record
    • priority already set (priority/normal)
    • native blocked_by edges already present: Cache epoch and hot-result contract #10154

    GAPS FOUND:

    • no kind label (kind not unambiguous from title/body — left for the picking-up lane to set)

    FIXES I APPLIED:

    • none needed

    REMAINS: nothing — ready for pickup

  13. added
    app/atlas
    effort/m
    on Nov 29, 2026
  14. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Wave-2 residual pass. A parallel census note (Census 2026-11-29 (Felix)) already covers this issue today, and wave 1 of this census audited the head of this group; their verdicts are not duplicated here. This note records only the residual fixes applied after re-verifying the live state (state, body, labels, recent comments) immediately before editing.

    Residual gaps found: no kind/* label (a parallel census note today left it for the picking-up lane; set here from the title/body); no app/*/area/* label although the owning project is clear from the title/body; no effort/* label; no acceptance-criteria section.

    Actions taken: labels added: kind/enhancement, app/atlas, effort/m; appended ## Acceptance criteria (original body text unchanged above it).

    Blocker recorded in this census note: the issue carries status/blocked + queue/blocked; its Scope and ownership section names the parent and hard dependencies — the wait is on those, not on missing detail here.

    Priority: priority/normal retained — matches the work's urgency as evidenced on the issue; no band change in this pass.

  15. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 P3.1 reparenting — Felix lane 0640-WO, 2026-11-30 (Refs #17071). This issue's native parent #9134 is closed and has no parent or named successor epic of its own, so under the P0–P3 playbook's destination rule (successor epic or top-level) it is detached to top-level via the GraphQL removeSubIssue mutation. Verified post-move: parent is null. No state, labels, or priority band changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/atlaseffort/mepic/atlas-programkind/enhancementprimary-parent/atlas-programpriority/normalqueue/blockedstatus/blockedstray-workwork/assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions