Skip to content

refactor(signal): share outbound and reaction transport - #119415

Merged
steipete merged 1 commit into
mainfrom
codex/loc-0804-transport-plugins-luem8u
Aug 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/loc-0804-transport-plugins-luem8u

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Signal maintained repeated outbound adapter forwarding and duplicated reaction HTTP transport and error handling. This is part of a maintainer-requested project-wide production LOC reduction campaign.

Why This Change Was Made

Delegate outbound transport directly to its canonical owner and share equivalent reaction request handling while retaining media-access authorization, account identity, quoting, group addressing, and POST/DELETE contracts.

User Impact

Signal messaging and reactions retain the same observable behavior and security boundaries with 157 fewer production lines.

Evidence

  • Removed the now-unnecessary Signal max-lines suppression and its single grandfathered baseline entry; the channel is now 689/700 governed lines, strengthening the ratchet.
  • Seven focused Signal suites; 223 tests covering real HTTP media access, account and group identity, reaction methods, messaging, and action dispatch.
  • Full remote changed-file validation on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/30967976984
  • Independent structured autoreview: Codex gpt-5.6-sol with xhigh reasoning; no accepted or actionable findings.
  • git diff --check, scoped formatting, and direct before/after behavioral equivalence checks passed.
  • AI-assisted implementation and independent review.

Exact-head Signal outbound and reaction proof

The actual committed Signal plugin outbound adapter, container client, and reaction owner were loaded from the exact reviewed SHA and executed against a real isolated loopback HTTP server. All three changed production blobs were checked against the PR commit; account and recipient identifiers below are redacted synthetic fixtures.

SIGNAL_EXACT_HEAD_PROOF
sourceCommit=5eb0ba602d509c54cad8e36cae26cb83331d1917
productionBlobVerification=channel,client-container,send-reactions MATCH
transport=production signalPlugin.outbound.sendText + sendReactionSignal/removeReactionSignal
endpoint=isolated loopback HTTP fixture; no registered Signal container or live delivery
POST /v2/send -> HTTP 200
  payload={"message":"Signal transport proof","number":"<redacted-account>","recipients":["<redacted-recipient>"]}
POST /v1/reactions/<redacted-account> -> HTTP 204
  payload={"recipient":"<redacted-recipient>","reaction":"👍","target_author":"<redacted-recipient>","timestamp":1735689600000}
DELETE /v1/reactions/<redacted-account> -> HTTP 204
  payload={"recipient":"<redacted-recipient>","reaction":"👍","target_author":"<redacted-recipient>","timestamp":1735689600000}
deliveryResult={"channel":"signal","messageId":"1735689600000"}
reactionAddResult={"ok":true}
reactionRemoveResult={"ok":true}
assertions=PASS

Proof ran on Blacksmith Testbox lease tbx_01kz7y3e1058j8c2yv6csxcxvp with authoritative wrapper exit code 0; a fresh exact-head focused rerun also passed 175 tests across five production real-server, media-security, channel-core, container, and reaction suites. A registered live Signal container was intentionally not used: it would require operator-owned registered credentials and send an unauthorized external Signal message. The isolated real-HTTP fixture executes the actual production send and reaction paths without touching user state.

ClawSweeper rank-up disposition: the outbound send plus reaction add/remove move is addressed by the observed exact-head production/real-HTTP transcript above. Rebasing onto current main is intentionally skipped: the unchanged reviewed SHA already passed 223 focused Signal tests, the full remote changed gate, 175 freshly rerun exact-head tests, and exact-head hosted ci-gate; a rebase would invalidate that reviewed SHA. The canonical maintainer merge workflow rechecks current-main drift, treats it as advisory, and verifies hosted exact-head gates immediately before landing.

@openclaw-barnacle openclaw-barnacle Bot added channel: signal Channel integration: signal size: M maintainer Maintainer-authored PR labels Aug 5, 2026
@steipete
steipete marked this pull request as ready for review August 5, 2026 02:18
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:15 PM ET / August 5, 2026, 03:15 UTC.

ClawSweeper review

What this changes

This PR makes Signal message delivery and reaction handling share their existing transport functions instead of repeating forwarding wrappers and POST/DELETE request code.

Merge readiness

✅ Ready for maintainer review

No blocking findings. Current main still contains the duplicated Signal forwarding and separate reaction helpers, while this exact-head refactor preserves their contracts and now has sufficient real-HTTP proof.

Priority: P3
Reviewed head: 5eb0ba602d509c54cad8e36cae26cb83331d1917

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a focused net-negative refactor with sufficient exact-head transport proof and no actionable correctness finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body contains a redacted exact-head transcript showing production Signal send plus add/remove reaction calls through an isolated loopback HTTP server with successful POST and DELETE results.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body contains a redacted exact-head transcript showing production Signal send plus add/remove reaction calls through an isolated loopback HTTP server with successful POST and DELETE results.
Evidence reviewed 6 items Current main still needs this cleanup: Current main retains explicit text/media forwarding wrappers and separate reaction POST/DELETE helpers; no intervening main commit touched the three Signal source paths after the PR base.
Exact-head outbound contract: The direct adapter binding normalizes nullable account IDs while retaining account, recipient, media-access, local-root, file-reader, and reply inputs.
Exact-head reaction contract: The consolidated helper retains the existing request payload and selects DELETE only when the existing remove flag is set; add remains POST.
Findings None None.
Security None None.

How this fits together

The Signal plugin converts agent message and reaction actions into requests to either a Signal daemon or container transport. These helpers resolve the account and recipient, issue the HTTP request, then return the delivery result to the channel runtime.

flowchart LR
A[Agent action] --> B[Signal channel plugin]
B --> C[Account and recipient resolution]
C --> D[Outbound message or reaction helper]
D --> E[Signal container HTTP transport]
E --> F[Delivery or reaction result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -157, Other -1. Total -158 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 3 26 183 -157
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 4 26 184 -158

Review metrics

Metric Value Why it matters
Production LOC delta production -157, tests 0 The refactor removes repeated Signal transport code without expanding the production surface.

Technical review

Best possible solution:

Keep one canonical Signal outbound and reaction transport path, preserving the already-tested account, recipient, media, reply, and HTTP-method contracts.

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

Not applicable: this is a refactor rather than a reported defect, and its exact-head production-function loopback transcript verifies the preserved transport behavior.

Is this the best way to solve the issue?

Yes. Direct delegation to the existing owner functions removes duplicate policy without adding a parallel transport path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1f3d45b76f51.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains a redacted exact-head transcript showing production Signal send plus add/remove reaction calls through an isolated loopback HTTP server with successful POST and DELETE results.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body contains a redacted exact-head transcript showing production Signal send plus add/remove reaction calls through an isolated loopback HTTP server with successful POST and DELETE results.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 message-delivery: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a focused internal cleanup with preserved Signal behavior and no reported user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body contains a redacted exact-head transcript showing production Signal send plus add/remove reaction calls through an isolated loopback HTTP server with successful POST and DELETE results.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains a redacted exact-head transcript showing production Signal send plus add/remove reaction calls through an isolated loopback HTTP server with successful POST and DELETE results.

Evidence

What I checked:

Likely related people:

  • steipete: History identifies steipete as the dominant contributor across the three Signal paths and author of recent account-transport and container fixes. (role: recent area contributor; confidence: high; commits: 0687ab73f101, 982add961804; files: extensions/signal/src/channel.ts, extensions/signal/src/client-container.ts, extensions/signal/src/send-reactions.ts)
  • Vincent Koc: Current implementation blame attributes the shared outbound, reaction, and container baseline to Vincent Koc’s fixture-related import commit. (role: feature introducer; confidence: medium; commits: aa07d55ec98f, f6d456235c; files: extensions/signal/src/channel.ts, extensions/signal/src/client-container.ts, extensions/signal/src/send-reactions.ts)

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 (1 earlier review cycle)
  • reviewed 2026-08-05T02:25:42.220Z sha 5eb0ba6 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 5, 2026
@steipete
steipete merged commit 0ef1911 into main Aug 5, 2026
194 of 208 checks passed
@steipete
steipete deleted the codex/loc-0804-transport-plugins-luem8u branch August 5, 2026 03:19
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
* origin/main:
  fix(channels): honor explicit preview streaming settings
  refactor(telegram): consolidate outbound contracts and targets (#119438)
  fix(qa): retry transport cleanup and always stop owned labs (#119442)
  fix(mcp): guard stdio stdout frame parsing against oversized-buffer crash (#119379)
  refactor(auto-reply): centralize delivery deduplication and routing (#119436)
  fix(qa): preserve scenario isolation in serial suites (#119439)
  perf(xai): lazy-load optional capability runtimes (#119374)
  refactor(browser): consolidate browser CLI and normalization helpers (#119432)
  fix(qa): require ready transport accounts (#119431)
  refactor(media): share image and video geometry normalization (#119416)
  fix(config): preserve plugin metadata for missing config (#119421)
  fix: retry delivery when outbound adapter is unavailable (#119371)
  fix(cli): retire invalid secret flags and prove doctor recovery (#118926)
  refactor(signal): share outbound and reaction transport (#119415)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant