fix(gateway): keep websocket steering additive and persist committed streamed output#5161
fix(gateway): keep websocket steering additive and persist committed streamed output#5161casualjim wants to merge 1 commit into
Conversation
f2c6245 to
4daa05b
Compare
Keep websocket steering additive so accepted follow-up messages extend an active turn without discarding committed streamed output. Persist accepted user messages as separate transcript entries, surface queue admission errors explicitly, and key response caching on the full provider-visible transcript to avoid cross-turn collisions.
4daa05b to
83e6c11
Compare
|
Quick status note: this PR is currently dirty against |
|
Thanks for the detailed work here. I’m going to close this PR because the branch is dirty against current I filed #6661 to preserve the useful behavior from this branch: websocket steering should stay additive and should not lose already-streamed committed output or corrupt transcript persistence. If you want to revisit it, a fresh focused PR against the current crate layout, with the steering/transcript tests from this branch carried forward, would be the right next step. |
Summary
Describe this PR in 2-5 bullets:
masterfor all contributions):masterturn_streamed_with_steering_state) that:messageframes through a shared validation/enqueue path,chunk_resetbehavior reintroduced.Label Snapshot (required)
risk: low|medium|high):risk: high(touchessrc/gateway/**)size: XS|S|M|L|XL, auto-managed/read-only): auto-managed (expected:size: L)core|agent|channel|config|cron|daemon|doctor|gateway|health|heartbeat|integration|memory|observability|onboard|provider|runtime|security|service|skillforge|skills|tool|tunnel|docs|dependencies|ci|tests|scripts|dev, comma-separated):agent,gateway,tests,memory<module>: <component>, for examplechannel: telegram,provider: kimi,tool: shell):gateway: websocket,agent: streamingtrusted contributor|experienced contributor|principal contributor|distinguished contributor, auto-managed/read-only; author merged PRs >=5/10/20/50): auto-managedChange Metadata
bug|feature|refactor|docs|security|chore):bugruntime|provider|channel|memory|security|ci|docs|multi):multi(agent + gateway)Linked Issue
Supersede Attribution (required when
Supersedes #is used)#<pr> by @<author>, one per line): N/ACo-authored-bytrailers added for materially incorporated contributors? (Yes/No): N/ANo, explain why (for example: inspiration-only, no direct code/design carry-over): N/A\n): (Pass/Fail): N/AValidation Evidence (required)
Commands and result summary:
cargo fmt --all -- --check cargo clippy --all-targets -- -D warnings cargo testsrc/gateway/ws.rsand agent cache/streaming tests insrc/agent/agent.rspass incargo test../dev/ci.sh allwas not used here due local Docker credential helper setup; equivalent Rust validation commands were run directly.Security Impact (required)
Yes/No):NoYes/No):No(existing provider calls only)Yes/No):NoYes/No):NoYes, describe risk and mitigation: N/APrivacy and Data Hygiene (required)
pass|needs-follow-up):passCompatibility / Migration
Yes/No):YesYes/No):NoYes/No):Noi18n Follow-Through (required when docs or user-facing wording changes)
Yes/No):NoYes, locale navigation parity updated inREADME*,docs/README*, anddocs/SUMMARY.mdfor supported locales (en,zh-CN,ja,ru,fr,vi)? (Yes/No)Yes, localized runtime-contract docs updated where equivalents exist (minimum forfr/vi:commands-reference,config-reference,troubleshooting)? (Yes/No/N.A.)Yes, Vietnamese canonical docs underdocs/i18n/vi/**synced and compatibility shims underdocs/*.vi.mdvalidated? (Yes/No/N.A.)No/N.A., link follow-up issue/PR and explain scope decision: N/AHuman Verification (required)
What was personally validated beyond CI:
messagepath equals later-frame acceptance path.chunk_resetin steering flow.Side Effects / Blast Radius (required)
STEERING_QUEUE_FULL,SESSION_QUEUE_FULL,SESSION_QUEUE_TIMEOUT) and existing event broadcast logs (agent_start,agent_end,error).Agent Collaboration Notes (recommended)
AGENTS.md+CONTRIBUTING.md):YesRollback Plan (required)
git revert <commit>), redeploy.Risks and Mitigations
List real risks in this PR (or write
None).