fix: make research chat and PDF use one canonical report - #178
Merged
Conversation
Publish validated research Markdown directly from the durable tool step. Skip model narration and summary turns so chat and PDF content remain identical.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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
research_deepandresearch_fanoutcalls as terminal response producers, so no second model turn can summarize or rewrite the report.Why
Production QA for PR #177 proved that the PDF was complete and valid, but the outer agent ignored its prompt and posted a 1,386-character summary instead of the canonical report. Prompt-only enforcement cannot guarantee content identity. This moves ownership to the durable runtime boundary.
Architecture
The research tool continues to return
{ artifact, report }, withreportalready validated against collected citation provenance. The Workflow projects that strict output into both destinations:artifactbecomes the durable deliverable part.reportbecomes the assistant text part.Both parts share the deterministic
tool:<model-step>:<tool-index>publication receipt, so Workflow replay cannot duplicate either one.Decisions Made
Edge Cases Handled
How to Review
agent-run-research-response-support.tsfor terminal-tool classification and strict output projection.agent-run-workflow.tsfor suppression, atomic report publication, and terminal completion.Verification
pnpm lintpnpm typecheckpnpm turbo build --forcepnpm deadcodepnpm architecture:checkpnpm turbo skills:build