Repository navigation
fix(imessage): report Automation failures after Gateway updates - #186117
Conversation
Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: 240e1244-5018-4036-a34f-5ea590605722
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR reports observed iMessage Automation send failures in account status and supplies recovery guidance. Example: Account proof sends proof.pdf through AppleScript and imsg returns error -1712.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review This maintainer-authored PR addresses the earlier attachment-warning finding without introducing an actionable code defect; exact-head CI remains pending. Priority: P0 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe iMessage plugin translates Gateway sends and native attachment actions into imsg operations, then publishes observed failures through the existing account-status owner. flowchart LR
A[Gateway send or attachment action] --> B[iMessage send owner]
B --> C[imsg process or RPC]
C --> D[Messages]
B --> E[Automation diagnostic publisher]
E --> F[Account status]
F --> G[CLI and Gateway clients]
Technical reviewBest possible solution: Land the focused diagnostic repair while pursuing validated permission continuity and a visible Fix Permissions action in the linked macOS work. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the missing send-warning path, and the supplied Gateway RED/GREEN output demonstrates the diagnostic failure with injected imsg errors; this review executed no target code. Is this the best way to solve the issue? The shared account-status publisher is a focused solution to the reporting defect, preserves error identity and delivery policy, and avoids changing macOS runtime or permission ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c28d2e4294e4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +100, Tests 0, Docs +11. Total +111 across 8 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 27, 2026, 2:35 PM ET / 18:35 UTC (Revision 2). |
Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: 90502ee6-df92-494d-a71f-add32b9c5b46
Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: d46112b3-6348-49b4-9098-cf674c34dc78
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep this change to the macOS service runtime path that preserves privacy grants across updates. The iMessage Automation failure guidance and its troubleshooting entry return to main's version; openclaw#186117 owns reporting those failures on the account.
…is re-granted (#186107) * fix(macos): keep Gateway privacy grants across app updates App-managed Bun services pinned the LaunchAgent to the per-build runtime/<buildId>/bin/bun. macOS keys Automation and Full Disk Access grants for a bare executable by path, so every app update dropped them and iMessage sends failed with AppleScript -1712. Services now run a byte-identical clone of the build's Bun at runtime/service/bun; package and SQLite stay per build. Installs stage the clone atomically and restore it on failure, and runtime collection keeps any build a stable-path service still loads. iMessage send errors for AppleScript -1712/-1743 now name the Automation grant and the launch context to check. * style(macos): wrap service runtime error and fix guard indent * fix(macos): restore retained services on either Bun path Hosting-change recovery and app-environment checks derived the build from the service executable, which now names runtime/service/bun. Resolve it from the package entrypoint instead. Installed-service custody accepted only the stable service path, so recovering a retained per-build service rejected its own valid pin. Bind the expected command and pin to the executable the installed service actually runs. * test(imessage): fold Automation diagnostics into one table * chore(test): set test-lines ceiling to the measured tree * test(imessage): type the diagnostics error as Error * fix(macos): keep the service Bun a failed install already published The installer can publish and load the service, then fail while saving its runtime pin. Rolling back on the exit code alone deleted the stable Bun on a first move, leaving the LaunchAgent pointing at a missing executable, or put old Bun bytes under the new package. Settle the staged Bun on the installed service instead: keep it when the service now runs this build, restore the previous clone otherwise, and never delete a first clone. * chore(test): set test-lines ceiling to the measured tree * fix(macos): resume paused services on the stable service Bun A paused service updated by the app saved the new build's per-build Bun as its resume command, so Resume reinstalled it there and its macOS privacy grants were lost again. Point the updated resume command at the stable service Bun with the new build's package, and stage that build before Resume installs it. Operator-pinned runtimes keep their own path. * refactor(imessage): leave Automation send guidance to its own change Keep this change to the macOS service runtime path that preserves privacy grants across updates. The iMessage Automation failure guidance and its troubleshooting entry return to main's version; #186117 owns reporting those failures on the account. * fix(imessage): restore Automation guidance on failed sends The stable service path keeps grants across updates, but the first move onto it (and Node to Bun) still needs one approval. Name that grant and the launch context to check when a send fails with AppleScript -1712/-1743, so the one-time step is visible. * docs(macos): limit stable service path claim to Automation
…is re-granted (openclaw#186107) * fix(macos): keep Gateway privacy grants across app updates App-managed Bun services pinned the LaunchAgent to the per-build runtime/<buildId>/bin/bun. macOS keys Automation and Full Disk Access grants for a bare executable by path, so every app update dropped them and iMessage sends failed with AppleScript -1712. Services now run a byte-identical clone of the build's Bun at runtime/service/bun; package and SQLite stay per build. Installs stage the clone atomically and restore it on failure, and runtime collection keeps any build a stable-path service still loads. iMessage send errors for AppleScript -1712/-1743 now name the Automation grant and the launch context to check. * style(macos): wrap service runtime error and fix guard indent * fix(macos): restore retained services on either Bun path Hosting-change recovery and app-environment checks derived the build from the service executable, which now names runtime/service/bun. Resolve it from the package entrypoint instead. Installed-service custody accepted only the stable service path, so recovering a retained per-build service rejected its own valid pin. Bind the expected command and pin to the executable the installed service actually runs. * test(imessage): fold Automation diagnostics into one table * chore(test): set test-lines ceiling to the measured tree * test(imessage): type the diagnostics error as Error * fix(macos): keep the service Bun a failed install already published The installer can publish and load the service, then fail while saving its runtime pin. Rolling back on the exit code alone deleted the stable Bun on a first move, leaving the LaunchAgent pointing at a missing executable, or put old Bun bytes under the new package. Settle the staged Bun on the installed service instead: keep it when the service now runs this build, restore the previous clone otherwise, and never delete a first clone. * chore(test): set test-lines ceiling to the measured tree * fix(macos): resume paused services on the stable service Bun A paused service updated by the app saved the new build's per-build Bun as its resume command, so Resume reinstalled it there and its macOS privacy grants were lost again. Point the updated resume command at the stable service Bun with the new build's package, and stage that build before Resume installs it. Operator-pinned runtimes keep their own path. * refactor(imessage): leave Automation send guidance to its own change Keep this change to the macOS service runtime path that preserves privacy grants across updates. The iMessage Automation failure guidance and its troubleshooting entry return to main's version; openclaw#186117 owns reporting those failures on the account. * fix(imessage): restore Automation guidance on failed sends The stable service path keeps grants across updates, but the first move onto it (and Node to Bun) still needs one approval. Name that grant and the launch context to check when a send fails with AppleScript -1712/-1743, so the one-time step is visible. * docs(macos): limit stable service path claim to Automation
…is re-granted (#186107) * fix(macos): keep Gateway privacy grants across app updates App-managed Bun services pinned the LaunchAgent to the per-build runtime/<buildId>/bin/bun. macOS keys Automation and Full Disk Access grants for a bare executable by path, so every app update dropped them and iMessage sends failed with AppleScript -1712. Services now run a byte-identical clone of the build's Bun at runtime/service/bun; package and SQLite stay per build. Installs stage the clone atomically and restore it on failure, and runtime collection keeps any build a stable-path service still loads. iMessage send errors for AppleScript -1712/-1743 now name the Automation grant and the launch context to check. * style(macos): wrap service runtime error and fix guard indent * fix(macos): restore retained services on either Bun path Hosting-change recovery and app-environment checks derived the build from the service executable, which now names runtime/service/bun. Resolve it from the package entrypoint instead. Installed-service custody accepted only the stable service path, so recovering a retained per-build service rejected its own valid pin. Bind the expected command and pin to the executable the installed service actually runs. * test(imessage): fold Automation diagnostics into one table * chore(test): set test-lines ceiling to the measured tree * test(imessage): type the diagnostics error as Error * fix(macos): keep the service Bun a failed install already published The installer can publish and load the service, then fail while saving its runtime pin. Rolling back on the exit code alone deleted the stable Bun on a first move, leaving the LaunchAgent pointing at a missing executable, or put old Bun bytes under the new package. Settle the staged Bun on the installed service instead: keep it when the service now runs this build, restore the previous clone otherwise, and never delete a first clone. * chore(test): set test-lines ceiling to the measured tree * fix(macos): resume paused services on the stable service Bun A paused service updated by the app saved the new build's per-build Bun as its resume command, so Resume reinstalled it there and its macOS privacy grants were lost again. Point the updated resume command at the stable service Bun with the new build's package, and stage that build before Resume installs it. Operator-pinned runtimes keep their own path. * refactor(imessage): leave Automation send guidance to its own change Keep this change to the macOS service runtime path that preserves privacy grants across updates. The iMessage Automation failure guidance and its troubleshooting entry return to main's version; #186117 owns reporting those failures on the account. * fix(imessage): restore Automation guidance on failed sends The stable service path keeps grants across updates, but the first move onto it (and Node to Bun) still needs one approval. Name that grant and the launch context to check when a send fails with AppleScript -1712/-1743, so the one-time step is visible. * docs(macos): limit stable service path claim to Automation (cherry picked from commit 0a6aaf5) Adapted to stable's direct native runtime-pin storage and definition-hash custody. Kept existing app-host lifecycle and iMessage stream/recovery owners; added only the Automation diagnostic helper, not newer process-diagnostic refactors. Focused iMessage suite: 22 passed. Native service/rollback/GC proof requires macOS. Co-authored-by: RomneyDa <[email protected]>
…claw#186117) * fix(imessage): report Automation failures after Gateway updates Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: 240e1244-5018-4036-a34f-5ea590605722 * Publish openclaw/fix-178719-macos-runtime-permissions Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: 90502ee6-df92-494d-a71f-add32b9c5b46 * Publish openclaw/fix-178719-macos-runtime-permissions Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: d46112b3-6348-49b4-9098-cf674c34dc78 * fix(imessage): make Automation warnings easier to follow --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: anmol0b <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
) * fix(imessage): report Automation failures after Gateway updates Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: 240e1244-5018-4036-a34f-5ea590605722 * Publish openclaw/fix-178719-macos-runtime-permissions Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: 90502ee6-df92-494d-a71f-add32b9c5b46 * Publish openclaw/fix-178719-macos-runtime-permissions Worked on by: - @anmol0b Co-authored-by: anmol0b <[email protected]> OpenClaw-Publication: d46112b3-6348-49b4-9098-cf674c34dc78 * fix(imessage): make Automation warnings easier to follow --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: anmol0b <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Backport-source: 982f3b1 Backport-scope: Moderate. Preserve current remote-host-specific structured guidance and original Error/delivery/retry classification; add shared account status lifecycle, do not replace diagnostics wholesale. Adapted production backport for release/2026.11.2. Upstream validation descriptions refer to source history; candidate regression coverage and remote qualification are tracked separately. Co-authored-by: RomneyDa <[email protected]>
Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions. Backport-of: 0a171b4 — Leizhen Zhang — fix(auto-reply): long punctuation runs stall abort-trigger detection (#184433) Backport-of: 49600b5 — Long Jin — fix(memory): preserve inline notes during MEMORY.md compaction (#164089) Backport-of: 982f3b1 — RoboClaw — fix(imessage): report Automation failures after Gateway updates (#186117) Backport-of: 3f7ee38 — art22s — fix: require approval for dynamic shell predicates (#187884) Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally. Co-authored-by: RomneyDa <[email protected]>
…ed send Backport HG-2-34 / #186117 with scoped process diagnostics from #186107. Use existing account runtime contexts and preserve unknown delivery evidence. Keep startup readiness from clearing an outbound Automation warning. Proof: original failures reproduced, 63 focused and 84 consumer tests pass; 10 static gates, production build and isolated built-plugin import pass. Import is screening only: dirty source identity is not release-qualified. Real macOS permission/SSH/send and stable-upgrade qualification remain open. Backport-source: 982f3b1 Scoped-prerequisite: 0a6aaf5 Co-authored-by: RomneyDa <[email protected]>
* fix(gateway): publish node reapproval with committed pairing facts Adapt main commit 94f180d to the extended-stable worker dispatcher, retaining cleanup admission and stale-session fencing. Co-authored-by: RomneyDa <[email protected]> * test(gateway): clarify CLI announcement tool-only phase Keep exact token, barrier, and completion ordering assertions intact while explicitly excluding narration before the barrier. Co-authored-by: RomneyDa <[email protected]> * style(gateway): format node reapproval regression Reflow the spy chain reported by hosted CI; no behavioral changes. Co-authored-by: RomneyDa <[email protected]> * test(secrets): decouple Telegram fixture from plugin discovery Import the real public Telegram secret collector directly so collection does not depend on Gateway discovery environment. Exercise collection with bundled plugins disabled while retaining existing token assertions. Gateway timeout attribution remains unresolved; no production behavior or timeout changes. Co-authored-by: RomneyDa <[email protected]> * test(secrets): load Telegram fixture through public resolver Replace the static extension import rejected by core type and boundary checks with the existing test public-artifact resolver. Keep the real collector in the Vitest module graph and preserve the disabled-discovery regression. Independent source review accepted; local test, typecheck, build, install, and performance execution remain excluded by operator instruction. Hosted CI must validate the correction. Co-authored-by: RomneyDa <[email protected]> * style(secrets): format Telegram fixture import Co-authored-by: RomneyDa <[email protected]> * fix(ui): honor recovery holds before initial chat history Keep drafting available while the existing send owner holds recovery or a retained initial turn. Restore Send when that hold clears without waiting for initial history or submitting the draft automatically. Add renderer regressions for both holds and clarify the pre-history outbox contract. Controlled real-Gateway red/green evidence: 42523861169 / 42526889715. Diagnostic branch is not merged. Co-authored-by: RomneyDa <[email protected]> * fix(ui): preserve startup status presentation while holding send Restore the existing connected startup/history status suppression without reopening Send admission. Extend both durable hold regressions to reject the duplicate composer status band. Existing cloud E2E assertions remain unchanged. Co-authored-by: RomneyDa <[email protected]> * fix(release): backport installer, service, path and telemetry repairs Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions. Backport-of: eb5d0cb — Javier MV — fix(install): keep the installed runtime private under umask 0002 (#186782) Backport-of: b079019 — Sukhdeep — fix(daemon): Gateway repair stops the Gateway and fails when macOS denies the Trash (#189321) Backport-of: 558e2f3 — YangManBOBO — fix(cli): compare gateway state dirs case-insensitively on Windows (#185917) Backport-of: b7ce1c3 — Peter Steinberger — test(windows): keep ordinary CLI coverage in one partition Backport-of: ba75cf7 — Juan Buhagiar Duijst — fix(diagnostics-otel): gateway stalls after model calls on large sessions with content capture on (#186666) Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally. Co-authored-by: RomneyDa <[email protected]> * fix(release): preserve notes and harden messaging and exec approval Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions. Backport-of: 0a171b4 — Leizhen Zhang — fix(auto-reply): long punctuation runs stall abort-trigger detection (#184433) Backport-of: 49600b5 — Long Jin — fix(memory): preserve inline notes during MEMORY.md compaction (#164089) Backport-of: 982f3b1 — RoboClaw — fix(imessage): report Automation failures after Gateway updates (#186117) Backport-of: 3f7ee38 — art22s — fix: require approval for dynamic shell predicates (#187884) Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally. Co-authored-by: RomneyDa <[email protected]> * fix(release): retain sandbox, recovery lease and Matrix boundaries Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions. Backport-of: a19f1bf — Agustin Rivera — fix(agents): fail closed when sandboxed spawned children resolve CLI-backed models (#178742) Backport-of: c9f3f82 — Peter Steinberger — fix(agents): release restart-recovery fences for killed runs (#181992) Backport-of: dfb6454 — Leizhen Zhang — fix(matrix): crafted formatted_body stalls the Gateway in the mention check (#184432) Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally. Co-authored-by: RomneyDa <[email protected]> * fix(config): preserve last-good state through writes and rollback Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions. Backport-of: 99418fc — weiqinl — fix(config): keep last-known-good when the observer flags the config as truncated (#152565) Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally. Co-authored-by: RomneyDa <[email protected]> * fix(sessions): preserve history when relocating relative stores Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions. Backport-of: a64daf7 — Peter Steinberger — fix(sessions): resolve relative session stores against the state dir, not the working directory (#182444) Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally. Co-authored-by: RomneyDa <[email protected]> * fix(release): repair September backport type contracts Split terminal recovery actions into distinct discriminants without changing behavior. Use the branch-native Doctor import signature, checking held maintenance authority before and after the awaited import. Validation: independent exact-diff source review, formatter and git diff --check passed. Local tests, typechecks and builds not run per operator restriction; fresh exact-head remote qualification required. Repairs CI 42643973970 attempt 1. Co-authored-by: RomneyDa <[email protected]> * fix(release): align backport regressions with September contracts Preserve uncertain config-write outcomes while correcting branch-native fixture APIs and lint errors found by hosted CI. Co-authored-by: RomneyDa <[email protected]> * test(ci): separate Windows capacity from growing inventory Keep package coverage and the five-job limit independent of a historical timing snapshot. Preserve the rounded capacity boundary and exercise the documented bounded-growth fallback with fixed estimates. Co-authored-by: RomneyDa <[email protected]> * test(node-host): keep launcher cleanup with its invoke owner Wait for a positive launcher PID before probing liveness, and cancel through the existing invocation owner on every exit path. Never send SIGKILL to file-derived PID zero. Co-authored-by: RomneyDa <[email protected]> * test(release): observe owned Gateway reservation cleanup Verify the real reservation closes before relaunch instead of rebinding an already-released port that another socket can acquire. Preserve all seven packaged startup recovery scenarios. Co-authored-by: RomneyDa <[email protected]> * test(release): capture native compiler busy-executable evidence Preserve real API execution and errors while recording failure-only executable inode and writable descriptor metadata. Add a Linux kernel-path diagnostic regression; no retry or copy change. Co-authored-by: RomneyDa <[email protected]> * test(release): repair stability regression fixtures Register CLI admission metadata through the runtime registry, observe the rollback health baseline, and preserve exact SQLite byte expectations. Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: RomneyDa <[email protected]>
) * fix(plugins): portable plugin-state keys for PostgreSQL Use an exclusive SQL lower bound for Doctor pagination instead of a NUL-suffixed cursor. Reject new NUL keys in test-only plugin-state fixtures while retaining legacy SQLite adoption reads. Add real PostgreSQL Doctor regression coverage and register it in conformance and database-worker lanes. Refs openclaw#184862 openclaw#188642. * test: account for rebased plugin-state coverage * test(clickclack): import legacy revocations before adoption (cherry picked from commit 395cac7) Release adaptation: Only exclusive SQL lower bound in kernel and Doctor pagination; preserve legacy SQLite keys and public validation. Regression exercises real Doctor paging and inspected executed SQL bindings; no NUL-key fixture policy, schema or unrelated tests. Follow-up dispositions: 8253356 fix: preserve child results after source lifecycle changes (openclaw#202708); f3f89c7 fix: show saved child results when completion delivery fails (openclaw#202664); c45faa8 fix: align CI tests with admitted tool calls (openclaw#202655); 5c9389a fix: make channels add report required plugin install failures (openclaw#202091); 52b9188 fix: show hosted model details in `models list` without a Gateway (openclaw#202490); d248a76 fix: show an outcome when kept child chats return no answer (openclaw#202423); 5148804 fix(discord): check a queued message's access again when its turn starts (openclaw#202330); 2470d62 fix: let setup use account models with a fresh catalog (openclaw#202019); 9fa0b92 fix: let PostgreSQL Gateways start with plugin-backed secrets (openclaw#201063); c180824 fix(plugins): Talk and plugin-loading requests fail on PostgreSQL Gateways (openclaw#201976); cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 17c5fb0 fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (openclaw#197425); b5c1277 fix: let resumed parents collect children stopped by restart (openclaw#201460); f920a7e chore(postgres): qualify cron completion during graceful shutdown (openclaw#201246); 1680f54 fix(openai): new ChatGPT subscription models missing until an OpenClaw release (openclaw#201130); 0d8820a fix(media): image descriptions use the ChatGPT OAuth route when OpenAI has no API key (openclaw#199299); ee3e16e test(agents): trim and fold low-value regression suites (openclaw#198916); b8029b4 test(agents): qualify PostgreSQL simple-completion acquisition (openclaw#200956); 703c82d fix(sessions): record queued input end causes and recover them across crashes (openclaw#200533); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); d565e17 fix(ci): retire deleted session fork test from inventory (openclaw#200611); 4cf12c6 chore(postgres): qualify prompt refresh and rebalance CI (openclaw#200488); d460273 fix(templates): release earlier Template-managed agents (openclaw#200303); ff75829 fix(update): --no-restart update fails when the Gateway restarts itself during Doctor's stop (openclaw#200181); 0b2ad60 chore(postgres): cover compaction watched-session prompts (openclaw#200117); b90c573 test: consolidate redundant coverage (198795 recut) (openclaw#198943); a042363 test: consolidate redundant coverage (198793, part 2) (openclaw#198936); 9bfad2b test: consolidate suites while retaining recovery owners (openclaw#198933); 4e9812c test: consolidate redundant coverage (198789, part 2) (openclaw#198932); 90814f5 fix(subagents): stops a finished sub-agent's chat being deleted before its parent reads the result; 799bc0b fix(ci): stabilize hourly fixtures and retire unused exports (openclaw#199851); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); a4cc2ad fix: undo cold-session compaction CPU and latency regressions (openclaw#199561); 55fec79 fix(agents): stop divergent mid-turn overflow recovery (openclaw#199636); 2c4413a fix: reduce Gateway stalls under filesystem pressure (openclaw#197510); 37d977f fix: output reducers are skipped in headless and Code Mode runs (openclaw#199434); c9ee264 fix(compaction): concurrent sessions wait for each other's summaries during compaction (openclaw#196550); 2471ddc feat: let agents review generated images before delivery (openclaw#198227); 21f7dc6 fix(github): publication fails with PostgreSQL session or state stores (openclaw#193749); 63d9e57 fix(ci): new PostgreSQL suites are omitted from conformance (openclaw#198390); 466a4b6 fix(telegram): steered answers quote the wrong input (openclaw#178124); 87b6f52 fix(delivery): resend routed Telegram finals after an ambiguous network failure (openclaw#192779); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); cff99b2 fix(agents): keep provider history append-only across runs (openclaw#197874); 8a328bf feat: add an opt-in usage-ranked tool index (openclaw#197128); 097e648 fix(ci): plan only executable infra tests (openclaw#197911); 76385fd fix(models): discovered models become "Unknown model" after restart or an ended sign-in (openclaw#197784); 89d4177 fix(plugin-state): guarded calls fail until Gateway restart after an unknown write outcome (openclaw#197790); baca36e fix(sessions): commit selected invitations with original messages (openclaw#184512); 699e538 fix(sessions): drain passive notices on sessions_send resumes; d6ded18 chore(ci): drop retired test-lines allocation records (2/3) (openclaw#197656); e0dd020 fix(agents): collect process results at suspended-run capacity; 4897740 feat(auth): preserve delegated OCE user profiles and permissions (openclaw#196856); 7197ce1 feat(templates): install bundled plugins through native management (openclaw#196349); 9c6ee9b feat: let Template automations start paused for onboarding (openclaw#196323); 79a6214 fix(message): retain local final replies in conversation history (openclaw#187795); caa978c feat(templates): open durable chat before verified setup (openclaw#196392); 78e73aa fix(sessions): cold PostgreSQL conversations fail after idle readers close (openclaw#189991); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682); 1595dd2 feat(plugins): reauthorize accepted session work (openclaw#176886); b43ad0a fix(models): avoid reloading plugins on catalog refresh (openclaw#193903); 0947d02 fix(ci): avoid unrelated PostgreSQL runs and admit owned tests (openclaw#193870); 428ca7d feat(openclaw-id): add Gateway membership authority and publication behind the Labs flag (openclaw#192335); c718583 fix(update): repair refuses forever after a verified update fails a later step (openclaw#193132); 3f64174 fix: deliver background replies after a reload retires the turn registry (openclaw#193130); 982f3b1 fix(imessage): report Automation failures after Gateway updates (openclaw#186117); 31b28e9 fix(agents): wait for a peer OAuth refresh before failing request auth (openclaw#192906); cf50d4a feat(storage): support read-only PostgreSQL standby inspection (openclaw#192645); 82fd4e6 fix(agents): retain stale session target refusal reasons (openclaw#192681); 8ac4e19 fix(worktrees): reserve capacity on PostgreSQL (openclaw#192537); 718b349 fix: reduce session startup stalls under storage contention; 08f4a19 refactor(skills): move Skill Workshop into its bundled plugin (openclaw#192471); 837402a fix(clawrouter): keep upstream credit failures off the shared key (openclaw#192575); f38495f fix(plugins): reject late routing from canceled runs (openclaw#192492); dc5d61a improve(sessions): reduce unnecessary maintenance query rows (openclaw#192023); c4bf0dc fix(sessions): avoid extra maintenance scans for embedded archives (openclaw#184507); e44b3d6 fix(team-reports): recover after database connection loss (openclaw#192020); 991fb33 fix(logbook): recover after database connection loss (openclaw#192011); e6d0d2e fix(test): include omitted PostgreSQL conformance suites (openclaw#191962); da5ff0f fix(codex): reject native hooks from a previous run (openclaw#191788); 09f0b0b feat(plugins): add skill usage runtime for plugins (openclaw#191661); 00b2ff4 fix: parent sessions miss child approvals with a custom session store (openclaw#189827); be44b10 fix: stop completed session writes retaining request data (openclaw#191197); d40aa7c fix(sessions): replay creation requests across Gateway restarts (openclaw#190862); d894035 fix: await Doctor shared-state repair preparation (openclaw#190875); b515cc7 feat: fork threaded conversations with Telegram support (openclaw#190783); def6349 feat(plugins): plugins can run a hidden forked turn of a session with their own tools (openclaw#190950); d983e34 feat(plugins): plugin commands can continue the agent with a replacement prompt, on every channel (openclaw#190908); ea3f0b8 fix(ci): provision Node test prerequisites and retain Baseten routing (openclaw#191050); 29503e1 fix(update): Gateway stays stopped after the updater process dies mid-update (openclaw#188497); fc8c2d0 fix(update): preserve unfinished handoff artifacts (openclaw#190571); 7c26e8c fix(ci): cover PostgreSQL managed update handoffs (openclaw#190336); 4913d41 fix(ci): prevent truncated PostgreSQL target listings (openclaw#189509); 8925f62 fix(gateway): start restored PostgreSQL homes on the first attempt (openclaw#190291); 177fe32 feat(models): preserve inference capabilities in opt-in catalog v3 (openclaw#189678); 7faf32d feat: retain repository disk authority through recovery (openclaw#189106); a658df3 feat(database): capture externally quiesced SQLite migrations; 0f9e7f7 feat(database): capture exact SQLite migration capsules; 4fb684e feat(backup): add PostgreSQL local companion checkpoints; c89a101 fix(doctor): migrate auth profiles on PostgreSQL stores (openclaw#189639); 799de09 fix(ci): split oversized workspace and setup files (openclaw#189356); 21ee847 fix(acp): keep completed run conversations resumable (openclaw#189273); fce0e56 perf(sessions): open cold history without restoring archives (schema 39) (openclaw#188397) Validation: Baseline1 NUL-binding assertion failure/21passing; candidate22/22passes (188693-green.log). Real SQLite Doctor path and generated SQL proved; no native PostgreSQL server execution claimed. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 0895146d8c1493146f5c6461eee0b10c329bdd1e) (cherry picked from commit f8ccaa70bc9773d6bbb569bc0e275eee0c544ead)
Related: #178719
What Problem This Solves
Fixes: Messages Automation send failures leave the iMessage account green, with no recovery guidance, when a Gateway reply uses AppleScript text, attachment delivery, or the auto fallback.
User Impact
Failed sends report the affected account and Messages Automation recovery steps. A successful send clears that warning; a successful read probe does not. Delivery error identity and classification are preserved.
Limitations: This does not preserve TCC grants across upgrades. Signed macOS upgrade testing was not available.
Why This Change Was Made
Ordinary sends and native attachment actions now share the existing account-warning publisher. The RPC-only publication and duplicated RPC error-message augmentation were removed. Successful ordinary and native message completion clear only a matching Automation warning, not unrelated watcher errors. No options, permissions, runtime identities, or automatic resend behavior changed.
Evidence
User-friendly wording update — November 4
The warnings now lead with plain-language explanations and concrete steps: open Messages, approve any permission prompt, and quit/reopen the app if frozen. Permission-denied errors explain that OpenClaw needs permission to control Messages. Both retain Automation settings guidance, the current
bunentry for app-managed Gateways, and the reminder to check delivery and queued replies before retrying. The original AppleScript diagnostic is retained at the end so successful-send warning clearing remains unchanged.Copy-only follow-up: 8 lines added / 8 removed in
process-diagnostics.ts; no changes to matching, sending, or retry behavior. Checked both generated messages, re-recognition of each normalized warning, unrelated-error rejection, and the error-code boundary with a focused Node check of the source function. Formatting andgit diff --checkpass. The targeted lint wrapper could not start its package-boundary preparation because this older checkout expects atypescript/fsexport absent from the available dependency installation. Full plugin and live macOS tests were not rerun for this copy-only update; the captures below remain evidence from the explicitly named earlier heads.Fault-injected imsg on Linux: real shipped Gateway, real iMessage plugin, and real process spawn. The executable emits the exact imsg v0.17.0 Automation diagnostic and exits non-zero. This is not real Messages/TCC testing. RED and GREEN used fresh isolated HOME/state/config paths, separate free ports, and identical stand-in/media bytes. The live Gateway was not touched.
Server and client entry points (targets, paths, ports, and hosts redacted):
The following are recorded account-status projections from CLI JSON;
probeOkis the returned probe'sokfield. Long recovery text is explicitly truncated after the System Settings destination. Full captured responses remain in the proof folders.Captured recovery guidance (identical on both GREEN paths):
RED — f9c2f84
The baseline preserves the already-working RPC warning; its attachment failure reproduces the green/no-warning defect.
GREEN — 3d0c4db
Successful-send control
Both heads returned these same failure classifications:
{ "rpc": { "exit": 1, "code": "UNAVAILABLE", "deliveryCode": "OUTBOUND_DELIVERY_QUEUED", "retryable": false, "nativeDisposition": "not_started", "nativeRetrySafe": true }, "attachment": { "exit": 1, "code": "UNAVAILABLE", "deliveryCode": "OUTBOUND_DELIVERY_QUEUED", "retryable": false, "nativeDisposition": null, "nativeRetrySafe": null } }Tests and gates
f9c2f84:node scripts/run-vitest.mjs --config test/vitest/vitest.extension-database-workers.config.ts extensions/imessage/src/send.test.ts --maxWorkers=1 -t "reports .* Automation errors"— 2 failed / 36 skipped, both on the absent account-warning patch. Exact baseline production blobs were replayed with the committed regression; candidate bytes were restored and hash-verified. Both cases retained the original Error class/text before the warning assertion.send.test.tssuite without the name filter — 38 passed, including applescript and auto local attachment subprocesses, normalized account IDwork, unchanged CLI rejection, exact native arguments, and no RPC fallback; 83.60 s Vitest wall time.pnpm test:extension imessage --maxWorkers=1— 823 passed in 59 files, 305.52 s Vitest wall time. The final assertion/cleanup refinements were then covered by the 38-test send-suite rerun above.node scripts/run-tsgo.mjs -p .openclaw/tmp/tsconfig.imessage.json --incremental— passed. The scoped config extendsextensions/tsconfig.jsonand includes all iMessage production/test/support files and canonical ambient declarations.node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json <7 changed TypeScript files>andpnpm exec oxfmt --check <same files>— passed.node scripts/lib/plugin-npm-runtime-build.mjs extensions/imessage— 13 runtime entries built, passed.node --import ./scripts/tsx.mjs scripts/check-test-lines-ratchet.mts --base a0a998b8 --no-merge-base— passed: 6,285,650 test lines, ceiling 6,285,000, net delta 0. Existing ceiling pressure is 650 lines; this PR no longer adds to it. No ceiling/baseline changes.git diff --check a0a998b8f4748489e041e14f95917b1f46e94b64 HEAD— passed.d30362dCI failedchecks-fast-baseline-ratchets: 6,286,277 / ceiling 6,285,587, including 570 lines of base pressure plus this PR's +120. The consolidation above repairs the PR growth instead of raising the ceiling. Final-head CI results are separate from these local gates.Production delta +107/-7; test delta +53/-53; documentation +11/-0, against
a0a998b8. The shared account-warning publisher replaces RPC-only publication and duplicate RPC message decoration. Added mock-Gateway scaffolding was removed in favor of shipped-Gateway proof; the existing real-CLI rejection regression now covers both transports. Original boundary assertions remain or are strengthened to exactly-once-with-arguments assertions.Proof captures:
.openclaw/tmp/p178719/red/and.openclaw/tmp/p178719/green-final/; raw CLI responses are in eachcapture/, withobservations.json,binding.json, and cleanup receipts. Config/state credentials are not published.Merge risk: account-status reporting only; delivery and retry classifications remain unchanged. The proof boundary is fault-injected imsg, not macOS permission continuity.
Contributor credit: @anmol0b.
Work sessions
Worked on by