Skip to content

Refactor native approval route gates#87413

Closed
RomneyDa wants to merge 2 commits into
mainfrom
codex/cleanup-native-approval-builder
Closed

Refactor native approval route gates#87413
RomneyDa wants to merge 2 commits into
mainfrom
codex/cleanup-native-approval-builder

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

Refactors the duplicated native approval route-gate logic for WhatsApp, Signal, and iMessage into a shared Plugin SDK helper, then wires each channel plugin through that helper.

  • Adds createNativeApprovalChannelRouteGates to openclaw/plugin-sdk/approval-native-runtime.
  • Keeps channel-specific account resolution, target normalization, group-origin restrictions, prompt rendering, and Signal local prompt suppression in the owning plugins.
  • Reuses the existing shared forwarding fallback suppressor for iMessage.
  • Updates the Plugin SDK API baseline hash for the new public helper export.

Verification

  • node scripts/run-vitest.mjs extensions/whatsapp/src/approval-native.test.ts extensions/signal/src/approval-native.test.ts extensions/imessage/src/approval-native.test.ts extensions/whatsapp/src/approval-handler.runtime.test.ts extensions/signal/src/approval-handler.runtime.test.ts extensions/imessage/src/approval-handler.runtime.test.ts
  • pnpm build
  • pnpm plugin-sdk:api:check
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local

Real Behavior Proof

Behavior addressed: Native approval route-gate cleanup for WhatsApp, Signal, and iMessage without changing channel-specific approval policy defaults.
Real environment tested: Local macOS worktree on branch codex/cleanup-native-approval-builder.
Exact steps or command run after this patch: The six targeted approval Vitest files, full pnpm build, Plugin SDK API baseline check, diff whitespace check, and local autoreview.
Evidence after fix: Targeted approval tests passed with 6 files and 63 tests; pnpm build completed and reported Plugin SDK exports verified; pnpm plugin-sdk:api:check reported the generated baseline hash OK; autoreview reported no accepted/actionable findings.
Observed result after fix: Approval route handling remains covered across WhatsApp, Signal, and iMessage while the duplicated plugin-local gate code is removed.
What was not tested: No live channel delivery was exercised; this was validated with the existing focused unit/runtime tests and build/API gates.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: whatsapp-web Channel integration: whatsapp-web size: XL maintainer Maintainer-authored PR labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 29, 2026, 1:12 AM ET / 05:12 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source -409, Docs +1, Generated 0. Total -408 across 8 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Result: rating does not apply to this item.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

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

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 98611e62728e.

Label changes

Label changes:

  • remove P2: Current review triage priority is none.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 message-delivery: Current PR review selected no merge-risk labels.

Label justifications:

  • rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed

PR surface:

Source -409, Docs +1, Generated 0. Total -408 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 5 402 811 -409
Tests 0 0 0 0
Docs 2 2 1 +1
Config 0 0 0 0
Generated 1 2 2 0
Other 0 0 0 0
Total 8 406 814 -408

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added 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. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🥚 common Frosted Test Hopper

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: stacks clean commits.
Image traits: location proof lagoon; accessory rollback rope; palette seafoam, black, and opal; mood sparkly; pose stepping out of a freshly hatched shell; shell frosted glass shell; lighting clean product lighting; background miniature CI buoys.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Frosted Test Hopper in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@RomneyDa RomneyDa closed this May 27, 2026
@RomneyDa RomneyDa reopened this May 27, 2026
@RomneyDa RomneyDa marked this pull request as draft May 27, 2026 21:23
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

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. labels May 27, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

Leaving in draft since it's touchy stuff and @kevinlin-openai is working on this

@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. 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 May 29, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

Kevin picked this up #87770

@RomneyDa RomneyDa closed this May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: whatsapp-web Channel integration: whatsapp-web docs Improvements or additions to documentation maintainer Maintainer-authored PR 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. P2 Normal backlog priority with limited blast radius. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant