Skip to content

fix: preserve cache errors and recover at capacity - #2249

Open
utpalsinghdev wants to merge 1 commit into
UsefulSoftwareCo:v2from
utpalsinghdev:utpalsinghdev/issue-2229-cache-capacity
Open

utpalsinghdev wants to merge 1 commit into
UsefulSoftwareCo:v2from
utpalsinghdev:utpalsinghdev/issue-2229-cache-capacity

Conversation

@utpalsinghdev

@utpalsinghdev utpalsinghdev commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #2229.

Cache errors now include their safe reason, and reads preserve the reason and limit returned by the host.

When the cache reaches its byte or entry limit, writes reclaim the oldest unleased values within the same transaction. Live loaders and values written by the current command are protected. If no safe eviction can make room, the write rolls back without changing existing values or publication fences.

Catalog reads recover when eviction removes parts referenced by a retained manifest. Storage and decoding errors remain errors rather than triggering rediscovery.

This update preserves current v2 limit diagnostics, retention clamping and combined catalog reads. Optional tool-name metadata is omitted if it would push the complete manifest over the entry limit. The apps version moves from 0.0.1-beta.79 to 0.0.1-beta.80.

Verification

Rebased onto v2 at edc9e5dc1301e251b168bdaca909cb27ec7d696a.

  • Focused self-host tests: 25 passed, three filtered cases not executed.
  • Coverage includes byte and entry pressure, cross-build eviction, live-loader rollback, partial catalog recovery, warm account-isolated reads and the oversized-manifest names fallback.
  • Formatting, static checks, E2E registration, asset preparation, release checks, site build and links passed.
  • Native Go tests passed: go test ./... in apps/hosted/self-host/native (ok executor.sh/self-host).
  • Production Worker-size checks passed, with 16,651 bytes of API headroom, 0.3%.

Attached Cloud entry-count/cross-build checks were not run here. They need Cloudflare Artifacts credentials that this machine does not have.

app-cache-capacity.spec.ts
app-cache-limits.spec.ts
app-cache-evaluation.spec.ts
app-cache.spec.ts
app-cache-fences.spec.ts
app-cache-accounts.spec.ts
app-cache-stalled-loader.spec.ts
mcp-catalog.spec.ts
graphql-cache.spec.ts
cached-skills.spec.ts
provider-errors.spec.ts

@utpalsinghdev
utpalsinghdev marked this pull request as ready for review October 9, 2026 23:03
Preserve limit diagnostics, retention clamping and combined catalog reads.
Retain transactional eviction and lease-safe rollback.
Bound optional catalog metadata by the complete manifest size.
@utpalsinghdev
utpalsinghdev force-pushed the utpalsinghdev/issue-2229-cache-capacity branch from c2be054 to 2ef7161 Compare October 11, 2026 01:19

This branch has not been deployed

No deployments
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