Skip to content

fix(gateway): route system-agent approvals off the exec channel bus - #118960

Closed
harjothkhara wants to merge 1 commit into
openclaw:mainfrom
harjothkhara:fix/system-agent-approval-kind
Closed

harjothkhara wants to merge 1 commit into
openclaw:mainfrom
harjothkhara:fix/system-agent-approval-kind

Conversation

@harjothkhara

@harjothkhara harjothkhara commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Refs: #118899

What Problem This Solves

The OpenClaw macOS app can miss system-agent approval prompts from the Gateway even though it implements the system-agent approval handler.

Why This Change Was Made

Adds the macOS app's stable client ID to the system-agent approval recipient audience. iOS and Android remain exec-only because they do not handle this event; channel publication is unchanged.

User Impact

After this change, the macOS app can receive system-agent approval requests through its existing Gateway handler instead of silently missing them because recipient selection excluded the app.

Evidence

Current main already fixes the original exec/plugin-only bus mislabeling: system-agent approvals have an explicit kind, and Telegram and Discord subscribe to it. This PR addresses the remaining macOS recipient-selection gap: the app handles openclaw.approval.requested as system-agent, but its stable client ID was excluded from the recipient audience.

  • Exact head: feb5da209114a961f79190153a767f8a48c58a4a
  • Current-main parent: 9491d5a5a3372a04416e0317f3040c41bad670d5
  • Exact-file oxfmt --check, exact-file oxlint, and git diff --check HEAD^ HEAD: passed.
  • Focused local test attempt exited 137 during compiled-subprocess bootstrap before tests executed; GitHub Actions is authoritative for the current-head test run.
  • A real macOS run is still needed to show the current Gateway delivering a system-agent approval to the app and the app resolving it. No paired macOS node is available on this Linux host; a redacted app diagnostic trace or recording is sufficient.

AI assistance: Codex reconciled the historical branch with the current three-kind approval architecture.

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 3, 2026
@harjothkhara
harjothkhara marked this pull request as ready for review August 3, 2026 20:52
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

The PR adds the macOS app to system-agent approval recipients while preserving channel publication and other approval audiences.

Example: An authorized openclaw-macos connection receives a pending system-agent configuration approval.

  • Before: Recipient selection excludes the app despite its existing openclaw.approval.requested handler.
  • After: The app becomes eligible to receive the request through the existing approval delivery path.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused repair is coherent and has no discrete code finding; overall readiness follows the proof tier.
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: The macOS app silently misses system-agent approval prompts despite implementing their presentation and resolution.
Reason: Restoring delivery to an existing compatible presenter has clear value and adds no configuration or permission surface.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open: it contains a distinct macOS approval-routing repair still absent from current main, and unresolved same-author companion work triggers the keep-open guard.

Priority: P2
Reviewed head: feb5da209114a961f79190153a767f8a48c58a4a

Before merge

  • Add real behavior proof - The full body and discussion supply no after-fix macOS run receiving and resolving a system-agent approval; provide a recording, terminal screenshot, redacted diagnostic logs, or live output, removing IPs, API keys, phone numbers, and non-public endpoints. 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.
  • Complete next step - Resolve GitHub's reported merge conflict against main while preserving current approval routing.

Findings

None.

Tests

  • Missing end-to-end proof: Supply an after-fix macOS delivery-and-resolution run; the extended recipient regression has not been demonstrated failing on the base and passing on the head.
Agent review details

How this fits together

The Gateway selects connected approval presenters, filters requests by visibility, and sends operator decisions to the canonical approval resolver.

flowchart TD
  A[System agent proposal] --> B[Gateway approval manager]
  B --> C[Recipient eligibility and visibility]
  C --> D[macOS approval presenter]
  D --> E[Gateway decision resolver]
  E --> F[Apply or deny proposal]
Loading

Technical review

Best possible solution:

Deliver system-agent requests to the existing compatible macOS presenter through the canonical Gateway routing and authorization owners.

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

Source establishes the exclusion: macOS has a system-agent handler, lacks generic approval capability, and current main admits its stable ID only for exec approvals; no native run was performed.

Is this the best way to solve the issue?

The narrow eligibility change matches the existing native handler and preserves shared delivery, visibility, and resolution ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Kind-aware approval recipient selection keeps the original intent (6869459: Separate approval permission from actual presentation capability so unavailable routes do not leave exec requests waiting.)
  • macOS system-agent approval support keeps the original intent (b1f4aac: System-agent delegation added durable human approvals and a native macOS handler for their requested event and resolver.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

PR surface

Source +8, Tests +6. Total +14 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 9 1 +8
Tests 1 8 2 +6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 17 3 +14

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The change repairs a bounded native approval-delivery gap while other operator approval surfaces remain available.
  • 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.

  • Attach a redacted macOS trace or recording showing the request arriving and an operator decision resolving through the Gateway.

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 (5 earlier review cycles)
  • reviewed 2026-09-08T19:04:09.455Z sha 15999e587d16188795606953854a09ed9caf0454 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T07:02:53.662Z sha 15999e587d16188795606953854a09ed9caf0454 :: needs real behavior proof before merge. :: [P1] Preserve system-agent publication to native channel subscribers
  • reviewed 2026-09-28T00:24:18.513Z sha feb5da2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-28T16:17:17.602Z sha feb5da2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-02T20:29:09.508Z sha feb5da2 :: needs real behavior proof before merge. :: none

Reviewed October 17, 2026, 1:53 PM ET / 17:53 UTC (Revision 6).

@harjothkhara
harjothkhara force-pushed the fix/system-agent-approval-kind branch from b63af82 to ad7438e Compare August 3, 2026 21:51
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. and removed P2 Normal backlog priority with limited blast radius. labels Aug 3, 2026
@harjothkhara
harjothkhara force-pushed the fix/system-agent-approval-kind branch from ad7438e to 7e808bb Compare August 3, 2026 22:14
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 3, 2026
@harjothkhara
harjothkhara force-pushed the fix/system-agent-approval-kind branch from 7e808bb to adfa208 Compare August 3, 2026 22:27
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 3, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 4, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 5, 2026
@clawsweeper clawsweeper Bot 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. labels Aug 21, 2026
@harjothkhara
harjothkhara force-pushed the fix/system-agent-approval-kind branch from 473a713 to 6ab42b9 Compare August 21, 2026 21:43
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 21, 2026
@harjothkhara
harjothkhara force-pushed the fix/system-agent-approval-kind branch from 6ab42b9 to 15999e5 Compare August 26, 2026 23:12
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 26, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. P2 Normal backlog priority with limited blast radius. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: sufficient ClawSweeper judged the real behavior proof convincing. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 5, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P2 Normal backlog priority with limited blast radius. labels Sep 27, 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

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #clawtributors on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS stale Marked as stale due to inactivity 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.

1 participant