Skip to content

Upgrade openclaw to 4.9#804

Merged
su8su merged 14 commits intomainfrom
upgrade_openclaw_to_4.5
Apr 9, 2026
Merged

Upgrade openclaw to 4.9#804
su8su merged 14 commits intomainfrom
upgrade_openclaw_to_4.5

Conversation

@su8su
Copy link
Copy Markdown
Contributor

@su8su su8su commented Apr 9, 2026

Summary

Upgrade openclaw to 4.8

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Validation

Checklist

  • I ran relevant checks/tests locally.
  • I updated docs if behavior or interfaces changed.
  • I verified there are no unrelated changes in this PR.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31113a8968

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/e2e/token-usage.spec.ts Outdated
Comment on lines +149 to +151
await installIpcMocks(electronApp, {
gatewayStatus: { state: 'running', port: 18789 },
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Mock the gateway status source used by Models

Overriding only gateway:status here does not make the Models page consider the gateway running: useGatewayStore.init() reads status via hostApiFetch('/api/gateway/status') and uses gateway:status IPC only as a 30s reconciliation fallback (src/stores/gateway.ts), while E2E mode explicitly skips gateway auto-start (electron/main/index.ts). In this test that means status remains stopped, /models never loads token usage rows, and the count() === 2 poll can time out. Mock the Host API status response (or emit gateway:status-changed) so the store transitions to running immediately.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eeb64d5bb1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/e2e/token-usage.spec.ts Outdated
import { join } from 'node:path';
import type { Page } from '@playwright/test';
import { completeSetup, expect, test } from './fixtures/electron';
import { completeSetup, expect, installIpcMocks, test } from './fixtures/electron';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove unused E2E imports to keep CI lint green

After switching the gateway-row test to test.skip, installIpcMocks is no longer used, but @typescript-eslint/no-unused-vars is configured as an error. Since the check workflow runs pnpm run lint, this creates a deterministic CI failure that blocks the PR from merging until the unused binding is removed (or intentionally ignored with the configured _ convention).

Useful? React with 👍 / 👎.

@su8su su8su changed the title Upgrade openclaw to 4.8 Upgrade openclaw to 4.9 Apr 9, 2026
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b97cdb4ce

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +280 to +281
if (isOwnProcess) {
this.restartController.recordRestartCompleted();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate restart-complete timestamp to real restarts

onConnectedToExistingGateway is invoked for any attach-to-existing path in runGatewayStartupSequence (both true in-process restarts and ordinary reconnects to an already-running owned process), but this block always calls recordRestartCompleted() when isOwnProcess is true. Because deferred restarts are queued while state is reconnecting (restart() + shouldDeferRestart) and later resolved by flushDeferredRestart, this timestamp can make a deferred restart look already satisfied and get dropped even though no restart occurred, leaving config changes made during reconnect unapplied. Restrict this timestamp update to cases where a real restart completion is actually confirmed.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02d16ac783

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread electron/utils/openclaw-auth.ts Outdated
Comment on lines +1816 to +1818
for (const key of Object.keys(section)) {
if (!VALID_TOP_LEVEL_KEYS.has(key) && !extraAllowedTopLevelKeys.has(key)) {
delete section[key];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve WeChat routeTag when pruning channel keys

The new strict-channel cleanup removes any top-level key not in VALID_TOP_LEVEL_KEYS, which now deletes channels.openclaw-weixin.routeTag whenever accounts exists. That regresses the WeChat QR flow because loadWeChatRouteTag still reads the top-level routeTag when no accountId is passed, and /api/channels/wechat/start -> waitForWeChatLoginSession currently follows that no-accountId path, so the SKRouteTag header silently disappears after sanitize for routed deployments. Please exempt openclaw-weixin.routeTag (or pass accountId through that flow) before deleting unknown keys.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f641b17943

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 1168 to +1170
migrateLegacyChannelConfigToAccounts(section, DEFAULT_ACCOUNT_ID);
const accounts = getChannelAccountsMap(section);
if (!accounts?.[accountId]) continue;
if (ownedChannelAccounts && !ownedChannelAccounts.has(`${channelType}:${accountId}`)) {
if (!accounts?.[accountId] || (ownedChannelAccounts && !ownedChannelAccounts.has(`${channelType}:${accountId}`))) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid migrating strict channels in agent cleanup loop

deleteAgentChannelAccounts now runs migrateLegacyChannelConfigToAccounts before it knows whether the current channel/account will be deleted. For strict-schema channels (like dingtalk), that migration removes top-level credential keys and stores them under accounts.default; then this new early-continue path skips strict channels without restoring the top-level mirror. If any other channel in the same loop is actually deleted, the final writeOpenClawConfig persists the mutated strict channel in an invalid shape, so deleting an unrelated agent can silently break an existing dingtalk config.

Useful? React with 👍 / 👎.

Comment on lines +1791 to +1793
if ('accounts' in section) {
delete section['accounts'];
modified = true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve strict-channel creds before dropping accounts

In sanitizeOpenClawConfig, the strict-channel branch deletes accounts/defaultAccount immediately. If a dingtalk config is stored only under accounts.default (legacy or externally generated configs), this removes the only credential copy because this branch never mirrors nested values to top-level first. The sanitize write then permanently strips dingtalk credentials and the channel cannot reconnect after upgrade.

Useful? React with 👍 / 👎.

@su8su su8su merged commit 467fcf7 into main Apr 9, 2026
7 checks passed
@su8su su8su deleted the upgrade_openclaw_to_4.5 branch April 9, 2026 10:51
zjfjiayou pushed a commit to zjfjiayou/JitClaw that referenced this pull request Apr 10, 2026
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.

1 participant