Repository navigation
fix: keep connected apps tied to approving ID membership - #196276
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review the current head, including original ID admission across connected-app approvals, transitive approvals, live bindings and restored work, while preserving independent local roles and approvals. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR binds connected-app approvals to the original OpenClaw ID membership across delegated approvals, active access, and restored work. Example: The relay-member account approves an app while its profile also has a local admin role, then its ID membership is removed.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a concrete authorization-lifetime bug and remains worth merging; no actionable source defects were found, and the new evidence resolves the previous final-effect and rollout concerns. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherMCP relay stores app consent and supplies principals to Gateway ingress; core combines those principals with live membership, profile, role, and grant authority before RPC, browser access, and retained effects. flowchart TD
A[Authenticated ID caller] --> B[Core admission capture]
B --> C[Relay grant store]
C --> D[Live binding or recovery]
E[Membership authority] --> D
D --> F[Gateway RPC and browser]
D --> G[Retained execution and final effects]
Technical reviewBest possible solution: Retain the original admission in local consent and reuse core membership checks throughout live and restored execution, with the documented revoke/reapprove preview rollout. Do we have a high-confidence way to reproduce the issue? Current-main source loses the approving membership in relayCaller, and the supplied base regression reports successful app RPC after signed member removal; this read-only review did not execute target code. Is this the best way to solve the issue? The patch restores the missing authority link at consent capture and composes the existing membership owner into live and restored access without introducing a competing membership manager. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d7f88abfaacf. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +197, Tests +454, Docs +25, Other +2. Total +678 across 20 files. Added test files: 2. 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. Review metrics
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 9, 2026, 5:18 PM ET / 22:18 UTC (Revision 2). |
|
@clawsweeper re-review The current head is unchanged. The PR body now includes the completed live/restored final-effect proof and selected runtime output: both prepared writes reached filesystem admission before signed membership removal and resumed afterward; original bytes were preserved and restored execution refused before I/O. Allowed controls passed, the app owner stayed active, and an independent approval remained usable. Please reassess the final-effect attention item against that evidence. The body also clarifies the agreed internal-preview rollout and the existing owner/person store-reload proof. A latest-stable migration is outside the maintainer-selected scope; no schema or configuration fields change. Full process-restart and deployed-service qualification remain explicit limits. |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Connected apps approved through OpenClaw ID can outlive the approving membership when the same person also has a local Gateway role.
User Impact
New ID-origin app approvals stay tied to the original membership and approving device listing. Removing that member or key ends the app’s access and retained work, including approvals made through that app. Independent local roles and approvals through other sign-in paths keep their own lifetimes.
Before rollout, revoke and reapprove any older ID-origin grants that lack this binding; their original sign-in source cannot be inferred from the stored profile. No live grants or service settings were changed for this PR.
Why This Change Was Made
Core captures the authenticated caller’s original admission and checks it through the existing membership authority when binding or restoring a grant. MCP relay preserves that opaque source locally without exposing it in relay metadata or display replies. The same binding supplies RPC, browser, and retained-work authority, while normal profile and named-role checks remain in force.
This adds no membership manager, removal hook, SDK subpath, or UI change. Production code grows by 197 lines; the exact 454-line regression allocation covers signed removal, transitive and independent approvals, restored source checks, and grant-state reloads.
Evidence
tool invocation authority is no longer active, fresh restore was refused, and the independent person app remained usable. The app owner stayed active and the removal receipt reportedrunsCancelled: 0. One test passed (7.98 seconds test time; 20.69 seconds with the prepared runner).abe2e7af7a82b38f522478cf73522d622926bf63, covering the complete candidate committed as78b4d953dbd8985eba02bea7d3f112b987c53056, reportedscoped-cleanat P0–P2 with no actionable findings. The reviewer assessed the supplied diff and owner context without executing project tests. Local ClawSweeper was unavailable. Hosted ClawSweeper follow-up reviewed the same head against maind7f88abfaacfab0cecdf064c98853bf6be3ea3b1, accepted the live/restored final-effect evidence and preview rollout, and reported no findings or remaining before-merge requests. The review run completed successfully. It did not execute target code.Selected output from the final-effect proof (synthetic fixtures; identifiers omitted):
{ "realAgentPositiveWrite": true, "liveParsedWriteReachedFilesystemAdmission": true, "restoredSerializedRealRunSnapshot": true, "restoredPositiveWrite": true, "restoredPreparedWriteReachedFilesystemAdmission": true, "signedRemovalPersistedBeforeResumption": true, "appOwnerStillActive": true, "liveOriginalBytesPreserved": true, "restoredOriginalBytesPreserved": true, "restoredRefusal": "Error: tool invocation authority is no longer active", "freshRestoreRefused": true, "independentPersonStillUsable": true, "removalRunsCancelled": 0 }Upgrade scope: OpenClaw ID is an internal preview with an explicit revoke/reapprove rollout for old ID-origin grants. A latest-stable migration is outside this change's agreed scope. No SQLite schema or configuration fields change. Existing owner/person grant parsing and relay identity behavior remain; the passing state suite covers their store reloads, and the new delegated grant also survives a store reload. This is store/reconstruction evidence, not a latest-stable upgrade claim.
Runtime limits: the agent proofs used direct core app binding; plugin consent and persisted grants were covered separately. Restored final-effect execution used the real host capability and reconstructed serialized app-run authority rather than a restarted agent process. Only admission timing uses an existing fs-safe test hook; the tool executor, membership owner, signed removal service, and filesystem authority guard are unmodified. The earlier provider-held proof established cancellation and queue withdrawal; the additional proof reaches filesystem admission before removal and resumes after removal. No deployed Gateway, Discovery, live OIDC, QUIC, or full process-restart proof. Recovery coverage recreates and hydrates the authority and reloads serialized grants; it does not claim a deployed restart.