The slow-backend regressions start real NodeRuntime subprocesses, but vi.waitFor silently imposed a one-second deadline on normal scheduling and tool execution. Under concurrent Linux and Windows coverage this rejected valid runs before the tested spill or dispatch stage was reached. Resolve promises at the actual save-entry and dispatch-start observations, and fail immediately if the run completes before those observations. Queue all three requests up front in the bounded-backlog case so a missing third start tests backpressure rather than child request timing. Cleanup releases both queued and future spill gates and awaits execution completion. Keep the existing outer test deadlines, product limits, result assertions, and ordering checks. A temporary 1.2-second tool delay reproduces both old failures and passes with these tests; temporarily removing the actual backpressure wait still fails the third-dispatch assertion. No experiment or product-code change is included. Fixes #4585
description, kind
| description | kind |
|---|---|
| Package map for the text spill capability family: what the storage service, the local backend, and the result policy each provide. | package-group |
spill/ — text spill capability family
English | 中文
Summary
The spill/ group stores full text outside the model's context and returns a locator with retrieval guidance. The family splits into the storage service in spill/, the local filesystem backend in spill-local/, and the tool-result policy in spill-policy/. Tool-result spilling is opt-in through maxInlineBytes and keeps the original result on storage failure. Session references also consume storage directly for truncated captured transcripts, with their own preview and failure notices; they do not require the tool-result policy.
Table of Contents
Packages
Three packages play the spill roles; the subsystem reference owns the exhaustive vocabulary and contracts.
| Package | Role | ctx key |
|---|---|---|
spill/ |
Storage service: saves oversized text and returns a locator plus retrieval guidance | ctx.spillStore |
spill-local/ |
Saves spilled text to private session-scoped files on this machine | registers on ctx.spillStore |
spill-policy/ |
Replaces oversized plain-text tool results with a preview and locator | listens on ctx.tools |
Related documentation
Start with the subsystem reference for the shared vocabulary, then the design decision.
- Spill subsystem — the
SaveTextSpill/SpillRefvocabulary, ownership, and backend relationships. - Tool output spill decision — the capability boundary between storage, retention, and tool-owned output handling.
Dev Note
Working context for maintainers — click to expand
None.