Skip to content

mcpx: Phase 2 of #1601 — cacheScope at the disk boundary: private never persists, expired seeds expired, stale on refetch error #1603

Closed

Description

@dezren39

Phase 2 of design #1601 (mcpx client cache hints). Gated on Phase 1 (the pool deadline/scope plumbing). Design doc: files/designs/code-mcpx-client-cache-hints.md in the keep-the-four-repos-healthy goal workspace.

Scope

Make cacheScope real at the disk boundary and define stale behaviour on refresh failure.

  • Plumb the pool's catalogue scope/deadline through SetSchemas so the daemon registry can seed and save them.
  • internal/daemon/registry.go: SaveCache skips pools whose catalogue scope is private — a private catalogue is never written to the on-disk schema cache. Cache-file entries record deadline + scope; bump cacheVersion (older files are already ignored on mismatch).
  • loadCache: a public entry whose deadline has passed is seeded expired — the first Schemas() re-reads instead of serving a days-old catalogue as warm.
  • Pool: when an expired modern entry's refresh fails, Schemas() serves the stale entry and records the error; the entry stays expired so the next call retries. A failed first fetch is unchanged (error, timestamp unset — per RefreshSchemas' existing discipline).
  • Retire conformance gap caching-private-no-cross-auth (internal/conformance/coverage_stateful.go).

Evidence (main 33a4e67, 2026-10-28)

Acceptance

  • Test: a private-scoped catalogue is absent from the saved cache file; a public one is present with deadline + scope.
  • Test: a public entry past its deadline at load is re-read on first Schemas(), not served as fresh.
  • Test: expired entry + failing upstream → stale catalogue served, error recorded, next call retries the refresh.
  • Test: failed first fetch still errors and leaves the cache unset.
  • caching-private-no-cross-auth retired; pkgs/mcpx tests pass in CI.

Out of scope

Register truth-up and the list_changed verification test (Phase 3); background revalidation (declined on #1601 — synchronous refresh is the recorded decision).

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Picked up and parked by Lane B queue worker (queue task 1690, triage of #1603).

    Dependency gate unmet — re-checked fresh: Phase 1 #1602 is still OPEN (its own triage was filed 2026-10-28T05:37Z; no implementing PR exists), and on current main (63ba170) there is no cacheScope plumbing to build on: no cacheScope/CacheScope in internal/pool or internal/mcpclient, and Pool.SetSchemas (pool.go:892) still takes no scope/deadline — it is the pre-existing disk seed this phase would extend once Phase 1 lands.

    Per the packet, this triage does not re-scope around the gate. Resume condition: #1602's Phase 1 plumbing merged (ttlMs/cacheScope surfaced in mcpclient + pool catalogue expiry), then confirm the Phase 2 scope against the as-built plumbing and enqueue the implementation packet. Parking 1 hour.

  5. added
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  6. 123 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 28, 2026
  8. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  9. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions