Skip to content

fix(signal): stop typing when reply turns end - #167569

Closed
ZengWen-DT wants to merge 1 commit into
openclaw:mainfrom
ZengWen-DT:fix/signal-terminal-typing-127565
Closed

ZengWen-DT wants to merge 1 commit into
openclaw:mainfrom
ZengWen-DT:fix/signal-terminal-typing-127565

Conversation

@ZengWen-DT

@ZengWen-DT ZengWen-DT commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #127565

What Problem This Solves

Fixes Signal typing indicators remaining active until provider expiry after an OpenClaw reply ends, including silent replies and failed turns.

User Impact

Signal receives an explicit typing stop for the same conversation and account when the reply lifecycle closes. No configuration changes are required.

Why This Change Was Made

The Signal reply adapter supplied only a typing-start callback even though the provider already supports terminal stop. This wires both callbacks into the existing shared lifecycle, retaining its late-start ordering and deduplication. Stop errors are logged without failing or repeating the reply.

The small Signal-local adapter extraction keeps the existing oversized event handler within its line-cap ratchet; shared lifecycle code is unchanged.

Evidence

  • Conflict refresh onto main 4420648c404; current head c097ca5eaf8cadc61eb69fb5ee1c96fd27be816c retains the existing reply-typing change and adapts the test-worker routing. The prior refresh failed a focused remote test because its harness API had changed; this head adapts that test and a new remote run is pending. Prior results below refer to earlier heads. Real Signal start/stop proof remains outstanding.

Candidate 65196c9a6b23cb7a3f0a1965ea08bfe4501841ac, tree 1ea994699ab1740f219c927a4f756e9d0295a8a3, retains the tested base d0194c3401f9c225dfd24d232715011e7dbf3f5d. The exact patch applies cleanly to main 77cecb5449650c8efd3c261fecb4be08f82e7eed; the newer SDK wrappers preserve typing callbacks. This is source-composition verification, not a runtime rerun on the newer main.

  • Eight new monitor-boundary cases fail against the unmodified production handler and pass with this change. They cover final and silent replies, reply/delivery failures, producer AbortError, delayed-start ordering with two-recipient isolation, stop-error logging, and never-mode no-start behavior.
  • Focused verification passed 124 tests across six files in 153.269 seconds. The monitor proof exercises real ingress, event handling, dispatch, shared typing lifecycle, and provider request encoding; the reply producer and external transport are mocked.
  • Focused production and test type checks, changed-file syntax lint and formatting, Signal MDX validation, and diff checks passed. Canonical autoreview found no actionable P0–P2 findings.
  • Test cost: pnpm test extensions/signal/src/monitor.typing.test.ts --maxWorkers=1 passed 8 tests in 135.296 seconds wall time, including 89.752 seconds of compiled-worker preparation and 31.322 seconds of test time on a contended host. This reuses the existing monitor harness to verify that actual inbound-turn wiring reaches provider cleanup, which shared-helper tests alone cannot prove. CI timing is pending.

Validation limits: no live Signal daemon/account or client UI was tested. Cancellation proof is a reply producer throwing AbortError, not monitor-shutdown cancellation. Never mode is supplied to the real signaler rather than resolved end-to-end from configuration. The changed-check aggregate passed 20 stages before the extension-wide type check exited 137 without diagnostics. One serial retry using the native throttled policy repeated those 20 passes and stopped at the same typecheck, again exit 137 without diagnostics (365.726 seconds total; 163.87 seconds in that stage). The exit is consistent with resource pressure but its exact cause was not independently established; later aggregate stages were not reached. The broader Signal extension run was interrupted after observing 501 passing tests and 20 UNIX-socket bind failures (EPERM under the host policy). Full build, full tests, and complete repository/doc gates have not passed; this is a draft.

@clawsweeper

clawsweeper Bot commented Oct 9, 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 docs Improvements or additions to documentation channel: signal Channel integration: signal size: M labels Oct 9, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Connects Signal typing-stop requests to the shared reply cleanup lifecycle.

Example: Signal account +15550009999 replies to “hello” from +15550001111.

  • Before: OpenClaw sends typing-start but leaves the indicator active until provider expiry after replying.
  • After: Terminal cleanup sends typing-stop to the same recipient and account.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch appears correct and has meaningful regression coverage, but required real-behavior proof is absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Signal continues showing OpenClaw typing after a reply turn has ended.
Reason: The linked source-backed issue requests this narrow repair, and existing provider and lifecycle contracts already support the intended behavior.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR repairs a concrete Signal defect that remains on current main and in the latest release; no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 65196c9a6b23cb7a3f0a1965ea08bfe4501841ac

Before merge

  • Add real behavior proof - The monitor harness exercises Signal ingress, the changed adapter, shared cleanup, and provider encoding, but mocks reply production and external RPC. Supply redacted logs, terminal screenshots, or a recording from a real Signal setup showing start followed by terminal stop for the same account/conversation after normal, silent, and failed or cancelled replies; redact phone numbers, keys, IP addresses, and private endpoints. Producer AbortError coverage does not establish monitor-shutdown cancellation. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: A real Signal run demonstrating terminal stop after normal, silent, and failed or cancelled replies is missing; base-failing/head-passing monitor results are contributor-reported.
Agent review details

How this fits together

The Signal monitor receives inbound messages and dispatches replies through the shared lifecycle; its typing adapter translates lifecycle events into provider RPC requests.

flowchart TD
  A[Incoming Signal message] --> B[Signal monitor]
  B --> C[Shared reply lifecycle]
  C --> D[Signal typing adapter]
  D --> E[Provider start or stop RPC]
  C --> F[Reply delivery]
Loading

Technical review

Best possible solution:

Keep Signal terminal cleanup in the existing shared lifecycle with matching account and conversation bindings.

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

Source establishes the failure: terminal cleanup cannot send a provider stop when Signal supplies only start; no target code or live reproduction was run during this review.

Is this the best way to solve the issue?

The patch repairs the missing adapter operation using the existing provider API and shared ordering owner, without adding configuration or duplicating lifecycle policy.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Signal reply typing adapter keeps the original intent (05eda57: The durable message lifecycle migration retained core lifecycle ownership and plugin-native I/O while carrying forward the existing start callback.)
  • Signal typing documentation keeps the original intent (9a71607: The supplied provenance points to the product rename; the existing documented refresh behavior remains intact and gains terminal-cleanup documentation.)
  • Database-worker test routing keeps the original intent (f0b78f5: Ingress queue tests require the shared-state broker worker preparation; the new monitor test reuses that ingress harness.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +10, Tests +226, Docs 0. Total +236 across 6 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 33 23 +10
Tests 3 227 1 +226
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 261 25 +236

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #127565
Summary: This PR is a candidate repair for the canonical Signal terminal-stop omission.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P2: A lingering typing indicator misrepresents reply activity, but no message loss or blocked conversation is established.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Demonstrate the changed cleanup behavior through a real Signal setup.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-09T02:15:00.715Z sha 65196c9a6b23cb7a3f0a1965ea08bfe4501841ac :: needs real behavior proof before merge. :: none

Reviewed October 22, 2026, 4:34 AM ET / 08:34 UTC (Revision 2).

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Oct 23, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale after 7 days without qualifying human activity.
Without new human activity, Barnacle may close it as not planned 7 days after this message was posted. This is administrative inactivity cleanup, not a claim that the problem is fixed.
A human update restarts the inactivity clock; a new PR head also restarts it. A maintainer can add no-stale for a durable hold, or bad-barnacle to suppress Barnacle. Remove the hold when work can resume.

@ZengWen-DT
ZengWen-DT force-pushed the fix/signal-terminal-typing-127565 branch from 65196c9 to 9d99863 Compare October 27, 2026 11:46
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: signal Channel integration: signal docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signal reply turns never send the provider terminal typing stop

1 participant