Skip to content

Bound the result stash per runtime, page by byte range, and partition results by identity - #546

Merged
zackbart merged 1 commit into
mainfrom
fix/followup-results
Sep 16, 2026
Merged

zackbart merged 1 commit into
mainfrom
fix/followup-results

Conversation

@zackbart

Copy link
Copy Markdown
Owner

Closes #538, #540, #541. Also item 2 of #543.

  • Stash quota. results.maxStashBytes (default 8 MiB) and results.maxStashEntries (default 64) bound the get_result stash per runtime. Accounting is shared across subjects, reserves capacity before concurrent writes finish, keeps a failed write charged until its backing entry is deleted, and reclaims expired entries before reuse. A refused stash returns the preview plus the paging-unavailable notice; the call stays successful.
  • Byte-range paging. Stashed results are stored as a byte-addressable envelope, so a page decodes only its own range plus UTF-8 lookaround. Legacy raw entries still page until their TTL expires.
  • Identity partition. The stash partition derives from any authenticated subject (or principal) regardless of activityActorNamespace; open deployments share one partition, and the docs say so.
  • The memory store reclaims expired entries with bounded rotating work on set.
  • authorize_connector already honored tool-level grants (a docs.read grant may start the docs handoff; no grant means "Unknown connector"). Documented and pinned; the 0.24.2 surface list now includes connecta.describe.

Full npm run check passes on this branch.

🤖 Generated with Claude Code

… results by identity

ConnectaConfig.results bounds the get_result stash at 8 MiB and 64 entries
per runtime by default, with shared accounting that reserves capacity before
concurrent writes and reclaims expired backing entries; a refused stash keeps
the call successful with its preview and a paging-unavailable notice. Stashed
results are stored as a byte-addressable envelope so get_result decodes only
the requested page instead of re-encoding the whole result per page. The
stash partition now derives from any authenticated subject or principal, not
only from providers that declare an activity namespace. The memory store
reclaims expired entries with bounded rotating work on set. authorize_connector
already honored tool-level grants; the rule is now documented and pinned
(#538, #540, #541, #543).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

Bound the get_result stash per deployment and sweep expired entries

1 participant