Repository navigation
fix: do not store a store=false continuation of a stored response - #387
Merged
franciscojavierarceo merged 2 commits intoSep 27, 2026
Conversation
The no-session executor path persisted every request that carried a
previous_response_id, so a store=false continuation of a stored response
was written durably as a row without a snapshot. Its id then resolved as
previous_response_id and GET /v1/responses/{id} answered 409 instead of
404, although ADR-02, TERMINOLOGY and the README state that store=false
disables storage. PR vllm-project#257 made session continuations honor store and
left the HTTP path unchanged (vllm-project#238).
store now governs the no-session path: the child is still hydrated from
the stored parent but leaves no row, so it can be neither retrieved nor
continued. Session continuations still reach the handler, which keeps
store=false checkpoints connection-local, and explicit conversations
stay durable.
The existing regression test passed for the wrong reason: its third
continuation failed because the mock queue was empty, not because the
child was unstored. It now queues a third reply, asserts the not-found
error and the upstream request count, and continues the stored parent as
a control. A new HTTP test covers retrieval and continuation of the
unstored child through the gateway.
Signed-off-by: Chuyue Wang <[email protected]>
StevenWang-CY
requested review from
bbrowning,
franciscojavierarceo,
haoshan98,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
September 27, 2026 13:34
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The public persist_response path can still persist a no-session store: false continuation.
Review effort: Lite
Findings: 1
What changed in this PR
Fixes HTTP store: false continuations so they hydrate stored history without creating durable response rows. A critical consistency issue remains in the public persist_response path.
Changes:
- Updates persistence gating.
- Adds core and HTTP regression coverage.
- Documents the storage contract.
| File | Summary |
|---|---|
docs/api/index.md |
Documents unstored continuation behavior. |
crates/agentic-server/tests/response_retrieval_test.rs |
Tests HTTP retrieval and continuation failures. |
crates/agentic-server-core/tests/stateful_responses_integration.rs |
Verifies hydration without persistence. |
crates/agentic-server-core/src/executor/persist.rs |
Updates persistence eligibility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
persist_response and persist_turn are the composable persist step of ADR-03 and are re-exported for consumers that assemble the executor steps themselves. Both wrote unconditionally, so a no-session store=false context still produced a durable row through them while execute and commit refused it. Both steps now return early when should_persist is false. Session contexts still reach their handler, which keeps store=false checkpoints connection-local, so WebSocket generate=false prewarm is unchanged. The new test drives rehydrate_conversation, persist_response and persist_turn directly for a store=false and a store=true continuation and checks whether the produced id resolves as previous_response_id. Signed-off-by: Chuyue Wang <[email protected]>
Contributor
Author
|
@franciscojavierarceo when you have a moment, could you take a look? CI is green and the Copilot finding is addressed in 6dca512. |
franciscojavierarceo
approved these changes
Sep 27, 2026
haoshan98
added a commit
that referenced
this pull request
Sep 30, 2026
## Summary Several user-facing docs had fallen behind `main` or contradicted each other and the code. This PR brings them in line with what has shipped. It changes documentation only. **Corrected claims** - README listed the Messages API as "🚧 Planned" while another README section documents `/v1/messages`. It is now listed as shipped; only stateful Messages stays planned. - README and `docs/index.md` advertised "Background execution" and gateway-executed file search. Neither exists yet: background mode is #357, and `file_search` declarations parse but are dropped before inference (`tool/normalize.rs`). Both claims are removed. - `docs/api/index.md` quoted fixed WebSocket and executor limits (256 KiB SSE lines, 1 MiB events and response budget). These now come from the configurable `[responses]` settings, which default to 16 MiB and 8 MiB. - `docs/api/index.md` listed only some of the conditions that route a Responses request through the executor. The list now also includes non-function tools, `multi_agent.enabled`, and tool-search state, matching `handler/http/responses.rs`. - CHANGELOG listed Tavily under 0.8.0, but it merged on Sep 28, after the Sep 19 release. The two Tavily entries move to `[Unreleased]`. **Newly documented features** - README: a multi-agent Responses section with an example and the gateway's limits (`store: true`, HTTP/SSE only, default of 3 concurrent subagents, no `max_tool_calls` or reasoning summaries). Also new rows in the API table for `/v1/responses/compact`, the full Conversations routes, `/v1/messages` with `/v1/messages/count_tokens`, and Swagger/OpenAPI (`ENABLE_OPENAPI_DOCS`). The features list, diagram, and tool ownership table now include MCP, the code interpreter, Claude Code, compaction, and OpenTelemetry. - `docs/api/index.md`: new sections for `GET /v1/responses/{response_id}`, multi-agent, Conversations, and Messages. - CHANGELOG `[Unreleased]` was empty. It now has entries for #345, #347, #349, #351/#370, #354, #368, #369, #372/#373, #380, and #387. **Roadmap** - ROADMAP.md marks multi-agent HTTP execution as shipped, with WebSocket injection (#300) and stateless requests (#393) still open. It adds a status note for Messages, a code interpreter entry, and a file search item linking #34 and #356. - README "Roadmap at a Glance" checks off Messages and Conversations and adds unchecked items for multi-agent, file search, and stateful Messages. **Smaller fixes** - The repository layout in README and AGENTS.md now lists `agentic-llm-d`, `agentic-cli-docs`, and `python/agentic_api/`. - ARCHITECTURE.md's list of multi-agent rejections now includes `max_tool_calls`, matching `executor/rehydrate.rs`. - `mkdocs.yaml` adds the existing but unlinked `design/shell-tool.md` to the nav. **Not changed:** the README's "Rust 1.85+" badge is wrong (1.85 cannot build the lockfile, see #377), but #379 already updates it to 1.88 along with `rust-version` and a CI check, so this PR leaves it alone to avoid a conflict. Signed-off-by: haoshan98 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
should_persistinexecutor/persist.rstreatedprevious_response_idas a reason to write. On the no-session HTTP path astore: falserequest that continued a stored response was therefore persisted durably as a row without a snapshot. The id it returned resolved asprevious_response_idon the next request, andGET /v1/responses/{id}answered409 no retrievable payloadinstead of404. ADR-02,TERMINOLOGY.mdand the README all state thatstore: falsedisables durable response storage, and the guarding test is named..._hydrates_but_does_not_persist. #257 fixed the same contract for WebSocket sessions and explicitly left the no-session HTTP policy unchanged, so this is the HTTP half of #238.The fix drops the
previous_response_idterm, sostoregoverns the no-session path. The child is still hydrated from the stored parent and answers normally; it just leaves no row, so its id can be neither retrieved nor continued, which is the OpenAI behavior forstore: false. Nothing else changes:continuation.is_some(), which keepsstore: falsecheckpoints connection-local (fix: honor WebSocket response storage with bounded sessions #257).conversation_idrequests stay durable.generate: falseprewarm callspersist_turndirectly and never consulted this predicate.persist_if_needed, shared by the JSON, SSE and split-executioncommitpaths, and the publicpersist_response/persist_turnsteps of ADR-03, so a consumer composing the steps gets the same contract asexecute.docs/api/index.mdstates the contract next to the routing rule, andARCHITECTURE.mdnotes it on thepersist.rsentry.Test Plan
Red on unmodified
main(280f798), green with this change, with only the test files applied to a worktree atmainand the workspace crates rebuilt from that worktree:test_store_false_with_previous_response_id_hydrates_but_does_not_persistpassed onmainfor the wrong reason: the mock queue held two replies, so the third continuation failed from queue exhaustion, not from a missing response. It now queues a third reply, asserts the continuation fails with the storage not-found error before any inference runs, and continues the stored parent as a control that consumes that third reply. Onmainthe continuation succeeds.store_false_continuation_of_a_stored_response_is_not_retaineddrives the gateway over HTTP: a stored parent, astore: falsechild that the upstream request shows was hydrated from it, thenGETof the child and a continuation from it both answer404with no upstream call, while the parent is still retrieved byte-for-byte and continued. OnmaintheGETanswers409and the continuation succeeds.test_public_persist_steps_honor_the_storage_policydrivesrehydrate_conversation,persist_responseandpersist_turndirectly for astore: falseand astore: truecontinuation of a stored parent and checks whether each produced id resolves asprevious_response_id. Onmainbothstore: falseids resolve.agentic-serverbinary built from this commit, with a stdlib mock upstream and a SQLite file: the same sequence through the real HTTP stack ends with theresponsestable holding the parent and the stored sibling only, and both misses answer404 not_found.pre-commit run --all-files(includingrust-file-sizeswithRUST_FILE_SIZE_BASE=origin/main),cargo fmt -- --check,cargo clippy --all-targets -- -D warnings, andcargo test --no-fail-fastacross the workspace pass on the exact commit from a clean worktree.