Skip to content

Cherry-pick batch: Gateway fixes and improvements (1/2) (50 commits)#1958

Merged
alexey-pelykh merged 37 commits intomainfrom
staging/cherry-pick-1869
Mar 24, 2026
Merged

Cherry-pick batch: Gateway fixes and improvements (1/2) (50 commits)#1958
alexey-pelykh merged 37 commits intomainfrom
staging/cherry-pick-1869

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick batch from upstream

Issue: #1869
Commits: 35 cherry-picked (15 skipped as empty after conflict resolution)

See issue for full commit list.

Closes #1869

🤖 Generated with Claude Code

steipete and others added 30 commits March 24, 2026 01:42
(cherry picked from commit 274af04)
Preserve Control UI scopes through the device-auth bypass path, normalize implied operator device-auth scopes, ignore cached under-scoped operator tokens, and degrade read-backed main pages gracefully when a connection truly lacks operator.read.

Co-authored-by: Val Alexander <[email protected]>
(cherry picked from commit 3e2b3bd)
…nclaw#42931) (openclaw#47148)

When auth is completely disabled (mode=none), requiring device pairing
for Control UI operator sessions adds friction without security value
since any client can already connect without credentials.

Add authMode parameter to shouldSkipControlUiPairing so the bypass
fires only for Control UI + operator role + auth.mode=none. This avoids
the openclaw#43478 regression where a top-level OR disabled pairing for ALL
websocket clients.

(cherry picked from commit 26e0a3e)
(cherry picked from commit 4ac355b)
vincentkoc and others added 6 commits March 24, 2026 02:14
emitChatFinal frees buffers on clean run completion, and the
maintenance timer sweeps abortedRuns after ABORTED_RUN_TTL_MS. But
runs that get stuck (e.g. LLM timeout without triggering clean
lifecycle end) are never aborted and their string buffers persist
indefinitely. This is the direct trigger for the StringAdd_CheckNone
OOM crash reported in the issue.

Add a stale buffer sweep in the maintenance timer that cleans up
buffers, deltaSentAt, and deltaLastBroadcastLen for any run not
updated within ABORTED_RUN_TTL_MS, regardless of abort status.

Closes openclaw#51821

(cherry picked from commit 550deb8)
…enclaw#36645)

`chat.inject` called `appendAssistantTranscriptMessage` with
`createIfMissing: false`, causing a hard error when the transcript
file did not exist on disk despite having a valid `transcriptPath`
in session metadata. This commonly happens with ACP oneshot/run
sessions where the session entry is created but the transcript file
is not yet materialized.

The fix is a one-character change: `createIfMissing: true`. The
`ensureTranscriptFile` helper already handles directory creation
and file initialization safely.

Fixes openclaw#36170

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 5c73ed6)
(cherry picked from commit 5eaa146)
- Add stubs for upstream-only modules (channel-plugin-ids, provider-registry, synthesizeSpeech)
- Fix OpenClawConfig → RemoteClawConfig in talk.ts
- Add resolveHookClientIpConfig export to hooks.ts
- Add missing TtsConfig fields (microsoft, openai.speed/instructions)
- Fix chatThinkingLevel as optional on ChatState
- Fix test type annotations (dedupe Map, connect-policy booleans, abort helpers)
- Add missing imports (getReplyFromConfig, GatewayRequestError, startConnect helper)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) March 24, 2026 01:31
When a device is re-paired without explicitly requested scopes, reuse
the existing token scopes as-is instead of re-normalizing (which expands
operator.admin to include operator.read/write).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-pelykh alexey-pelykh force-pushed the staging/cherry-pick-1869 branch from 0b89f36 to c3cf194 Compare March 24, 2026 01:44
@alexey-pelykh alexey-pelykh merged commit 907ccf6 into main Mar 24, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the staging/cherry-pick-1869 branch March 24, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cherry-pick: Gateway fixes and improvements (1/2) (50 commits)

10 participants