feat(client): SEP-2549 — honor cacheHints (ttlMs/scope) on the response-cache substrate - #2340
Merged
Merged
Claude / Claude Code Review
completed
Jun 23, 2026 in 36m 2s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | docs/migration.md:578-595 |
New cache-honouring feature not documented in docs/client.md (only migration.md and the example README) |
| 🟡 Nit | packages/client/src/client/client.ts:1568-1575 |
Multi-page list aggregate honours only page 1 ttlMs/cacheScope (later pages stricter hints ignored; private page content |
Annotations
Check warning on line 595 in docs/migration.md
claude / Claude Code Review
New cache-honouring feature not documented in docs/client.md (only migration.md and the example README)
The new SEP-2549 cache-honouring behaviour (cache-served listTools()/readResource(), the per-call cacheMode option, and the new ClientOptions cachePartition/defaultCacheTtlMs) is documented here in migration.md and in examples/caching/README.md, but the canonical client feature guide docs/client.md was not updated — its Tools and Resources sections still describe these verbs as always reaching the server, with no mention of cache-serving or how to force a fetch. Consider adding a short 'Response
Check warning on line 1575 in packages/client/src/client/client.ts
claude / Claude Code Review
Multi-page list aggregate honours only page 1 ttlMs/cacheScope (later pages stricter hints ignored; private page contents can land in the shared public partition)
When _listAllPages aggregates a multi-page list, the terminal cache write computes freshness from this._freshness(acc) where acc is the page-1 result object, so ttlMs/cacheScope hints carried by pages 2..N are silently discarded. A later page's stricter hint is therefore ignored: a page-2 ttlMs: 0 ("do not cache") aggregate is served from cache for page-1's full TTL, and a page-2 cacheScope: 'private' is downgraded to page-1's 'public', storing the private-scoped page contents at the shared [ser
Loading