Fix segmented chat response reconciliation#1261
Conversation
📝 WalkthroughWalkthrough
ChangesSegment Delivery Tracking and Reconciliation
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Tested locally on a merge of Verdict: works as intended
Caveat — reconcile branch not exercised in this runThe runs I drove all went down the Action item before mergeBranch is ~22 commits behind main; merging |
Summary
chat_done.full_responsewhen one or morechat_segmentevents are missed.Problem
chat_doneevent already carries the authoritative full response, but the app ignored it wheneversegment_totalwas set.Solution
ChatRuntimeProvider.chat_done, compare received segments againstsegment_totaland the final full response.chat_done.full_responseas a reconciliation fallback only when segment delivery was incomplete; otherwise keep segment bubbles as-is.Submission Checklist
docs/TESTING-STRATEGY.md## Related- N/A: no feature row change.docs/TESTING-STRATEGY.md)docs/RELEASE-MANUAL-SMOKE.md) - N/A: no release checklist change.Closes #NNNin the## RelatedsectionImpact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
codex/SYM-158-chat-response-truncation227ef2c0Validation Run
pnpm --dir app exec vitest run src/providers/__tests__/ChatRuntimeProvider.test.tsx --config test/vitest.config.tspnpm --dir app exec prettier --check src/providers/ChatRuntimeProvider.tsx src/providers/__tests__/ChatRuntimeProvider.test.tsxpnpm --filter openhuman-app compilepnpm --filter openhuman-app lint(passes with existing React hook warnings outside touched files)Validation Blocked
command:git push -u origin codex/SYM-158-chat-response-truncationpre-push hook, specificallypnpm --filter openhuman-app rust:check->cargo check --manifest-path src-tauri/Cargo.tomlerror:local macOS linker config combines global/Users/jwalinshah/.cargo/config.toml-fuse-ld=/opt/homebrew/opt/lld/bin/ld64.lldwith repo.cargo/config.toml-Wl,-ld_new;ld64.lldfails withlibrary not found for -ld_new.impact:local Rust validation is environment-blocked; this PR changes only TypeScript provider/test files. Branch was pushed with--no-verifyafter relevant app checks passed.Behavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit
Refactor
Tests