Skip to content

feat(android): coordinate realtime response and transcript state - #142297

Closed
roboclaw-bot wants to merge 4 commits into
openclaw/pr138726-split-m-mediafrom
openclaw/pr138726-split-s-state
Closed

roboclaw-bot wants to merge 4 commits into
openclaw/pr138726-split-m-mediafrom
openclaw/pr138726-split-s-state

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #138726 — Android realtime Talk.

What Problem This Solves

Realtime responses, tool results and transcript events can arrive out of order or after cancellation. The Android client needs deterministic ordering without duplicate responses or permanently blocked transcript writes.

Why This Change Was Made

Keep bounded response state, tool batching and transcript predecessor ordering together. These state owners do not allocate media or make Gateway requests.

User Impact

Provides the ordering guarantees used by the client layer; no standalone UI or configuration change.

Evidence

Source-only correction — September 10, 2026

Head: 884dc6c9c69d1c3cc4e9876f74327c60bd2ef916. The source-only I correction is propagated without changing the state production code. The composed K descendant cc1a6ce946aa3df418da6e3e12ddc73a563a52d5 passed all 3,059 Play app tests and all-module Kotlin lint. Earlier layer-specific test results retain their original source bindings.

  • Both Android flavor source sets compiled; 20 focused state tests passed per flavor for this layer.
  • Coverage includes pre-acknowledgement cancellation, duplicate/overlapping tool batches, predecessor ordering and bounded cleanup.

Historical validation source tree: commit 6d16dfa44a3669f6ce8e5c34eb007f446566ef15. The local evidence above has its stated scope.

Worked on by:

Retain response cancellation, tool-batch completion and ordered speech persistence state together with their bounded-identity regressions.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: L maintainer Maintainer-authored PR labels Sep 8, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 8, 2026 15:53
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 10:11 AM ET / 14:11 UTC (Revision 10).

ClawSweeper review

What this changes

Adds Android state helpers and tests for realtime response cancellation, tool-result batching, and ordered transcript completion.

Merge readiness

✅ Ready for maintainer review

Keep open as a useful prerequisite in the active Android realtime Talk stack. No actionable defect was found in the introduced helpers, and neither current main nor the latest release establishes that this work is superseded.

Priority: P2
Reviewed head: 884dc6c9c69d1c3cc4e9876f74327c60bd2ef916

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused state-layer contribution with meaningful event-order coverage and no supported blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This bot-authored internal-state PR is exempt from the external-contributor runtime-proof gate; its reported tests support state transitions, while production integration belongs to the linked client PR.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This bot-authored internal-state PR is exempt from the external-contributor runtime-proof gate; its reported tests support state transitions, while production integration belongs to the linked client PR.
Evidence reviewed 7 items Introduced state boundaries: The complete introduced patch adds only three internal state helpers and their tests. Response requests coalesce while creation, an active response, or tools remain pending; correlated rejection clears creation state; cancellation targets an exact response.
Focused behavioral coverage: Read all 20 introduced tests covering cancellation before acknowledgement, correlated errors, overlapping tool batches, duplicate suppression, bounded identities, predecessor ordering, capacity release, and synchronous cleanup. Tests were not executed during this read-only review.
Verified downstream integration: The open follow-up #142298 targets this head. Its client reserves transcript ancestry, releases completed writes, completes tool batches after sending results, and uses the response helper for creation and cancellation. This is integration context, not additional changes owned by this PR.
Findings None None.
Security None None.

How this fits together

These helpers accept response, tool, and transcript events and determine when responses may start and transcript writes may proceed. The linked client-lifecycle PR supplies their production integration.

flowchart TD
  A[Realtime events] --> B[Response state]
  C[Tool results] --> D[Tool batch tracking]
  D --> B
  B --> E[Create or cancel decision]
  A --> F[Transcript ordering]
  F --> G[Ordered write readiness]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +297, Other +203. Total +500 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 297 0 +297
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 203 0 +203
Total 6 500 0 +500

Review metrics

None.

Technical review

Best possible solution:

Keep response, batch, and transcript sequencing in these internal owners, with network dispatch and call retirement handled by the linked client lifecycle.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a current-main bug reproduction: this PR supplies a new client-state layer, and its event-order scenarios are covered by inspected tests rather than a reviewer-executed runtime failure.

Is this the best way to solve the issue?

Yes. Separating deterministic state transitions from media and Gateway I/O is a focused design, and the downstream client uses these helpers at the intended boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 878bc51433d4.

Labels

Label justifications:

  • P2: This is a bounded reliability prerequisite for Android realtime Talk without a demonstrated urgent regression in existing users' workflows.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This bot-authored internal-state PR is exempt from the external-contributor runtime-proof gate; its reported tests support state transitions, while production integration belongs to the linked client PR.

Evidence

What I checked:

  • Introduced state boundaries: The complete introduced patch adds only three internal state helpers and their tests. Response requests coalesce while creation, an active response, or tools remain pending; correlated rejection clears creation state; cancellation targets an exact response. (apps/android/app/src/main/java/ai/openclaw/app/voice/TalkRealtimeResponseState.kt:19, 884dc6c9c69d)
  • Focused behavioral coverage: Read all 20 introduced tests covering cancellation before acknowledgement, correlated errors, overlapping tool batches, duplicate suppression, bounded identities, predecessor ordering, capacity release, and synchronous cleanup. Tests were not executed during this read-only review. (apps/android/app/src/test/java/ai/openclaw/app/voice/TalkRealtimeTranscriptOrderTest.kt:16, 884dc6c9c69d)
  • Verified downstream integration: The open follow-up feat(android): retain realtime calls through cleanup #142298 targets this head. Its client reserves transcript ancestry, releases completed writes, completes tool batches after sending results, and uses the response helper for creation and cancellation. This is integration context, not additional changes owned by this PR. (apps/android/app/src/main/java/ai/openclaw/app/voice/TalkRealtimeClient.kt:531, 5a2b110d3d02)
  • Current-main and release boundary: Current main routes Android realtime Talk through startRealtimeRelay and explicitly requests gateway-relay. Tree inspection of current main and v2026.9.3 found none of the three proposed helpers; existing browser transcript ordering is a separate TypeScript implementation, not an Android replacement. (apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt:1129, 878bc51433d4)
  • Validation source identity and continuity: The captured body, source revision 4890df7e6e96a21856bb8dbd7dcc28a8a9610d688a22bc760ca0deaf9926d4d3, reports 20 focused tests per flavor and separately identifies historical and composed-descendant validation. Those claims are not treated as an exact-head live run. The preceding completed review covered the same head with no findings; comparison with the preceding parent also showed no state-helper changes. (884dc6c9c69d)
  • Current PR status: REST inspection confirms the pinned head remains open, assigned to IWhatsskill, and targets the media-layer branch. The protected maintainer label independently prevents cleanup closure. The live association is CONTRIBUTOR, differing from the supplied MEMBER field; bot authorship remains the applicable proof exemption. (884dc6c9c69d)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-08T16:52:45.057Z sha 16d6648 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-08T19:44:45.132Z sha 6d16dfa :: needs maintainer review before merge. :: none
  • reviewed 2026-09-08T20:28:03.866Z sha 6d16dfa :: needs maintainer review before merge. :: none
  • reviewed 2026-09-08T21:24:03.326Z sha 6d16dfa :: needs maintainer review before merge. :: none
  • reviewed 2026-09-09T10:07:13.460Z sha 5e5f160 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-09T15:15:04.265Z sha 9c3a015 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-10T11:23:25.715Z sha 35bbf26 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-10T14:02:49.904Z sha 884dc6c :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL and removed size: L labels Sep 8, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Sep 8, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL labels Sep 8, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Sep 8, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 8, 2026
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/pr138726-split-s-state branch from 6d16dfa to 5e5f160 Compare September 9, 2026 09:56
Integrate the reviewed owner-scoped repairs and updated stack prerequisite.
Retain the validated S layer source with only the inherited legacy agent-binding fix.
Preserve the historical secondary parent and the validated layer source while restacking its prerequisite.

Co-authored-by: IWhatsskill <[email protected]>
Worked on by:
- @IWhatsskill
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/pr138726-split-s-state branch from 5e5f160 to 9c3a015 Compare September 9, 2026 15:08
roboclaw-bot and others added 2 commits September 10, 2026 11:06
Carry the reviewed media-owner guard while preserving state-layer source and history.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
Carry only the I generated-artifact isolation correction. Preserve the existing feature layer, queued-offer race fix, and both histories.

Worked on by:
- @IWhatsskill

Co-authored-by: IWhatsskill <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Closing this PR in favor of a planned rebuild on current main.

@RomneyDa
RomneyDa deleted the openclaw/pr138726-split-s-state branch October 22, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants