Skip to content

fix(imessage): stop routing benign Apple framework stderr to ERROR - #156334

Merged
altaywtf merged 3 commits into
openclaw:mainfrom
Olli0103:fix/imsg-benign-apple-stderr
Sep 27, 2026
Merged

altaywtf merged 3 commits into
openclaw:mainfrom
Olli0103:fix/imsg-benign-apple-stderr

Conversation

@Olli0103

@Olli0103 Olli0103 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #119282

What Problem This Solves

Healthy iMessage bridges report a benign Apple Contacts reconciliation message as an error, flooding normal logs.

User Impact

That documented message moves to verbose logging. Genuine failures—including errors containing the Contacts sentence—remain visible at ERROR, with Full Disk Access recovery guidance preserved.

Why This Change Was Made

Match the complete diagnostic, allowing its observed timestamp and process prefix. Other Apple framework messages keep their error level.

Evidence

  • Regression coverage checks bare and timestamped diagnostics, genuine errors before and after the Contacts sentence, and stderr from a real child process.
  • The contributor also tested a wrapper invoking real imsg rpc --json with imsg 0.15.6: the documented diagnostic logged verbose; a separate CoreData error logged ERROR. No live macOS account was used for the maintainer's follow-up proof.
  • Cloudflare: pnpm test extensions/imessage/src/client.test.ts --maxWorkers=1 passed 35 tests in 4.181 s wall time (2.02 s Vitest duration). The client and QA catalog suites passed all 80 tests in 9.85 s together.
  • Source-selected changed checks passed, including extension types, test types, lint, formatting, and dependency boundaries. Prefix/suffix error controls fail with the original matcher.
  • CI passed all 35 client tests. Their containing shard passed 14 files in 24.90 s wall time (23.37 s Vitest duration); this is the shard cost, not a separate client-file measurement.

@clawsweeper

clawsweeper Bot commented Sep 23, 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 channel: imessage Channel integration: imessage size: S labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. 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. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 7:50 AM ET / 11:50 UTC (Revision 9).

ClawSweeper review

What this changes

The iMessage plugin now logs the documented Apple Contacts reconciliation line at verbose level while retaining ERROR logging for other helper-process stderr, with regression coverage.

Merge readiness

✅ Ready for maintainer review

Current main still logs the reported benign iMessage diagnostic at ERROR. The earlier proposed fix closed without merging; this PR remains a useful candidate, and the prior line-matching findings are resolved on the reviewed head.

Priority: P2
Reviewed head: bb46e6bf89fbf2006ddd24056c2acb1032b55146

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow plugin fix has relevant after-fix behavior evidence and regression controls, with no remaining actionable finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The changed iMessage child-stderr handler is exercised by the contributor’s reported after-fix wrapper run with real imsg 0.15.6: the documented line logged at verbose and a separate CoreData error at ERROR. The spawned-child regression test supplements that report; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed iMessage child-stderr handler is exercised by the contributor’s reported after-fix wrapper run with real imsg 0.15.6: the documented line logged at verbose and a separate CoreData error at ERROR. The spawned-child regression test supplements that report; no stored-data contract changes.
Evidence reviewed 7 items Current main still has the reported behavior: The current main handler records each nonempty stderr line and sends it to runtime.error without classification.
Introduced classification: The pinned merge-base-to-head diff adds a complete-line Contacts pattern and preserves diagnostic recording before selecting verbose or ERROR logging.
Regression controls: New cases cover the bare and timestamped diagnostic, unrelated framework errors, errors surrounding the exact sentence, and a spawned child emitting both classes.
Findings None None.
Security None None.

How this fits together

The iMessage plugin starts the external imsg RPC helper and reads its output. RPC responses serve channel operations, while stderr becomes Gateway diagnostics.

flowchart LR
  A[iMessage channel] --> B[imsg RPC helper]
  B --> C[stdout responses]
  B --> D[stderr lines]
  D --> E{Exact Contacts diagnostic?}
  E -->|Yes| F[Verbose log]
  E -->|No| G[ERROR log]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +11, Tests +93. Total +104 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 1 +11
Tests 1 93 0 +93
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 105 1 +104

Review metrics

Metric Value Why it matters
Production versus test growth production +11 net lines; tests +93 lines The small runtime change has focused positive, negative, and child-process regression coverage.
Focused test cost 35 tests; 4.181 s wall reported The PR body records the per-file cost required for newly changed tests.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #119282
Summary: This PR is the candidate fix for the open report; the older report describes the same logging noise, and its proposed PR closed without merging.

Members:

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

Technical review

Best possible solution:

Keep diagnostic classification in the iMessage RPC client, matching the complete known-benign line and retaining ERROR for every other stderr line.

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

Yes. Current main routes the reporter’s exact stderr line to ERROR, and the PR supplies a focused child-process injection path; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Matching the complete documented line at the stderr owner addresses the noise without adding a competing configuration path or downgrading other errors.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed iMessage child-stderr handler is exercised by the contributor’s reported after-fix wrapper run with real imsg 0.15.6: the documented line logged at verbose and a separate CoreData error at ERROR. The spawned-child regression test supplements that report; no stored-data contract changes.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 other: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: The fix reduces misleading operational ERROR events for affected iMessage installations without changing message delivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed iMessage child-stderr handler is exercised by the contributor’s reported after-fix wrapper run with real imsg 0.15.6: the documented line logged at verbose and a separate CoreData error at ERROR. The spawned-child regression test supplements that report; no stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed iMessage child-stderr handler is exercised by the contributor’s reported after-fix wrapper run with real imsg 0.15.6: the documented line logged at verbose and a separate CoreData error at ERROR. The spawned-child regression test supplements that report; no stored-data contract changes.

Evidence

What I checked:

  • Current main still has the reported behavior: The current main handler records each nonempty stderr line and sends it to runtime.error without classification. (extensions/imessage/src/client.ts:382, fe609d4ce1a8)
  • Introduced classification: The pinned merge-base-to-head diff adds a complete-line Contacts pattern and preserves diagnostic recording before selecting verbose or ERROR logging. (extensions/imessage/src/client.ts:389, bb46e6bf89fb)
  • Regression controls: New cases cover the bare and timestamped diagnostic, unrelated framework errors, errors surrounding the exact sentence, and a spawned child emitting both classes. (extensions/imessage/src/client.test.ts:472, bb46e6bf89fb)
  • Logging contract: The plugin SDK exports logVerbose; its implementation writes at debug when verbose or debug logging is enabled. (src/globals.ts:11, fe609d4ce1a8)
  • Contributor behavior proof: The captured PR body reports an after-fix wrapper run invoking real imsg 0.15.6: the Contacts diagnostic went to verbose and a separate CoreData error stayed at ERROR. The prior completed review recorded no findings and the PR carries proof: sufficient; no live macOS account was used. (bb46e6bf89fb)
  • Related work: The linked issue remains open. The earlier proposed PR was closed unmerged, so it does not implement the reported behavior on main.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Omar Shahine: 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 (8 earlier review cycles)
  • reviewed 2026-09-23T08:26:33.854Z sha aa3844657f040381673809abbfd256fa0a09f63e :: needs real behavior proof before merge. :: [P2] Restrict suppression to the documented reconciliation message
  • reviewed 2026-09-23T10:00:54.587Z sha 2ebb576bd308a2ea1143c7d215aa2e7dbf0d835d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-26T11:32:23.917Z sha de288fd42da0da675cc96d139e89e2b1152422c2 :: needs changes before merge. :: none
  • reviewed 2026-09-26T12:31:54.702Z sha 92e9a02e9f49d5c649db2569770599746b1f25b1 :: blocked before merge. :: [P2] Restrict the benign match to the complete stderr line
  • reviewed 2026-09-26T21:09:45.438Z sha eb7f1cc3aa26bef7c049596b813178d8581fa6f0 :: blocked before merge. :: [P2] Restrict the benign match to the complete stderr line
  • reviewed 2026-09-26T21:56:14.946Z sha f8073c648a4a7d21991f7bc8c9f429209a3db9cd :: blocked before merge. :: [P2] Restrict the benign match to the complete stderr line
  • reviewed 2026-09-27T08:21:41.955Z sha a190b76 :: blocked before merge. :: [P2] Restrict the benign match to the complete stderr line
  • reviewed 2026-09-27T10:44:14.228Z sha bb46e6b :: needs maintainer review before merge. :: none

@Olli0103

Copy link
Copy Markdown
Contributor Author

Addressed the ClawSweeper blockers on head 2ebb576bd30:

  • Matcher is now only the documented Contacts group-reconciliation line. CoreData: error: ... and other framework-name failures stay at ERROR.
  • Added a negative test plus a real-child classification test.
  • PR body now includes redacted after-fix runtime proof against imsg 0.15.6: documented line went to verbose, CoreData stayed ERROR.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 23, 2026
@altaywtf
altaywtf force-pushed the fix/imsg-benign-apple-stderr branch from 2ebb576 to de288fd Compare September 26, 2026 11:26
@altaywtf

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@altaywtf
altaywtf force-pushed the fix/imsg-benign-apple-stderr branch from de288fd to 92e9a02 Compare September 26, 2026 12:25
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 26, 2026
@altaywtf
altaywtf force-pushed the fix/imsg-benign-apple-stderr branch 2 times, most recently from eb7f1cc to f8073c6 Compare September 26, 2026 21:49
Olli0103 and others added 2 commits September 27, 2026 11:14
The imsg RPC child inherits stderr from Apple frameworks linked into its
process (AddressBook/CoreData change-history reconciliation). Those lines
are not imsg failures, yet every non-empty stderr line was routed to
runtime.error(), which inflated error counts in dashboards and watchdog
signals for any OpenClaw+imsg deployment with third-party contacts
accounts.

Route the known-benign lines to logVerbose and keep unmatched stderr at
ERROR. The Full Disk Access promotion still sees every line, because the
diagnostic record happens before the log-level decision.

Fixes openclaw#119282

Co-authored-by: Olli0103 <[email protected]>
The previous matcher treated any stderr containing ABGroup, AddressBook,
or CoreData as benign, so a real framework error could vanish from
ordinary logs. Match the complete Contacts group-reconciliation message
from openclaw#119282 and keep other framework diagnostics at ERROR.
@altaywtf
altaywtf force-pushed the fix/imsg-benign-apple-stderr branch from f8073c6 to a190b76 Compare September 27, 2026 08:15
@altaywtf

Copy link
Copy Markdown
Member

I anchored the complete Contacts diagnostic in bb46e6b and added error-prefix/suffix regression cases. Genuine errors remain at ERROR. Cloudflare passed all 35 client tests, 45 QA tests, and selected changed checks; final source autoreview found no issues. The PR body includes the measured client test cost.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 27, 2026
@altaywtf
altaywtf merged commit 5c3cb0a into openclaw:main Sep 27, 2026
125 of 126 checks passed
@altaywtf

Copy link
Copy Markdown
Member

Merged as 5c3cb0a from bb46e6b. The documented Contacts diagnostic is verbose-only; genuine surrounding errors retain their error level. Focused Cloudflare tests, selected checks, source autoreview, required CI, and ClawSweeper passed. Contributor credit is preserved.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…enclaw#156334) thanks @Olli0103

Log the documented benign Contacts diagnostic at verbose level while preserving genuine errors, including text before or after that diagnostic.

Focused Cloudflare tests, selected checks, source autoreview, current-head CI, and ClawSweeper passed.

Co-authored-by: Olli0103 <[email protected]>
Co-authored-by: Altay <[email protected]>
steipete added a commit that referenced this pull request Sep 28, 2026
Full Release Validation for 2026.9.7 (parent 36466521174) failed two
release-tooling checks that main never exercises:

- The installed-package verifier applied the 6 MiB root-dist cap to
  dist/package-update-activation-recovery.mjs, the ~66 MB sealed
  self-contained recovery helper added by #158491. Treat it like the other
  self-contained bundles (80 MiB cap, no reparse), as #155877 did for the
  sqlite-store worker. Every main-based FRV since #158491 failed here.
- plugin-npm-security-scan had no reviewed inventory for release/2026.9.7.
  Freeze the 9.6 counts, record four post-9.6 test-file-only findings
  (codex auth-refresh harness spawn, feishu proxy env test, imessage
  client test #156334, signal socket probe count after #159648) in the
  current inventory, and map release/2026.9.7 to it, as #153372 did for 9.6.
steipete added a commit that referenced this pull request Sep 28, 2026
#160717)

fix(release): admit 2026.9.7 recovery helper and plugin scan inventory

Full Release Validation for 2026.9.7 (parent 36466521174) failed two
release-tooling checks that main never exercises:

- The installed-package verifier applied the 6 MiB root-dist cap to
  dist/package-update-activation-recovery.mjs, the ~66 MB sealed
  self-contained recovery helper added by #158491. Treat it like the other
  self-contained bundles (80 MiB cap, no reparse), as #155877 did for the
  sqlite-store worker. Every main-based FRV since #158491 failed here.
- plugin-npm-security-scan had no reviewed inventory for release/2026.9.7.
  Freeze the 9.6 counts, record four post-9.6 test-file-only findings
  (codex auth-refresh harness spawn, feishu proxy env test, imessage
  client test #156334, signal socket probe count after #159648) in the
  current inventory, and map release/2026.9.7 to it, as #153372 did for 9.6.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
openclaw#160717)

fix(release): admit 2026.9.7 recovery helper and plugin scan inventory

Full Release Validation for 2026.9.7 (parent 36466521174) failed two
release-tooling checks that main never exercises:

- The installed-package verifier applied the 6 MiB root-dist cap to
  dist/package-update-activation-recovery.mjs, the ~66 MB sealed
  self-contained recovery helper added by openclaw#158491. Treat it like the other
  self-contained bundles (80 MiB cap, no reparse), as openclaw#155877 did for the
  sqlite-store worker. Every main-based FRV since openclaw#158491 failed here.
- plugin-npm-security-scan had no reviewed inventory for release/2026.9.7.
  Freeze the 9.6 counts, record four post-9.6 test-file-only findings
  (codex auth-refresh harness spawn, feishu proxy env test, imessage
  client test openclaw#156334, signal socket probe count after openclaw#159648) in the
  current inventory, and map release/2026.9.7 to it, as openclaw#153372 did for 9.6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

imsg rpc stderr still blanket-logged at ERROR — #79610 closed as completed but its fix PR #79760 never merged

2 participants