Skip to content

fix: restore main build#49478

Merged
jalehman merged 2 commits intomainfrom
codex/fix-main-build
Mar 18, 2026
Merged

fix: restore main build#49478
jalehman merged 2 commits intomainfrom
codex/fix-main-build

Conversation

@jalehman
Copy link
Copy Markdown
Contributor

What

This PR restores a green pnpm build on main by fixing a stale Slack runtime import and aligning a few extension/config type surfaces with the current plugin and pi-ai contracts.

Why

pnpm build was failing on main with an unresolved import in the Slack extension, and once that was corrected the build exposed a small set of TypeScript contract mismatches in Signal, xAI web search provider registration, and model compat typing. Keeping main buildable matters for both local development and release confidence.

Changes

  • Fix Slack runtime directory-config import path
  • Import Signal account config from source type module
  • Align model compat config with current pi-ai compat shape
  • Accept qwen-chat-template in config schema
  • Add required xAI web-search provider credential metadata

Testing

  • pnpm build
  • Expected outcome: build completes successfully from the current branch without the prior unresolved import or TypeScript contract failures

@openclaw-barnacle openclaw-barnacle bot added channel: signal Channel integration: signal channel: slack Channel integration: slack size: XS maintainer Maintainer-authored PR labels Mar 18, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 18, 2026

Greptile Summary

This PR restores a green build on main by fixing four distinct categories of TypeScript contract failures: a stale Slack runtime import path, a missing SignalAccountConfig export in the signal extension's runtime barrel, a missing required credentialPath field on the xAI web-search provider plugin, and a ModelCompatConfig type misalignment with the updated @mariozechner/pi-ai compat shape (including adding "qwen-chat-template" to the Zod schema's thinkingFormat union).

  • All five files contain targeted, mechanical fixes with no logic changes.
  • The Slack and Signal import corrections point to files that exist and export the expected symbols.
  • The xAI change satisfies the non-optional credentialPath: string requirement of WebSearchProviderPlugin.
  • The ModelCompatConfig / ModelCompatSchema split introduced by the pi-ai alignment is a minor maintenance concern worth watching: the Zod schema continues to enumerate the moved fields manually, so future upstream type changes won't automatically be reflected in config validation.

Confidence Score: 4/5

  • Safe to merge — all changes are targeted build-fix corrections with no functional logic changes.
  • All five changes are minimal and mechanical: two import path corrections pointing to verified existing files, one required field addition to satisfy a plugin type contract, and one type/schema alignment with an external package. The only reservation is the long-term maintainability concern around the Zod schema and TypeScript type now being defined in separate places for ModelCompatConfig, which could drift silently on future pi-ai bumps.
  • src/config/types.models.ts and src/config/zod-schema.core.ts — worth adding a compile-time assignability check between the Zod-inferred type and ModelCompatConfig to guard against future drift.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/config/types.models.ts
Line: 17-24

Comment:
**Zod schema / TypeScript type divergence after split**

`ModelCompatConfig` now inherits `supportsStore`, `supportsDeveloperRole`, `supportsReasoningEffort`, `supportsUsageInStreaming`, `supportsStrictMode`, `maxTokensField`, `thinkingFormat`, `requiresToolResultName`, `requiresAssistantAfterToolResult`, and `requiresThinkingAsText` from `OpenAICompletionsCompat`, while `ModelCompatSchema` in `zod-schema.core.ts` still enumerates all of them manually (lines 185–209). Conversely, `toolSchemaProfile`, `nativeWebSearchTool`, and `toolCallArgumentsEncoding` appear only in `ModelCompatConfig` but are absent from the Zod schema.

Neither gap is introduced here (and the build passes), but the split makes the two definitions harder to keep in sync going forward. If `OpenAICompletionsCompat` adds or renames fields in a future `pi-ai` bump, the Zod schema won't automatically reflect the change and config accepted by the schema may silently exceed or miss what the TypeScript type describes.

Consider adding a compile-time sanity check (e.g. a `satisfies` or assignability assertion between `z.infer<typeof ModelCompatSchema>` and `ModelCompatConfig`) so any future drift is caught at build time rather than at runtime.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "Build: restore main ..."

Copy link
Copy Markdown

@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: 07e6f50c1d

ℹ️ 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".

@jalehman jalehman force-pushed the codex/fix-main-build branch from bb30d01 to 321b436 Compare March 18, 2026 05:13
@openclaw-barnacle openclaw-barnacle bot removed the channel: slack Channel integration: slack label Mar 18, 2026
@jalehman jalehman merged commit 4ca87fa into main Mar 18, 2026
29 of 43 checks passed
@jalehman jalehman deleted the codex/fix-main-build branch March 18, 2026 05:14
Copy link
Copy Markdown

@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: 321b4367e7

ℹ️ 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 +214 to +215
credentialPath: "plugins.entries.xai.config.webSearch.apiKey",
inactiveSecretPaths: ["plugins.entries.xai.config.webSearch.apiKey"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the legacy Grok secret path in inactive warnings

Because createTool() still reads Grok credentials from tools.web.search.grok.apiKey via getScopedCredentialValue(..., "grok"), that legacy SecretRef surface is still live. src/secrets/runtime-web-tools.ts uses inactiveSecretPaths to report ignored refs when another search provider is selected or web search is disabled, so replacing the array with only plugins.entries.xai.config.webSearch.apiKey will hide stale or broken legacy tools.web.search.grok.apiKey refs from runtime/audit warnings even though this provider still consumes them.

Useful? React with 👍 / 👎.

brandontyler pushed a commit to brandontyler/clawdbot that referenced this pull request Mar 19, 2026
* Build: restore main build

* Config: align model compat schema
fuller-stack-dev pushed a commit to fuller-stack-dev/openclaw that referenced this pull request Mar 20, 2026
* Build: restore main build

* Config: align model compat schema
fuller-stack-dev pushed a commit to fuller-stack-dev/openclaw that referenced this pull request Mar 20, 2026
* Build: restore main build

* Config: align model compat schema
pholpaphankorn pushed a commit to pholpaphankorn/openclaw that referenced this pull request Mar 22, 2026
* Build: restore main build

* Config: align model compat schema
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Mar 24, 2026
* Build: restore main build

* Config: align model compat schema

(cherry picked from commit 4ca87fa)
alexey-pelykh added a commit to remoteclaw/remoteclaw that referenced this pull request Mar 24, 2026
…1975)

* fix(openshell): bundle upstream cli fallback

(cherry picked from commit 0099804)

* test: tighten pairing and phone control assertions

(cherry picked from commit 090ac88)

* test: share startup account lifecycle helpers

(cherry picked from commit 0acd1f6)

* refactor: move iMessage channel to extensions/imessage (openclaw#45539)

(cherry picked from commit 0ce23dc)

* Plugins: internalize more extension SDK imports

(cherry picked from commit 0f56b16)

* Signal: move message actions behind plugin boundary

(cherry picked from commit 1777b99)

* LINE: remove shared group mentions helper

(cherry picked from commit 1aae93b)

* refactor: move signal imessage mattermost to setup wizard

(cherry picked from commit 1f37203)

* refactor: move gateway onboarding into extensions

(cherry picked from commit 2182137)

* test: share status issue assertion helpers

(cherry picked from commit 258945d)

* refactor: reuse account status helpers in bundled channels

(cherry picked from commit 2a1acec)

* test: harden voice call regression assertions

(cherry picked from commit 2a66eaf)

* Plugins: internalize googlechat SDK imports

(cherry picked from commit 2b67a3f)

* test: tighten regression assertions across extension tests

(cherry picked from commit 2d492ab)

* Plugins: internalize zalouser SDK imports

(cherry picked from commit 2ef28a7)

* fix: repair plugin runtime api imports

(cherry picked from commit 2fbf2c0)

* refactor(imessage): share plugin base config

(cherry picked from commit 31a8225)

* Nostr: break setup-surface import cycle

(cherry picked from commit 31e6cb0)

* test: harden voice call provider regressions

(cherry picked from commit 36c9517)

* fix: restore ci type checks

(cherry picked from commit 38abdea)

* device-pair: align internal command checks

(cherry picked from commit 3fe96c7)

* iMessage: lazy-load setup wizard surface

(cherry picked from commit 413d2ff)

* chore: update dependencies except carbon

(cherry picked from commit 49091eb)

* build: sync plugins for 2026.3.14

(cherry picked from commit 49a2ff7)

* fix: restore main build (openclaw#49478)

* Build: restore main build

* Config: align model compat schema

(cherry picked from commit 4ca87fa)

* build: update deps and fix vitest 4 regressions

(cherry picked from commit 4dd4e36)

* Plugins: remove shared extension boundary debt

(cherry picked from commit 5b7b552)

* Plugins: internalize zalo SDK imports

(cherry picked from commit 645c5bd)

* feat(plugins): add speech provider registration

(cherry picked from commit 662031a)

* LINE: split setup adapter helpers

(cherry picked from commit 6a2efa5)

* refactor: share extension deferred and runtime helpers

(cherry picked from commit 6a61d55)

* test(plugins): cover retired google auth compatibility

(cherry picked from commit 6b28668)

* Nextcloud Talk: split setup adapter helpers

(cherry picked from commit 7d2ddf7)

* refactor(setup): share patched account adapters

(cherry picked from commit 7fc134d)

* feat(plugins): expand speech runtime ownership

(cherry picked from commit 8578135)

* Zalo: split setup adapter helpers

(cherry picked from commit 88b8151)

* fix(zalouser): decouple tests from zca-js runtime

(cherry picked from commit 8d805a0)

* fix: adapt cherry-picks for fork TS strictness

Restore files that were incorrectly deleted by cherry-picks:
- group-mentions.ts (still used by telegram/whatsapp plugin-sdk)
- onboarding/imessage.ts, onboarding/signal.ts (still referenced)
- actions/signal.ts (runtime still imports from old location)
- signal/index.ts (restore fork base version)

Remove upstream-only files that don't compile in fork:
- extensions/microsoft/ (new TTS extension, needs upstream infra)
- src/plugin-sdk/extension-shared.ts (references deleted channel-runtime)
- src/tts/provider-types.ts, providers/microsoft.ts (upstream TTS types)

Restore base versions of files incorrectly modified:
- types-core.ts, provider-registry.ts, zod-schema.core.ts
- Various test files (subpaths.test, setup-helpers.test, tts.test)

* fix: regenerate lockfile after dependency bumps

Cherry-picks updated dependency versions in extension package.jsons
(music-metadata, ws, @microsoft/agents-hosting, @aws-sdk, etc.)
which caused lockfile config mismatch in CI.

* fix: adapt cherry-picked extensions for fork naming and strictness

- Rename openclaw/plugin-sdk -> remoteclaw/plugin-sdk in all extensions
- Rename OpenClawConfig -> RemoteClawConfig, OpenClawPluginApi -> RemoteClawPluginApi
- Remove upstream-only files (gateway onboard, signal message-actions copy)
- Add explicit any annotations to setup wizard callback params for TS strictness

* fix: remove upstream-only setup wizard files and fix remaining type errors

- Remove setup-surface.ts files referencing non-existent setup-wizard module
- Remove nextcloud-talk setup-core.ts (references missing patchScopedAccountConfig)
- Remove memory-lancedb api.ts (gutted extension)
- Stub ChannelSetupWizard type in imessage setup-core.ts
- Restore whatsapp resolve-target.test.ts and signal channel.test.ts from base
- Restore config.plugin-validation.test.ts from base
- Remove setup-surface re-export from imessage channel.runtime.ts

* fix: remove broken upstream extensions and fix plugin manifests

- Remove elevenlabs extension (requires upstream speech provider API)
- Remove googlechat runtime-api.ts (references upstream-only modules)
- Rename openclaw.plugin.json -> remoteclaw.plugin.json in new extensions
- Remove imessage/mattermost/signal setup-surface.ts (require setup-wizard)

* fix: resolve remaining build errors from cherry-picks

- Restore googlechat/imessage test files with correct import paths
- Restore imessage channel.ts and shared.ts from fork base
- Fix imessage monitor test import paths for extensions/ directory
- Remove line group-policy files (reference non-existent plugin-sdk modules)

* fix: resolve final build errors from cherry-picks

- Restore matrix send-queue.test.ts (referenced deleted extension-shared)
- Restore mattermost channel.ts (referenced deleted onboarding.js)
- Fix unreachable ?? in line setup-core.ts

* fix: restore mattermost onboarding.ts deleted by cherry-pick

* fix: add type annotation for vitest mock portability in zalouser

* fix: remove duplicate imessage source files from extensions/

Cherry-pick 6 copied src/imessage/ files to extensions/imessage/src/ but
the originals remain in src/imessage/. The build system uses rootDir='src'
which can't compile files under extensions/ that import each other.
Remove the copies, keep only test files and channel.ts.

* fix: fully revert imessage src/ -> extensions/ move

Cherry-pick 6 moved src/imessage/ to extensions/imessage/src/ and updated
src/ files to re-export from extensions/. The fork's build system uses
rootDir='src' which can't handle cross-imports between extensions/ files.

Restoring all src/imessage/ files to fork base versions and removing
extension copies that can't compile independently.

---------

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Gustavo Madeira Santana <[email protected]>
Co-authored-by: Josh Lehman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Shakker <[email protected]>
ralyodio pushed a commit to ralyodio/openclaw that referenced this pull request Apr 3, 2026
* Build: restore main build

* Config: align model compat schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: signal Channel integration: signal maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant