Fix iOS operator bootstrap scope diagnostics#80189
Conversation
1c9f28a to
9fc98c2
Compare
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Source inspection gives a high-confidence path: current main returns Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this direction after normal maintainer validation, keeping shared-token operator sessions full while making bootstrap/cached device-token reconnects use their approved scope contract and surface scope mismatches as pairing approval guidance. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path: current main returns Is this the best way to solve the issue? Yes. The PR fixes the reason propagation at the auth decision boundary, adds an additive protocol detail, stops retry loops, preserves valid stored tokens, and limits scope narrowing to bootstrap/cached device-token sessions rather than weakening shared-token authority. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3dd2c1a8b850. |
|
Addressed the ClawSweeper P2 findings in d50f089.
Verification after the fix:
|
138132c to
8f3984d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8f3984d to
92d697c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer validation for
Review/security gates:
Landing scope:
|
Summary
operator.adminandoperator.pairingopenclaw-mac connect --scopes ...instead of replacing them with cached bootstrap scopesAUTH_SCOPE_MISMATCHinstead of collapsing them into token mismatch diagnosticsSecurity and stability
Verification
swift test --package-path apps/macos --filter GatewayChannelConnectTestsswift test --package-path apps/shared/OpenClawKit --filter GatewayErrorsTestspnpm test ui/src/ui/gateway.node.test.ts src/gateway/server.auth.control-ui.test.ts src/gateway/server/ws-connection/auth-context.test.ts src/gateway/protocol/connect-error-details.test.ts src/infra/device-pairing.test.ts src/gateway/server/ws-connection/auth-messages.test.ts src/gateway/server/ws-connection/handshake-auth-helpers.test.tspnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/ui/gateway.ts ui/src/ui/gateway.node.test.ts src/gateway/protocol/connect-error-details.ts src/gateway/protocol/connect-error-details.test.ts src/gateway/server/ws-connection/auth-context.ts src/gateway/server/ws-connection/auth-context.test.ts src/gateway/server/ws-connection/auth-messages.ts src/gateway/server/ws-connection/auth-messages.test.ts src/gateway/server/ws-connection/handshake-auth-helpers.ts src/gateway/server/ws-connection/handshake-auth-helpers.test.ts src/infra/device-pairing.test.ts docs/cli/devices.md docs/gateway/protocol.md docs/gateway/troubleshooting.md docs/web/dashboard.mdgit diff --checkrg -n "^(<<<<<<<|=======|>>>>>>>)" CHANGELOG.md apps src ui docsNote: an earlier local command using
src/gateway/server.auth.control-ui.suite.tsfanned out to the full gateway shard and hit unrelated session usage/reset failures. The scoped rerun uses the actualsrc/gateway/server.auth.control-ui.test.tstarget and passes.Issues and superseded PRs
Fixes #79292.
Related #78727, but does not close it; that issue is already closed as implemented by #79206.
Supersedes #79314, #79296, and #79295. Those attempts cover the server diagnostic slice only; this PR carries the fix through Control UI/native reconnect handling, Swift error UX, docs, and focused regression coverage.