fix(cli): recover replaced device approvals#85342
Conversation
|
Codex review: passed. Latest ClawSweeper review: 2026-05-22 13:42 UTC / May 22, 2026, 9:42 AM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a fallback mismatch, and the PR adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. PR rating Rank-up moves:
What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land this narrow approval-churn fix only after an auth/CLI owner accepts the replacement-request contract, while keeping #74484 open for the remaining recovery paths. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main rejects the gateway's replacement requestId as a fallback mismatch, and the PR adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Is this the best way to solve the issue? Yes for the narrow approval-churn slice, pending owner acceptance. The fix is placed at the CLI fallback boundary and fails closed unless the replacement matches the original device identity, role, client metadata, and bounded scope contract. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 2890b1a24ab1. |
|
ClawSweeper PR egg ✨ Hatched: 💎 rare Frosted Crabkin Hatch commandComment Hatchability rules:
Rarity: 💎 rare. What is this egg doing here?
|
|
/clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
55ea146 to
1d2f2e9
Compare
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary: - The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage. - Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a ... adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only. Automerge notes: - PR branch already contained follow-up commit before automerge: docs: note device approval recovery Validation: - ClawSweeper review passed for head 1d2f2e9. - Required merge gates passed before the squash merge. Prepared head SHA: 1d2f2e9 Review: openclaw#85342 (comment) Co-authored-by: masonxhuang <masonxhuang@tencent.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819 Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Summary
openclaw devices approve <requestId>when a local same-device repair request supersedes the request being approved.Verification
pnpm test src/cli/devices-cli.test.ts src/infra/device-pairing-churn.test.tsgit diff --check origin/main..HEADReal behavior proof
Behavior addressed:
openclaw devices approve <requestId>no longer fails with an unclearunknown requestIdwhen the same local CLI repair request has been superseded by a compatible replacement during the approval reconnect.Real environment tested: Local source checkout on Linux after rebasing onto current
origin/main; focused Vitest shards for CLI and infra pairing behavior.Exact steps or command run after this patch:
pnpm test src/cli/devices-cli.test.ts src/infra/device-pairing-churn.test.tsEvidence after fix: Test output reported
src/infra/device-pairing-churn.test.ts (2 tests)passed andsrc/cli/devices-cli.test.ts (43 tests)passed;git diff --check origin/main..HEADproduced no output.Observed result after fix: same-device compatible replacement approvals use the replacement request ID, emit resolved metadata in JSON mode, print an interactive replacement notice, and fail closed for missing snapshots, incompatible scopes, cross-device replacements, public-key changes, role changes, metadata conflicts, remote
--url, or missing pending requests.What was not tested: Full packaged Docker/Crabbox smoke for the final branch; previous black-box validation was used to define the focused source-level regression coverage.
Refs: #74484