fix(dag): resolve DAG prompt and output duplication - #390
Merged
Conversation
The output_schema instruction and the submit_result tool description now state the single-authority contract: the summary belongs inside the payload, message text must not duplicate it, and a successful submission ends the turn without restating the result. Previously nothing told the child not to narrate the report in prose before submitting, so the same content entered the child transcript twice and the post-submit replay step carried both copies (issue #386).
A block instruction equal to the workflow objective (after trim and line-ending normalization) rendered the same content twice in the single child prompt: once via the objective section and again via the Block-specific instruction section. The compiler now drops the instruction instead of duplicating it; genuinely block-specific instructions keep their place and ordering (issue #387).
The live completion path captures {content_ref, size, sha256, summary}
into captured_output when a schemaless node's final reply IS one
existing absolute file path. Recovery settled the same reply inline
without the capture, so the same completed child produced different
durable output metadata depending on crash timing. Recovery now reuses
captureOutputFileRef (plus the report-area gitignore guarantee) with the
same best-effort fallback: any anomaly keeps the plain inline
settlement and never fails the node (issue #388).- issue #386: drive the acceptance chain past prompt construction — replay the submit_result durable write and assert spawn's completion gate settles the node with the payload as durable output - issue #387: dedicated compiler cases for duplicate-drop and the objective-plus-detail superset (exact, not fuzzy, equivalence) - issue #388: live-path file-ref capture asserted in lockstep with the recovery receipt (identical durable effects side-by-side) - drop an unnecessary non-null assertion and an unused binding; disable unsafe-assertion lint in the recovery mock harness (4851 -> 4846 on the merge ref, under the 4850 ratchet)
- output-ref persistence failure completes inline (best-effort contract) - makeLastAssistantTextReader: last assistant text + missing-session tolerance, restoring the 95% recovery.ts coverage floor (93.88% -> 99.49%)
LeXwDeX
marked this pull request as ready for review
August 20, 2026 09:10
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
Closes#386
Closes#387
Closes#388
Gates
bun test test/dag:608 pass / 0 fail(53 files)bun typecheck(tsgo --noEmit)通过已知取舍
#386 为提示词契约软修复(用户决策):模型依从率 <100%,未接线 StructuredOutput/toolChoice 通道,未改持久化协议。