Repository navigation
fix(imessage): settle accepted monitor deliveries canonically - #117282
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 4:15 AM ET / 08:15 UTC. ClawSweeper reviewWhat this changesThe PR replaces iMessage monitor reply delivery’s void result with a structured native receipt, partial-delivery, and intentional-suppression result consumed by the shared channel-turn lifecycle. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open: the source-level repair is coherent and has no discrete correctness finding, but the required after-fix real iMessage-provider proof is still missing. The new product-path test drives the monitor and lifecycle but replaces the native iMessage RPC client with Vitest doubles, so it cannot independently establish receipt behavior against a real native sender. Priority: P1 Review scores
Verification
How this fits togetherThe iMessage monitor receives an inbound native message, runs the agent reply pipeline, and sends each resulting payload through the iMessage transport. The transport result returns to the shared channel-turn lifecycle, which records successful terminal message observations or intentional/partial outcomes. flowchart LR
A[Native iMessage monitor event] --> B[Agent reply pipeline]
B --> C[iMessage delivery adapter]
C --> D[Native send receipts]
C --> E[Partial delivery or suppression]
D --> F[Shared channel-turn lifecycle]
E --> F
F --> G[Terminal message observation]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +43, Tests +321. Total +364 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared-lifecycle design, then attach a redacted real Do we have a high-confidence way to reproduce the issue? No live reproduction was independently run in this read-only review; source inspection establishes that current main’s iMessage monitor delivery path returns no structured result, and the PR’s focused tests provide a source-level reproduction harness. Is this the best way to solve the issue? Yes for the code shape: the PR reuses the existing Plugin SDK receipt and partial-delivery contracts and leaves terminal observation with the shared lifecycle. The remaining gap is evidence, not a need for a parallel iMessage-specific delivery path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6baf4dd15f5d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
58eeffd to
fde7a61
Compare
|
Merged via squash.
|
* origin/main: (41 commits) test(ci): update memory helper routing expectation (#117295) fix(canvas): emit successful control results in JSON mode (#117297) fix(imessage): settle native inbound reply delivery (#117282) fix(agents): reject invalid UTF-8 LSP responses (#117271) fix(line): centralize card and template message alt text (#117280) fix(release): validate candidates before Docker publication (#117252) fix(media): validate provider-owned generated media downloads (#117281) fix(feishu): restore custom HTTPS API domains (#117278) fix(models): reuse prepared plugin metadata (#117131) fix(agents): stop fallback after delivered-but-failed attempts (#114628) fix(memory): reuse targeted session corpus snapshot (#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (#116931) fix(linux-canvas): report socket watcher fallback (#109502) fix(codex): preserve authoritative turn completion (#117185) fix(canvas): preserve widgets across derived-name collisions (#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206) fix(msteams): prevent duplicate final replies (#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (#117221) fix(plugins): preserve workspace plugins across CLI and control UI (#117265) ...
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: (41 commits) test(ci): update memory helper routing expectation (openclaw#117295) fix(canvas): emit successful control results in JSON mode (openclaw#117297) fix(imessage): settle native inbound reply delivery (openclaw#117282) fix(agents): reject invalid UTF-8 LSP responses (openclaw#117271) fix(line): centralize card and template message alt text (openclaw#117280) fix(release): validate candidates before Docker publication (openclaw#117252) fix(media): validate provider-owned generated media downloads (openclaw#117281) fix(feishu): restore custom HTTPS API domains (openclaw#117278) fix(models): reuse prepared plugin metadata (openclaw#117131) fix(agents): stop fallback after delivered-but-failed attempts (openclaw#114628) fix(memory): reuse targeted session corpus snapshot (openclaw#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (openclaw#116931) fix(linux-canvas): report socket watcher fallback (openclaw#109502) fix(codex): preserve authoritative turn completion (openclaw#117185) fix(canvas): preserve widgets across derived-name collisions (openclaw#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (openclaw#117206) fix(msteams): prevent duplicate final replies (openclaw#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (openclaw#117221) fix(plugins): preserve workspace plugins across CLI and control UI (openclaw#117265) ...
What Problem This Solves
iMessage's live inbound-monitor direct delivery discarded native provider receipts for successful tool and streamed-block replies, so core could not emit the canonical terminal
message_sentobservation. When a later native attachment/caption send failed after earlier messages had already become visible, the plugin retained only the latest partial receipt and silently lost the earlier accepted identities/content. A reply containing only hidden assistant tags was sanitized to nothing but returned no typed suppression, leaving the action without either a visible outcome or a recorded intentional non-outcome.Why This Change Was Made
Replace the obsolete private plural-array delivery abstraction with the single-payload lifecycle its only production caller actually uses. Capture every native send result at its authoritative provider boundary, reuse the existing Plugin SDK receipt/partial-error contracts to aggregate actual accepted identities and visible content, explicitly return the canonical no-visible-result suppression, and let the existing core turn lifecycle own terminal
message_sentobservation. Never infer thread metadata from the attempted reply: the native transport can fall back to an unthreaded send, and its actual receipt remains authoritative.User Impact
Successful iMessage tool and streamed-block replies now expose their real provider message IDs, visible content, and exactly one terminal delivery event. If an already-visible native attachment is followed by a rejected caption or a later native failure, all accepted receipts and only the genuinely visible content remain available for failure observation. Replies reduced entirely to hidden assistant tags intentionally send nothing, record the typed suppression, and never emit a false successful delivery event.
Evidence
58eeffdbe088a142fbf003e26bf3f7fc55e7be94, tree2a614be2e612f7a349b4bcea61d706413064ed16, sole parentee320a6e411479a23faa89a75463ff1b15630afc; exactly two existing iMessage production owner/caller files and two existing colocated owner/product test files.ee320a6e411479a23faa89a75463ff1b15630afcreproduced all three independent failures in one focused owner run: successful chunks returnedundefined; a later rejected caption lost both earlier accepted IDs and visible caption content; hidden-tag-only replies returnedundefinedinstead of typed suppression. Seven unchanged owner tests passed while those three failed.imsgRPC sender, exactly one realmessage_sentplugin hook for both tool and streamed-block replies, and persisted echo custody in the realstate/openclaw.sqliteplugin_state_entriestable. Hidden-only payload sends no native message and emits no success hook. A separate independent hostile reviewer reran both suites together: 14/14 passing.OPENCLAW_VITEST_FS_MODULE_CACHE=0 OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree node scripts/run-vitest.mjs extensions/imessage/src/monitor/deliver.test.ts extensions/imessage/src/monitor.plugin-payload.test.ts; existing-binary four-fileoxfmt --check, focusedoxlint --threads=1, andgit diff --checkall pass.gpt-5.6-sol/highautoreview through P0, P1, P2, and P3: no findings, confidence 0.86. Verified real TruffleHog 3.96.0 Mach-O SHA-25609c30c73bf4a265942c4a3e1a889833464c01db18fb4e53002220baa3367eb5d; actual scan passed.main1f130ce61d62bd99e0912a0d90f351c4c6e8527cdoes not modify iMessage owners, channel-turn settlement, receipt aggregation, or the relevant Plugin SDK contracts. Newly landed WhatsApp alias normalization is confined to its transport owner; the fresh plugin-state read-only table fix preserves and improves the same SQLite lifecycle without changing writable echo custody. Exact read-only synthetic merge is clean:cd0e18ea2a8884f4e27586cba17c22a2d84680c9.