Conversation
|
Read it. The shape is right and the care shows in the places that usually get missed. Things I specifically checked and liked:
Two things. 1. The description contradicts the record and the code. The PR says the fix "deliberately fails honestly at the exhausted boundary rather than requesting a retry with no remaining budget", while 0042 says "the route permits exactly one additional physical request" and 2. The fix has not met the endpoint that caused it. #844 came out of a 30-question real-model evaluation, and your validation is explicit that these are deterministic scripted-upstream regressions rather than a rerun of it. That is the honest disclosure and I would rather have it than a vague claim — but it does leave the end-to-end rate unknown, and this endpoint has a history of ignoring what it is told. Rerunning that evaluation against the patched build, and reporting how many of the thirty now finalize cleanly, is what would close it. Not a blocker for merging a guard that is strictly better than publishing markup as an answer; worth doing before anyone concludes the problem is gone. CI is still running the backend and migrations jobs. |
|
Thanks for the review. I’m pausing further guard changes while I investigate why DSML is entering the response body in the first place. Relying only on interception rules is not a good long-term solution. The full real-model rerun you suggested was useful: 29 of the 30 questions finalized cleanly, but one response put narration before a bare DSML block and bypassed the initial guard. That reinforces the need to understand the underlying failure rather than keep expanding detection patterns. I’m now focusing on the raw final-turn request and response, including the tool-history format, endpoint behavior, and adapter handling, to identify where the protocol text enters ordinary content. I’ll report the findings before proposing further changes. The PR description has also been corrected to distinguish the unchanged logical tool-runner budget from the one additional tool-free recovery request. |
|
Both points from my earlier review are answered, and the second one better than I asked. You reran the 30 questions against the real endpoint with the original gold (88 fact slots), unchanged corpus and configuration, gold withheld from the answering model, across three implementation variants. That is the thing that was missing, and finding that six H responses carried DSML in The validation report is in the wrong place, though.
There is a sharper reason than the convention. The report's version table cites What I would do instead:
If some of it really is decision material rather than evidence — the choice of P2 over H and P looks like it might be — then it wants its own number, which is 0052 now that 0049, 0050 and 0051 are taken by #839, #840 and #841, plus a row in both index tables. Separately, this PR is one of five appending a step to |
02e6aa3 to
24fb77b
Compare
|
Completed the requested placement cleanup. The second The full historical comparison tables and branch-specific SHAs have moved into this PR description, explicitly separated from the maintenance revalidation. No new ADR number was introduced. The evidence-only handoff implementation and all test files are unchanged; this pass only changes documentation and the shared CI step. Rebased onto |
24fb77b to
1b33fd8
Compare
|
Rebased and pushed as For integration with #858, the two pending DSML table rows now exercise the existing six-tool-turn finalization boundary, rather than stopping after one tool turn. The narration fixture puts the DSML marker on a following bare control line. This is a test-only adjustment to the frozen boundary, not an expansion of early-answer or inline-marker policy. Both terminal tests remain, and all four table rows executed without pending skips. The updated description records the complete Linux validation and exact executed-test coverage checks; the real-model run tables remain explicitly historical. |
Signed-off-by: dada-yan <BinjunYann@gmail.com>
…tools Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
…egressions Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
Signed-off-by: dada-yan <BinjunYann@gmail.com>
1b33fd8 to
b464638
Compare
|
Completed the post-merge rebase onto Combined Linux tree The description now records this head and validation scope. No runtime-policy expansion or new model evaluation is included. |
Post-merge synchronization (2026-09-22)
Rebased onto
dev@7cfeedfeb11c3a1c42d5091c5941a51afaaeb161after #848, #851, #849, #850 and #852 merged. Current head:b4646386be142d2e502c6e88eaf01e9817f497ec.Retained the four merged regression modules in rustfmt order: fallback, persistence, registry, sources. Both terminal and stream test modules remain. The evidence-only handoff runtime and the #858 fixture adjustments from the previous head are unchanged. The unified PostgreSQL Chat CI step and ADR placement remain as agreed.
Validation on combined tree
d06f4ad0199a382635a6bbf94210b9421cbeba66(675 tracked Linux inputs hash-matched):Earlier evidence below refers to its stated historical heads.
When a tool run exhausts its gathering budget, withdrawing tool definitions can still leave the model emitting DSML in ordinary response content. The original real endpoint did this even with explicit
tool_choice: none.This change hands off before the old seventh provider request: the six-turn gathering loop stops through Rig's completion hook, then one dedicated answer call receives the completed evidence as untrusted JSON. It has no tool definitions, protocol-role history, or gathering preamble. Ordinary early answers and the existing empty-reply retry keep their short paths.
The answer call preserves tool-result identities, bytes and failure status, conversation context, current source IDs and temporal/plan distinctions. Prior citation IDs stay in a separate namespace. Invalid candidates may receive one tool-free format repair, with unchanged evidence and no rejected text. Both attempts share a 120-second deadline; input and answer text are bounded at 1 MiB. Auth, billing, rate, transport, content-filter and storage failures do not grant a retry. The buffered answer is published only after the assistant save succeeds.
Without the pre-existing gathering compatibility retries, this is at most 6 gathering + 1 answer + 1 optional repair. DSML remains a publication guard and is never executed as a tool.
Historical validation before the maintenance rebase, on the hash-checked, formatted tree
eafd85f(real-model runtime0ce696f; the original head 02e6aa3 changed documentation only):delta.content; replay through the actual parser reproduced that content exactly.Detailed historical run evidence is recorded below, separately from the maintenance revalidation.
Closes #844.
Historical real-model validation (before maintenance/rebase)
The following run identifiers are historical branch snapshots, not the rebased head. No real-model rerun is implied by the documentation and CI cleanup.
Tested versions
86f7ba547ebc0ba40860d13b2bfd09962dac0181560f0b752d100538a2f72aacc713061f9e58c5399114f9c7b67133565870c10af84628e7e557be50544531e0ce696f9238462d98695ef241741fa63da6b50704d7e8bc6cc06e281e771b151091376b497b2319fP2 is the selected implementation. The dev branch includes upstream
ea0557ba466979449a93b7060ca42a2cf46e2b96; the release backport keeps stable main'smigration set. This change introduces no migration. Subsequent documentation-only commits
must not be confused with a new real-model run.
Tests ran on an isolated Linux copy, with the original 30 questions and existing gold
(88 required fact slots), unchanged corpus and model configuration. Gold was never provided
to the answering model. The configured upstream was
api.deepseek.com; both request andresponse used the name
deepseek-flash. The provider's internal model revision is unknown.A capture proxy forwarded requests and upstream SSE without retaining authorization headers.
Raw business evidence, credentials and model answers are deliberately not committed here.
First failing boundary
Six H responses already contained DSML in upstream
choices[].delta.content, with nostructured tool calls and a
stopfinish. Replaying those six raw responses through theactual
utopia-llmparser produced exactly the same content, zero tool calls and the originalfinish reason. The adapter did not turn a valid tool call into prose in these samples.
Withdrawing tool definitions while retaining protocol-role tool history is insufficient for
this endpoint. This identifies an application-side trigger and the upstream-content boundary;
it does not establish the provider's internal reason for generating that text.
Fixed-evidence ablation
Three captured failures, three repeats each. W0 uses the captured original final request;
W1 adds the original tools and explicit
tool_choice: none; W2 uses H's captured recovery;W3 keeps W2's evidence data but substitutes the dedicated answer system. W3c appends the
focused-answer instruction now used by P2. Assertions checked that every original tool
result remained in the evidence payload. No new retrieval or gold was added.
All returned HTTP 200. W0/W1's shorter times include fast invalid outputs. W2 and W3's zero
failures do not establish a reliability difference. Cache hits and stochastic generation
also differ; latency is not a controlled estimate of prompt-only cost.
Fresh end-to-end runs
Each column is a new run of all 30 questions. It is not the fixed-evidence experiment above.
The historical 29/30 result belongs to an older PR head (
58d67dd/ release341044f),not H. The previously paused partial run is not counted as a completed evaluation.
The existing compatibility retry received
Thinking mode does not support this tool_choiceon the first gathering request in each conversation. Those 30 physical requests are counted,
not hidden behind the logical budget. P2 made 27 dedicated answer calls, with no candidate
repair; three conversations answered before the boundary. H made 27 old boundary calls and
six recovery calls; three answered early. Tool counts differ because retrieval was fresh.
Core facts were checked against the original gold and the actual evidence returned in each
run, including numbers, units and plan/report/verified distinctions. Core-slot completeness
and resolvable citation numbers are not a claim that every additional sentence is correct.
Separate factual/attribution findings are tracked privately, outside this DSML change.
One H answer used full-width citation brackets that the existing frontend does not recognize;
this PR does not change citation parsing.
The reason to select P2 is the provider-before-I/O answer handoff: it avoids sending a known
failure-prone final request and retains all required evidence, without more tool execution.
It is not a latency improvement over H: median latency is 2.85 seconds higher and reported
completion tokens increase. P2 reduces the initial P prototype's excess output and latency.
No dollar-cost claim is made from token counts. One frozen set is not a universal guarantee.
Deterministic and combined checks
On the formatted dev tree
eafd85f(the same runtime implementation as0ce696f),with real PostgreSQL fixtures and PDF extraction enabled:
cargo fmt --all --check, strict workspace/all-target clippy, locked workspace build: pass.cargo test --locked --workspace: 997 passed, 0 failed, 1 ignored. The ignored test isthe pre-existing live public-HTTPS RSS acceptance test requiring httpbingo.org.
its release image starts against migration 69 and passes the original-admin login.
Representative production-path assertions:
budget_finalization_accepts_an_answer_and_protocol_explanations; outgoing request has two messages, no protocol roles/tools/routing preambleearly_retry_budget_and_no_evidence_short_path_remain_bounded, existing empty-reply regressionsparallel_tool_results_and_utf16_step_positions_survive_handoff(12 results)budget_finalization_refuses_structured_calls; bounded-recovery request/step countsfinalization_recovers_once_from_existing_evidence_without_tools,unsuccessful_recovery_never_loops_or_reopens_toolsgathering_errors_cannot_spoof_the_private_handoffevidence_and_citations_are_data_not_protocol_messages,prior_citations_are_separate_and_failed_unknown_results_are_not_absence,failed_tool_observation_is_not_reported_as_empty_knowledgethe_total_deadline_covers_candidate_repairutopia-llmbytewise/unfinished-stream/finish-reason tests and adapter testssave_failure_is_an_error_without_publishing_the_buffered_answer_or_retryinguses an actual PostgreSQL trigger failureFive mutations were actually executed in an isolated copy at
9114f9c, each compiling andthen failing a runtime assertion (not merely failing compilation): restore the old seventh
request; add the routing preamble back; drop the last evidence result; permit a third answer;
ignore assistant persistence failure. Restoring the source passed the targeted suite.
The final focused-policy and early-budget changes subsequently passed the full checks above.
All 506 tracked build-input files were hash-compared with that checked Linux tree.
Reproduction and privacy
The private archive retains per-run questions, source/gold review, outgoing JSON, upstream
SSE and chunk offsets, parsed-turn comparison, delivered SSE, persisted records, usage,
image identities and mutation logs. The corpus hash was identical between staging and
production before/after the runs. Runtime account/model configuration was unchanged except
for the isolated capture proxy URL. This report publishes aggregate findings only.