Skip to content

Mobile chat: deterministic streaming replay test harness #100196

Description

@steipete

Problem

The chat pipelines on both platforms contain the most bug-prone logic in the apps — streaming deltas, optimistic/provisional messages, durable history reconciliation, duplicate/out-of-order events — and none of it can be exercised deterministically today. Regressions in this area are found by hand on device.

Proposal

Add a deterministic, test-only replay harness per platform:

  • Scripted gateway event sequences (streaming chunks, run completion, durable message arrival, duplicates, gaps, reconnect-mid-run) as fixtures.
  • Tests drive the real chat view-model/controller with the scripted stream and assert the final transcript converges losslessly (no dropped, duplicated, or reordered content) and that intermediate UI state (pending runs, streaming text) behaves.
  • Fixtures cover every markdown block shape so streaming rendering changes are also regression-guarded.

No production behavior change; iOS target is OpenClawChatViewModel, Android target is ChatController.

Impact

Streaming/reconciliation fixes stop regressing silently; future rendering and resume work lands against an executable spec.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.app: androidApp: androidapp: iosApp: iosclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.enhancementNew feature or requestimpact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.no-staleExclude from stale automation

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions