Repository navigation
fix(ios): approval alerts retain an earlier ID role - #200360
Conversation
|
🦞👀 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 applies current OpenClaw ID permissions to iOS approval alerts and saves native device attribution before approving access. Example: An ID member is downgraded from approval access to operator.read while retaining a historical admin token.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current authorization mismatch in iOS approval notifications; no actionable patch defects were found, and the remaining failed CI gate matches an inherited Windows failure. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway approval delivery takes pending approval records, resolves paired iOS recipients against current identity and session policy, and sends alerts or cleanup notifications through direct APNs or its relay. flowchart TD
A[Pending approval record] --> B[iOS delivery owner]
C[Pairing and ID membership] --> D[Current approval visibility]
E[Profile and session facts] --> D
B --> D
D --> F[APNs transport]
F --> G[iOS notification]
B --> H[Cleanup notification]
Technical reviewBest possible solution: Keep current ID authorization in the iOS delivery adapter, record attribution before granting access, and preserve independent local grants and cleanup delivery. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the stale-token recipient path, and the submitted compiled-Gateway replay demonstrates the corrected downgrade behavior; no target code was executed during this review. Is this the best way to solve the issue? The patch uses existing identity, pairing, profile, and session owners, removes caller-side visibility plumbing, and keeps the APNs-specific adaptation in one place. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f57dbb4ff67e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +171, Tests +278, Docs +7, Other -1. Total +455 across 16 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel 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 November 16, 2026, 10:00 PM ET / November 17, 2026, 03:00 UTC (Revision 2). |
|
@clawsweeper re-review The Evidence section now includes the requested redacted compiled-Gateway receipt: the six observed relay sends, current member authority, the full pending lifetime, expiry cleanup, and independent verification results. Runtime source remains unchanged; the follow-up only retires the obsolete assertion-baseline entry. |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* fix(ios): use current ID policy for approval alerts * chore: retire the removed approval assertion allowance
* fix(ios): use current ID policy for approval alerts * chore: retire the removed approval assertion allowance (cherry picked from commit ff2cb7e) Companion audit: iOS notification authority now uses existing profile, device and session owners; paired-device binding precedes granting. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 01f9690a9039d47488fdee5e382de412db3add37)
What Problem This Solves
Fixes iOS approval notifications continuing to use an earlier OpenClaw ID role after the member's access changes.
User Impact
New approval alerts follow current ID membership, permissions, and request visibility. Separately paired local devices keep their local permissions, and cleanup notifications can still dismiss earlier prompts. No new configuration is required. Earlier preview native pairings without ID attribution must be removed and paired again through OpenClaw ID before reuse; existing local approvals are not reassigned automatically.
Why This Change Was Made
The iOS delivery owner now evaluates the complete approval record using current pairing, membership, and session facts, then checks again when the push provider starts. Native operator pairing saves ID attribution before installing its approval, including tokenless connections.
If saving attribution succeeds but a same-key ID regrant later fails, that device can remain bound to ID and require owner recovery. This conservative outcome does not grant additional access; unchanged local reconnects are unaffected.
Evidence
21064fa8dfbff9de64014d5864385d7c8c140413removes that one entry; the assertion guard passes in the isolated VM (2,363 files, 5,348 grandfathered assertions). Runtime source is unchanged from the compiled replay below.910f6b9427d7550a1d8607f25946d7f5ec4e0014completed with no actionable P0–P2 findings. The review noted limits around unchanged binding and provider internals; a separate independent source review covered those owners.pnpm build:runtimepassed for commit526e2190718e4cbb87a5041cdfa40b03d1cd7b39, with zero source overrides and matching source inventories before/after.Redacted compiled-Gateway replay receipt
This excerpt comes from the frozen replay receipt, captured relay HTTP requests, and independent export-verifier result. Request and recipient identifiers use consistent aliases; keys, signatures, device/account identifiers, endpoints, and command content are omitted. The six events below are the actual observed send sequence. The post-change request expired normally after its complete 15-second pending lifetime.
{ "build": { "version": "2026.11.4", "commit": "526e2190718e4cbb87a5041cdfa40b03d1cd7b39", "builtAt": "2026-11-17T00:39:50.181Z", "buildId": "ios-approval-526e2190718e" }, "manualStateInjection": false, "sourceOverrides": 0, "observedSignedRelaySends": [ { "request": "before-role-change", "recipient": "independent local device", "pushType": "alert", "kind": "plugin.approval.requested" }, { "request": "before-role-change", "recipient": "ID member", "pushType": "alert", "kind": "plugin.approval.requested" }, { "request": "before-role-change", "recipient": "independent local device", "pushType": "background", "kind": "plugin.approval.resolved" }, { "request": "before-role-change", "recipient": "ID member", "pushType": "background", "kind": "plugin.approval.resolved" }, { "request": "after-role-change", "recipient": "independent local device", "pushType": "alert", "kind": "plugin.approval.requested" }, { "request": "after-role-change", "recipient": "independent local device", "pushType": "background", "kind": "plugin.approval.resolved" } ], "currentAuthority": { "originalSocketClosed": true, "freshMemberScopes": [ "operator.read" ], "approvalListRefused": "FORBIDDEN" }, "postDowngrade": { "pendingLifetimeMs": 15000, "terminalReason": "timeout", "entirePendingLifetimeJoined": true, "memberAlertCountThroughFinalShutdown": 0 }, "independentVerification": { "independentlyVerifiedSignedSends": 6, "historicalAdminTokenRetained": true, "linkedLocalAdminRoleRetained": true, "compiledEntries": 34168, "compiledUnchanged": true, "cleanupJoined": true, "gracefulProcessShutdown": false } }cleanupJoinedrecords that all fixture processes were joined. The relay exited after the requested SIGTERM, sogracefulProcessShutdownremains false. No physical-device or Apple APNs delivery is claimed.Hosted CI: the Windows lifecycle shard fails the same 17 tests as scheduled main CI, with the same spawn-broker
EEXISTstartup error. The APNs portion of that shard passed all 64 tests. This pre-existing failure remains visible.No live services were changed. Physical iOS, Apple APNs, hosted relay, installed-package, and deployed-service validation remain outside this local qualification.