fix(gateway): tolerate legacy paired metadata in ws upgrade checks#21447
Merged
BunsDev merged 5 commits intoopenclaw:mainfrom Feb 19, 2026
Merged
Conversation
Contributor
Author
|
Verification evidence (focused):
User impact/remediation notes:
References: |
Contributor
Author
|
Follow-up for CI failure in
Re-verified locally with: Result: pass (format check + tsgo + lint). |
Member
|
Merged via squash.
Thanks @joshavant 🦞 |
BunsDev
added a commit
that referenced
this pull request
Feb 19, 2026
vignesh07
pushed a commit
to pahdo/openclaw
that referenced
this pull request
Feb 20, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
vignesh07
pushed a commit
to pahdo/openclaw
that referenced
this pull request
Feb 20, 2026
anisoptera
pushed a commit
to anisoptera/openclaw
that referenced
this pull request
Feb 20, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
anisoptera
pushed a commit
to anisoptera/openclaw
that referenced
this pull request
Feb 20, 2026
|
IS this released yet? |
|
my Opus 4.6 session could boil the solution down to (I did an guess that's the solution buried in the thread, but if you can't wait for the new version to roll out, this might help you too ❤️ |
rodrigogs
pushed a commit
to rodrigogs/openclaw
that referenced
this pull request
Feb 20, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
rodrigogs
pushed a commit
to rodrigogs/openclaw
that referenced
this pull request
Feb 20, 2026
|
I downgraded to 2026.2.15 and its working now for me |
Hansen1018
added a commit
to Hansen1018/openclaw
that referenced
this pull request
Feb 21, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
Hansen1018
added a commit
to Hansen1018/openclaw
that referenced
this pull request
Feb 21, 2026
vincentkoc
pushed a commit
that referenced
this pull request
Feb 21, 2026
…21447) Fixes the pairing required regression from #21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
vincentkoc
pushed a commit
that referenced
this pull request
Feb 21, 2026
vincentkoc
pushed a commit
that referenced
this pull request
Feb 21, 2026
…21447) Fixes the pairing required regression from #21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
vincentkoc
pushed a commit
that referenced
this pull request
Feb 21, 2026
mmyyfirstb
pushed a commit
to mmyyfirstb/openclaw
that referenced
this pull request
Feb 21, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
mmyyfirstb
pushed a commit
to mmyyfirstb/openclaw
that referenced
this pull request
Feb 21, 2026
obviyus
pushed a commit
to guirguispierre/openclaw
that referenced
this pull request
Feb 22, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
obviyus
pushed a commit
to guirguispierre/openclaw
that referenced
this pull request
Feb 22, 2026
Closed
6 tasks
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
(cherry picked from commit 6bc9824) # Conflicts: # README.md
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
(cherry picked from commit 6bc9824) # Conflicts: # README.md
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…penclaw#21447) Fixes the pairing required regression from openclaw#21236 for legacy paired devices created without roles/scopes metadata. Detects legacy paired metadata shape and skips upgrade enforcement while backfilling metadata in place on reconnect. Co-authored-by: Josh Avant <[email protected]> Co-authored-by: Val Alexander <[email protected]>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
pairing requiredregression from #21236 for legacy paired devices that were created withoutroles/scopesmetadata.This PR includes two separate commits:
server.auth.e2e.test.ts) that models legacy paired metadata.message-handler.tsto tolerate legacy metadata and backfill it in place.Related maintainer draft: #21347 (used as reference/inspiration).
Problem
After handshake hardening, a previously paired device could be treated as a scope/role upgrade if its persisted paired record lacked
roles/scopes, causing:gateway closed (1008): pairing requiredWhat changed
1) Repro test
allows legacy paired devices missing role/scope metadatainsrc/gateway/server.auth.e2e.test.ts.rolesandscopesfrom persisted paired record.2) Handshake fix
src/gateway/server/ws-connection/message-handler.ts:roles === undefined && scopes === undefined)updatePairedDeviceMetadata(...)so metadata is repaired in-placeWhy this is safe
Verification evidence
Repro was red pre-fix
Command:
Observed pre-fix failure:
AssertionError: expected false to be truesrc/gateway/server.auth.e2e.test.ts(expect(reconnect.ok).toBe(true))Post-fix targeted checks
Command:
Result:
1 passed,2 passed | 29 skippedPost-fix auth file checks
Command:
pnpm exec vitest run --config vitest.e2e.config.ts src/gateway/server.auth.e2e.test.ts --maxWorkers=1Result:
1 passed,31 passedManual single-host install validation
Using a normal local install pattern with an isolated state dir:
openclaw healthpasses).roles/scopesfromdevices/paired.jsonfor the paired device.openclaw healthreturnsgateway closed (1008): pairing required.openclaw healthsucceeds, anddevices/paired.jsonshowsroles/scopesbackfilled.User-facing guidance (for #21236)
openclaw health.Fixes #21236
Greptile Summary
Fixes regression where legacy paired devices without
roles/scopesmetadata were incorrectly rejected as upgrade attempts. The fix detects the legacy metadata shape (roles === undefined && scopes === undefined) and skips upgrade enforcement while still backfilling metadata viaupdatePairedDeviceMetadata(). Includes comprehensive test that validates the backfill behavior.Confidence Score: 5/5
rolesandscopesundefined) while preserving all existing upgrade checks for non-legacy paired devices. The test comprehensively validates the backfill behavior, and theupdatePairedDeviceMetadatafunction properly merges metadata to repair legacy entries.Last reviewed commit: fda21f1