Skip to content

fix(dag): resolve DAG prompt and output duplication - #390

Merged
LeXwDeX merged 7 commits into
devfrom
fix/386-end-structured-output
Aug 20, 2026
Merged

fix(dag): resolve DAG prompt and output duplication#390
LeXwDeX merged 7 commits into
devfrom
fix/386-end-structured-output

Conversation

@LeXwDeX

@LeXwDeXLeXwDeX commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Closes#386
Closes#387
Closes#388

Gates

  • packages/opencode bun test test/dag:608 pass / 0 fail(53 files)
  • packages/opencode bun typecheck(tsgo --noEmit)通过
  • root lint 4845 warnings / max 4850,0 errors

已知取舍

#386 为提示词契约软修复(用户决策):模型依从率 <100%,未接线 StructuredOutput/toolChoice 通道,未改持久化协议。

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
LeXwDeX marked this pull request as ready for review August 20, 2026 09:10
@LeXwDeX
LeXwDeX merged commit eee0972 into devAug 20, 2026
9 of 10 checks passed
@LeXwDeX
LeXwDeX deleted the fix/386-end-structured-output branch August 20, 2026 09:11
Sign up for freeto 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.

1 participant

@LeXwDeX