Skip to content

fix(devices): authorized operator-token changes fail or lose their reply - #138492

Merged
steipete merged 1 commit into
mainfrom
steipete/gallant-lamarr-e625c8
Sep 4, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/gallant-lamarr-e625c8

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #138491

Additional instructions

Maintainer-owned branch in this repository; maintainers can update it.

What Problem This Solves

Fixes an issue where authorized operators running openclaw devices rotate or devices revoke would receive a scope denial for operator tokens carrying broader scopes. Real CLI validation also exposed a connected self-management failure: the mutation committed, but the Gateway closed the caller before returning its result or replacement token.

The original Linux live report covered revoke, not rotate. Rotation was independently reproduced through the CLI/request/authorization boundary and is now live-tested. Whole-pairing removal is not used as token-only revoke proof. Related: #135617, scoped node-token management, which explicitly left operator connection-scope selection as a follow-up. The profile-avatar repair in #137995 stays separate; none of its four files is changed here.

Why This Change Was Made

The CLI now derives connection scopes from authenticated target visibility and the token's current or explicitly requested scopes, reusing the approval scope converter and the canonical scope inventory. Limited self-management stays narrow; hidden foreign targets require an admin connection. The token owner still enforces the caller's actual grants, target ownership, approved role set and scope baseline.

Device mutations now claim their exact final response through the existing policy-response owner after the awaited mutation and before their own invalidation. Already-invalidated callers cannot claim a replacement bearer, and finally preserves target invalidation/disconnect if the claim fails. Pipelined requests and late unrelated replies remain fenced. Device self-removal shared this reply failure and is repaired; node-role removal does not invalidate its operator-role caller and is unchanged.

No new stored privileges, configuration, schema, dependencies, protocol fields, mutation retries, local token-management fallback, or production test seam. The private duplicate scope inventory and its unsafe cast are removed; the assertion-safety baseline records the required 11-to-10 shrink.

User Impact

Authorized shared-secret and paired-admin callers can rotate or revoke operator tokens, including cross-device targets. Limited paired callers can complete allowed self-management, receive the self-rotation result before disconnect, and remain unable to manage broader or foreign authority. Token-only revoke leaves the pairing intact while rejecting the old token. Shared/foreign rotations continue withholding the bearer.

CLI output of a replacement token is not automatic CLI cache persistence. The live proof separately reconnects with the returned token through the normal GatewayClient, which owns cache persistence.

Production LOC: +88/-66 (net +22). Tests: +779/-73 (net +706). The production growth supplies authenticated target discovery and final-response ownership with guaranteed teardown, reusing existing owners instead of adding an auth layer. Docs: +3/-2; one shrink-only ratchet entry.

Evidence

  • Before production edits: eight failing request-scope cases, five additional paired-admin cross-device cases (including explicit narrowing), and nine real-WebSocket/policy-response cases. The six limited/admin self rotate/revoke/remove cases received no success response before close 4001; stale-caller negative controls remained green.
  • 394 distinct focused tests passed: 375 across 13 CLI/token-store/Gateway files plus 19 scope-implication tests. After test-only typing/lint corrections, both changed real-WebSocket/policy suites reran with 32 passing cases.
  • Final changed-surface gate passed: assertion/max-lines ratchets, core/test types, targeted lint, all Knip scans, schema/store/auth guards and zero runtime import cycles. Earlier test fixture type/lint errors were corrected, not suppressed.
  • Fresh runtime build passed with pnpm build qaRuntime; no ineffective dynamic-import warning. Built CLI/Gateway proof used native macOS, Node 24.20.0, an allowlisted environment, synthetic isolated HOME/state/config and dedicated loopback ports. No operator state or raw token/pairing-store injection.
  • All 22 live scenarios are covered by 15 original final-run passes plus seven separately recorded focused rechecks, not one fully green 22-case run. The recheck corrected recognition of the CLI's human-readable scope-denial message and reran two invocations interrupted by local EPERM before reaching the CLI. EPERM did not recur; its historical syscall remains unknown. No result was waived or relabeled as passing.
  • Every successful token-only revoke retained pairing/approved grants and rejected the old credential with AUTH_DEVICE_TOKEN_MISMATCH. Denied requests left target/caller metadata and credentials unchanged; unrelated tokens remained usable. Self-rotation returned a usable replacement before close. The self-removal sibling is recorded separately, not counted as token-only revoke.
  • Recheck source/input digest (31,388 files) was unchanged: 90429b0b301e61565a9bfb6c792167a5b4c8fbfc49f80f0c5fe2e4da40d6a465. Dist digest (8,509 files) matched the original final run: 6b4e65df19257173270869fc418ee19fd3fc9c737cc09b4f4a4cf684473cce79. Final production/build input hashes were independently checked against the candidate.
  • All 113 recheck children closed with empty process-group censuses. Both isolated Gateways were stopped, both ports closed, and a process-cwd census found no task survivors.
  • Fresh managed Codex autoreview is scoped-clean with no findings at its configured P0 threshold; the lead also inspected callers, token/approval owners, sibling role paths, dispatcher response ownership and real proof.
Exact local validation commands
node scripts/run-vitest.mjs src/cli/devices-cli.gateway.test.ts src/cli/devices-cli.test.ts src/cli/devices-cli.runtime.timeout.test.ts src/cli/devices-cli.lazy.test.ts src/infra/device-pairing.test.ts src/gateway/server-methods/devices.test.ts src/gateway/server.device-token-rotate-authz.test.ts src/gateway/server/ws-connection/authenticated-request-dispatch.policy-close.test.ts src/gateway/server-request-context.test.ts src/gateway/server-shared-auth-generation.test.ts src/gateway/server.shared-auth-rotation.test.ts src/gateway/server/ws-connection/message-handler.post-connect-health.test.ts src/gateway/server/ws-connection/authenticated-request-dispatch.server.test.ts
OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/device-scope-ws-vitest-cache node scripts/run-vitest.mjs src/gateway/server.device-token-rotate-authz.test.ts src/shared/operator-scope-compat.test.ts
node scripts/run-vitest.mjs src/gateway/server.device-token-rotate-authz.test.ts src/gateway/server/ws-connection/authenticated-request-dispatch.policy-close.test.ts
node scripts/check-changed.mjs -- docs/cli/devices.md src/cli/devices-cli.runtime.ts src/cli/devices-cli.test.ts src/cli/devices-cli.gateway.test.ts src/gateway/server-methods/devices.ts src/gateway/server.device-token-rotate-authz.test.ts src/gateway/server/ws-policy-close.ts src/gateway/server/ws-connection/authenticated-request-dispatch.policy-close.test.ts
pnpm build qaRuntime
Redacted observed CLI outcomes
Before scope repair:
  shared CLI revoke of an admin operator token: exit 1
  Gateway: caller-missing-scope scope=operator.admin

After the complete repair:
  shared CLI operator rotate/revoke: exit 0; bearer withheld
  paired-admin foreign limited/admin rotate/revoke: exit 0; bearer withheld
  paired-admin foreign explicit narrow rotation: exit 0
  limited/admin self rotate: exit 0; replacement returned and authenticated
  limited/admin self revoke: exit 0; pairing retained; old token rejected
  limited narrowed-token management: retains narrower scopes and approved ceiling
  limited foreign/broader/non-operator requests: exit 1; no mutation
  CLI denial: unauthorized: device token scope mismatch (re-pair or approve scope upgrade)
  self pairing removal: separate successful sibling case

Proof limits: the new built flow was validated on macOS, not a new Linux/browser-UI run; the original Linux revoke evidence is separate. Source proof began at 0d2bc80eee0c2bcec52fc01e3727844e4c823759 plus this patch. Raw credential-bearing test captures remain private; no agent transcript is included.

Provenance: the node-token repair carried forward, rather than introduced, the operator-scope omission. The separate self-response regression is patch-verified in 5a9168fea34a6b62b5a97673fb5416e7504ced09 against raw parent efe2dda63cff3a02ee99c80e97c0c914467c76de, where response-time authority checking was added without registering device mutations.

Named follow-up, not silently included here: retained-scope device approval requests can omit broader scopes preserved by the approval owner. That distinct pending-approval mismatch is recorded separately.

Docs: https://docs.openclaw.ai/cli/devices

Committed candidate: c5cb5dcb0c5658b068349b3c841a1f0c423c9c81. All nine files match the reviewed candidate byte-for-byte after the normal commit hook. The existing local build proves the same source bytes; exact-commit build metadata will be verified by PR CI.

Landing verification

Exact head c5cb5dcb0c5658b068349b3c841a1f0c423c9c81 passed CI run 33907199817 on attempt 1, including the required openclaw/ci-gate. The repository watcher exited GREEN. There were no CI failures requiring a repair or agent rerun; a cached aggregate status lagged the completed run and was checked against fresh run/required-check evidence.

Native review artifacts validated with zero findings. Hosted prepare completed at the same head and independently accepted CI run 33907199817 plus Workflow Sanity run 33907159386. No rebase, source edit or additional push was needed. Hosted mode reused CI evidence; no new Testbox lease was created.

node scripts/watch-pr-ci.mjs 138492 c5cb5dcb0c5658b068349b3c841a1f0c423c9c81
scripts/pr review-validate-artifacts 138492
OPENCLAW_TESTBOX=1 scripts/pr prepare-run 138492

Maintainer disposition of the completed ClawSweeper review: accept its recommended option to retain the tested authorization boundary. Its sole pre-merge item is the known production +88/-66 (net +22); the review identifies no correctness/security findings and concludes that no smaller net-neutral change covers both target-scope discovery and final self-response delivery. The canonical token owner remains authoritative, scope discovery reuses the existing converter, and final replies use the existing policy-response owner. Allowed, foreign, broader-scope and stale-caller tests remain intact. No separate rank-up list or source change was requested. This resolves the stated merge-risk item without creating parallel authorization behavior.

The live-proof qualifications above remain unchanged: 15 original passes plus seven exact rechecks, historical pre-CLI EPERM syscall unknown, macOS rather than a new Linux/browser run, and GatewayClient persistence rather than automatic CLI persistence. The separate retained-scope approval follow-up remains outside this repair.

Derive CLI connection scopes from authenticated target metadata and requested
token scopes so authorized operator rotation and revocation can complete.
Keep limited self-management narrow and enforce existing server authority.

Reserve each committed device mutation's final response before its own
invalidation, preserving replacement-token delivery and immediate fencing.
Reuse the policy-response owner and cover self-removal through the same path.
Remove the duplicate scope inventory and record its assertion ratchet shrink.

Validation: 394 focused tests, final changed checks, and runtime build passed.
Built macOS CLI proof covers 22 scenarios across 15 original passes and seven
focused rechecks, not a single green matrix run. Historical pre-CLI EPERM did
not recur; its syscall remains unknown. Scoped managed review found no P0s.
@steipete steipete self-assigned this Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 4, 2026 18:40
@steipete
steipete requested a review from a team as a code owner September 4, 2026 18:40
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes size: XL maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 2:51 PM ET / 18:51 UTC.

ClawSweeper review

What this changes

This PR updates device-token CLI scope selection and Gateway response-close sequencing so authorized rotate, revoke, and self-removal operations complete without widening token authority.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 1 item remains

No blocking correctness finding. This is an active, maintainer-owned repair for a concrete current-main CLI and Gateway authorization failure; it should remain open for normal maintainer landing once exact-head checks complete.

Priority: P2
Reviewed head: c5cb5dcb0c5658b068349b3c841a1f0c423c9c81

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with credible production-path evidence and broad targeted regression coverage.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): The supplied redacted built macOS CLI/Gateway trace exercises the changed production owner through shared, paired-admin, limited self, forbidden, and replacement-token reconnect scenarios; the introduced WebSocket tests additionally verify the final-response and stale-authority boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The supplied redacted built macOS CLI/Gateway trace exercises the changed production owner through shared, paired-admin, limited self, forbidden, and replacement-token reconnect scenarios; the introduced WebSocket tests additionally verify the final-response and stale-authority boundary.
Evidence reviewed 7 items Current-main failure path: Current main leaves operator-token rotate and revoke without explicit connection scopes; the CLI transport then selects the method's least-privilege scope, which is insufficient for an admin-scoped target token.
CLI repair boundary: The introduced helper first obtains visible pairing metadata, derives the connection scope from the target token or requested rotation scopes, and falls back to admin only for a hidden cross-device target or non-operator role.
Authorization owner remains authoritative: The canonical token owner still normalizes requested scopes, enforces the approved-device ceiling, and applies the caller-scope ceiling before persisting a rotate or revoke.
Findings None None.
Security None None.

How this fits together

The devices CLI opens a scoped Gateway connection for device-token maintenance, then Gateway handlers authorize and mutate the canonical pairing-token store. When an operation retires the caller’s credential, the response-close policy must send that operation’s final result while fencing subsequent requests.

flowchart LR
  A[Devices CLI command] --> B[Pairing visibility lookup]
  B --> C[Scoped Gateway request]
  C --> D[Device token owner]
  D --> E[Reserve final response]
  E --> F[Invalidate old credential]
  E --> G[Return mutation result]
  F --> H[Close and fence later requests]
Loading

Before merge

  • Resolve merge risk (P1) - Production code grows by 22 net lines on an authorization-sensitive path; the added target discovery and final-response reservation should remain the single canonical flow rather than creating parallel authorization behavior.
Agent review details

Security

None.

PR surface

Source +22, Tests +706, Docs +1, Other 0. Total +729 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 3 88 66 +22
Tests 4 779 73 +706
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 9 871 142 +729

Review metrics

Metric Value Why it matters
Production versus regression coverage production +88/-66 (net +22); tests +779/-73 (net +706) The production growth is confined to scope discovery and policy-response ownership, with substantial CLI, real-WebSocket, and stale-authority coverage.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #138491
Summary: This PR is the candidate fix for the canonical operator-token CLI failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Retain the tested authorization boundary (recommended)
    Land with the existing allowed, foreign, broader-scope, and stale-caller coverage intact so the response reservation cannot become an authorization bypass.

Technical review

Best possible solution:

Retain the combined scope-selection and response-reservation repair: the token owner stays authoritative, and no smaller net-neutral change can both discover the target’s scopes and preserve its final self-operation response.

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

Yes. Current main’s operator-token path supplies no explicit connection scope, while the introduced focused CLI and WebSocket tests cover the resulting denial and suppressed self-operation reply.

Is this the best way to solve the issue?

Yes. The change fixes request-scope selection and response ownership while preserving the canonical token owner’s scope, role, and device-ownership checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 26f87a37009b.

Labels

Label changes:

  • add P2: This repairs documented device-token maintenance flows with bounded operator impact.
  • add merge-risk: 🚨 security-boundary: The patch changes scoped token-mutation access and the final response permitted across credential invalidation.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied redacted built macOS CLI/Gateway trace exercises the changed production owner through shared, paired-admin, limited self, forbidden, and replacement-token reconnect scenarios; the introduced WebSocket tests additionally verify the final-response and stale-authority boundary.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The supplied redacted built macOS CLI/Gateway trace exercises the changed production owner through shared, paired-admin, limited self, forbidden, and replacement-token reconnect scenarios; the introduced WebSocket tests additionally verify the final-response and stale-authority boundary.

Label justifications:

  • P2: This repairs documented device-token maintenance flows with bounded operator impact.
  • merge-risk: 🚨 security-boundary: The patch changes scoped token-mutation access and the final response permitted across credential invalidation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The supplied redacted built macOS CLI/Gateway trace exercises the changed production owner through shared, paired-admin, limited self, forbidden, and replacement-token reconnect scenarios; the introduced WebSocket tests additionally verify the final-response and stale-authority boundary.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied redacted built macOS CLI/Gateway trace exercises the changed production owner through shared, paired-admin, limited self, forbidden, and replacement-token reconnect scenarios; the introduced WebSocket tests additionally verify the final-response and stale-authority boundary.

Evidence

What I checked:

  • Current-main failure path: Current main leaves operator-token rotate and revoke without explicit connection scopes; the CLI transport then selects the method's least-privilege scope, which is insufficient for an admin-scoped target token. (src/cli/devices-cli.runtime.ts:1143, 26f87a37009b)
  • CLI repair boundary: The introduced helper first obtains visible pairing metadata, derives the connection scope from the target token or requested rotation scopes, and falls back to admin only for a hidden cross-device target or non-operator role. (src/cli/devices-cli.runtime.ts:620, c5cb5dcb0c56)
  • Authorization owner remains authoritative: The canonical token owner still normalizes requested scopes, enforces the approved-device ceiling, and applies the caller-scope ceiling before persisting a rotate or revoke. (src/infra/device-pairing-tokens.ts:343, c5cb5dcb0c56)
  • Final-response fencing: The dispatcher permits only an already-held policy response after invalidation and finishes the reservation after sending; the added device methods reserve their response before invalidating matching clients. (src/gateway/server/ws-policy-close.ts:39, c5cb5dcb0c56)
  • Boundary regression coverage: Introduced tests exercise real WebSocket self rotate/revoke/removal responses, pipelined-frame fencing, stale response suppression after another client revokes the caller, and CLI scope selection against the real token owner. (src/gateway/server.device-token-rotate-authz.test.ts:445, c5cb5dcb0c56)
  • Related merged history: The earlier merged node-token repair is the relevant neighboring history and explicitly predates this operator-token follow-up; it was merged as the prior device-token repair. (c4b8d42bd42c)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete
steipete merged commit c9ec277 into main Sep 4, 2026
247 of 255 checks passed
@steipete
steipete deleted the steipete/gallant-lamarr-e625c8 branch September 4, 2026 19:11
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 4, 2026
Use the canonical committed-mutation response owner from #138492 for device
remove, rotate and revoke, preserving immediate fencing and scoped teardown.
Include the separately reviewed #138625 cleanup fix so a retired caller cannot
skip removed-device worker reconciliation. Keep setup/bootstrap on their
existing retirement helper and retain the Watch HTTP invalidation owner.

Validation: 194 owner, Watch and authorization tests passed with zero skips;
fresh scoped managed review found no P0-P3 findings. Full changed checks and
new published-head native/Gateway live proof remain separate landing gates.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…8492)

Derive CLI connection scopes from authenticated target metadata and requested
token scopes so authorized operator rotation and revocation can complete.
Keep limited self-management narrow and enforce existing server authority.

Reserve each committed device mutation's final response before its own
invalidation, preserving replacement-token delivery and immediate fencing.
Reuse the policy-response owner and cover self-removal through the same path.
Remove the duplicate scope inventory and record its assertion ratchet shrink.

Validation: 394 focused tests, final changed checks, and runtime build passed.
Built macOS CLI proof covers 22 scenarios across 15 original passes and seven
focused rechecks, not a single green matrix run. Historical pre-CLI EPERM did
not recur; its syscall remains unknown. Scoped managed review found no P0s.
steipete added a commit that referenced this pull request Sep 5, 2026
* feat(watch): add native standalone realtime voice

Add opt-in Talk on Watch with provider-direct WebRTC/Opus, scoped Gateway
control and explicit call/audio ownership. Preserve phone-mediated voice.

Resolve native endpoints consistently across ICE and Network.framework,
fence late resolver/media work after cancellation, and release received
Opus promptly after packet loss while dropping late speech. Keep recoverable
provider notices visible without closing the session; make setup actionable.

Source review passes all eleven sections through P3. Native engine RED/GREEN
passes eleven final cases; real Watch Simulator resolver classification and
held-result cancellation pass fifteen and sixteen cases respectively.
Full device/provider/current-base CI verification remains a landing gate.

Uses the already-landed app-local companion journal; adds no database schema
or protocol-version change. Physical Watch microphone/speaker, background
and endurance behavior remains unverified.

* fix(watch): use OS entropy for ICE credentials

Supply fresh ICE credentials through the native engine's existing owner API
instead of relying on the pinned library's non-cryptographic defaults.
Fail engine creation closed if operating-system entropy is unavailable.

The actual C-ABI regression repeats dependency RNG state: credentials repeat
before the repair; all twelve engine cases pass afterward. The existing locked
getrandom package owns the platform entropy call; no resolved packages,
configuration, database schema, or Gateway protocol are added.

* test(qa): follow canonical ClawHub documentation ownership

* test(ios): retain websocket frames across receive registration

* test(qa): align Watch branch with landed documentation reference

* test(ios): include websocket regressions in selected lifecycle suite

* fix(watchos): remove unused audio startup result

Remove the unused audio-format result through the audio, media-session and controller path. Periphery exposed obsolete fields in a value the sole caller discarded; activation, cancellation and codec policy stay unchanged.

Include the separately reviewed Apple fixture synchronization fixes from #138207 while that prerequisite lands. No Gateway runtime, protocol, configuration or persistence changes.

* chore(watch): sync landed CI prerequisites

Reuse the canonical startup baseline from #138449, terminal-parent QA
acknowledgment from #137342, and handle-scoped reclamation fixture from
#138481. Keep the Watch, Rust and Gateway/provider production sources
unchanged from the verified 907 native and real-provider checkpoint.

The four-file delta has a clean independent review. Source binding retains
all 148 native inputs, 10 Rust pins and 3,095 Gateway/auth facts; tests and
baseline proof remain source-specific. No required check, timeout or size
allowance is disabled.

Co-authored-by: Ayaan Zaidi <[email protected]>

* fix(gateway): compose device reply ownership with watch voice teardown

Use the canonical committed-mutation response owner from #138492 for device
remove, rotate and revoke, preserving immediate fencing and scoped teardown.
Include the separately reviewed #138625 cleanup fix so a retired caller cannot
skip removed-device worker reconciliation. Keep setup/bootstrap on their
existing retirement helper and retain the Watch HTTP invalidation owner.

Validation: 194 owner, Watch and authorization tests passed with zero skips;
fresh scoped managed review found no P0-P3 findings. Full changed checks and
new published-head native/Gateway live proof remain separate landing gates.

* test(watch): isolate platform metadata regressions

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
* feat(watch): add native standalone realtime voice

Add opt-in Talk on Watch with provider-direct WebRTC/Opus, scoped Gateway
control and explicit call/audio ownership. Preserve phone-mediated voice.

Resolve native endpoints consistently across ICE and Network.framework,
fence late resolver/media work after cancellation, and release received
Opus promptly after packet loss while dropping late speech. Keep recoverable
provider notices visible without closing the session; make setup actionable.

Source review passes all eleven sections through P3. Native engine RED/GREEN
passes eleven final cases; real Watch Simulator resolver classification and
held-result cancellation pass fifteen and sixteen cases respectively.
Full device/provider/current-base CI verification remains a landing gate.

Uses the already-landed app-local companion journal; adds no database schema
or protocol-version change. Physical Watch microphone/speaker, background
and endurance behavior remains unverified.

* fix(watch): use OS entropy for ICE credentials

Supply fresh ICE credentials through the native engine's existing owner API
instead of relying on the pinned library's non-cryptographic defaults.
Fail engine creation closed if operating-system entropy is unavailable.

The actual C-ABI regression repeats dependency RNG state: credentials repeat
before the repair; all twelve engine cases pass afterward. The existing locked
getrandom package owns the platform entropy call; no resolved packages,
configuration, database schema, or Gateway protocol are added.

* test(qa): follow canonical ClawHub documentation ownership

* test(ios): retain websocket frames across receive registration

* test(qa): align Watch branch with landed documentation reference

* test(ios): include websocket regressions in selected lifecycle suite

* fix(watchos): remove unused audio startup result

Remove the unused audio-format result through the audio, media-session and controller path. Periphery exposed obsolete fields in a value the sole caller discarded; activation, cancellation and codec policy stay unchanged.

Include the separately reviewed Apple fixture synchronization fixes from openclaw#138207 while that prerequisite lands. No Gateway runtime, protocol, configuration or persistence changes.

* chore(watch): sync landed CI prerequisites

Reuse the canonical startup baseline from openclaw#138449, terminal-parent QA
acknowledgment from openclaw#137342, and handle-scoped reclamation fixture from
openclaw#138481. Keep the Watch, Rust and Gateway/provider production sources
unchanged from the verified 907 native and real-provider checkpoint.

The four-file delta has a clean independent review. Source binding retains
all 148 native inputs, 10 Rust pins and 3,095 Gateway/auth facts; tests and
baseline proof remain source-specific. No required check, timeout or size
allowance is disabled.

Co-authored-by: Ayaan Zaidi <[email protected]>

* fix(gateway): compose device reply ownership with watch voice teardown

Use the canonical committed-mutation response owner from openclaw#138492 for device
remove, rotate and revoke, preserving immediate fencing and scoped teardown.
Include the separately reviewed openclaw#138625 cleanup fix so a retired caller cannot
skip removed-device worker reconciliation. Keep setup/bootstrap on their
existing retirement helper and retain the Watch HTTP invalidation owner.

Validation: 194 owner, Watch and authorization tests passed with zero skips;
fresh scoped managed review found no P0-P3 findings. Full changed checks and
new published-head native/Gateway live proof remain separate landing gates.

* test(watch): isolate platform metadata regressions

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: authorized operator-token CLI rotation and revocation fail

1 participant