Skip to content

Restore truthful Web answer streaming on v1.11.4 - #1000

Draft
Y1fe1Zh0u wants to merge 2 commits into
v1.11.4from
agent/web-streaming-v1.11.4
Draft

Restore truthful Web answer streaming on v1.11.4#1000
Y1fe1Zh0u wants to merge 2 commits into
v1.11.4from
agent/web-streaming-v1.11.4

Conversation

@Y1fe1Zh0u

Copy link
Copy Markdown
Collaborator

Summary

  • connect existing provider streaming callbacks to the durable Runtime event projection
  • deliver ordered, attempt-aware Web Chat chunks while keeping terminal ChatMessage delivery authoritative
  • preserve retry/fallback isolation, textual Tool protocol privacy, reconnect cursors, cancellation state, and non-stream compatibility
  • enable Web streaming by default with AGENT_RUNTIME_WEB_STREAMING_ENABLED=false retained as rollback

Scope

Web Direct Chat only. This PR does not add Clawith native-group, Feishu CardKit, or WeCom streaming. No migration or new dependency.

Validation

  • Backend: 2557 passed
  • Frontend: 122 passed
  • Frontend production build passed
  • scoped Ruff passed
  • Architecture Guard P0 passed
  • git diff --check passed
  • 3010 canary: incremental UI and persisted assistant_delta events verified; two physical attempts reset correctly without concatenation; no browser console errors

Remaining live boundary

The canary Agent produced complete visible output but remained in verification/repair and its cancel command did not settle immediately. That is recorded as a separate Runtime terminal/cancellation issue, not counted as streaming completion proof.

Rollout risk

Enabled-path concurrency, database write load, and broader real-provider TTFT remain to be measured before broad production rollout.

Connect existing provider streaming callbacks to tenant-scoped, coalesced Runtime observations and the existing Web Chat chunk consumer. Attempt identity, ordered replay, protocol filtering, canonical terminal replacement, and a default-off rollout gate keep provisional output separate from execution and delivery truth.

Constraint: LangGraph checkpoint and delivered ChatMessage remain the only lifecycle and final-result authorities

Constraint: No new dependencies or database migration

Rejected: Write every token into checkpoint state | violates Runtime ownership and amplifies persistence cost

Rejected: Push provider callbacks directly to WebSocket | couples Worker progress to one process and client

Rejected: Retry or fail over after visible output | can splice incompatible provider attempts

Confidence: high

Scope-risk: moderate

Directive: Keep AGENT_RUNTIME_WEB_STREAMING_ENABLED disabled for fleet rollout until real-provider concurrency and database load are measured

Tested: Backend 2557 passed; focused 245 passed; frontend 122 passed; production build; scoped Ruff; Architecture Guard P0; git diff --check

Not-tested: Real provider TTFT, multi-worker crash canary, enabled-path load, 3010 deployment
Enable the reviewed Runtime streaming path by default while preserving AGENT_RUNTIME_WEB_STREAMING_ENABLED=false as an operational rollback.

Constraint: User explicitly selected default-on behavior and approved backporting the validated change to v1.11.4

Confidence: high

Scope-risk: moderate

Directive: Keep the false override available until broader real-provider concurrency and database load are validated

Tested: Backend 2557 passed; frontend 122 passed; production build; scoped Ruff; Architecture Guard P0; git diff --check

Not-tested: Additional v1.11.4 deployment beyond the existing 3010 canary
Sign up for free to 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