Skip to content

fix(gateway): prevent model owner mismatch after plugin activation - #115747

Merged
kevinlin-openai merged 2 commits into
mainfrom
dev/kevinlin/gateway-runtime-catalog-owner
Jul 29, 2026
Merged

kevinlin-openai merged 2 commits into
mainfrom
dev/kevinlin/gateway-runtime-catalog-owner

Conversation

@kevinslin

@kevinslin kevinslin commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Related: #115433

What Problem This Solves

Fixes an issue where users sending a message through a Gateway with runtime-only plugin activation would have the turn fail before model selection with prepared model catalog owner was not published for the requested config.

Why This Change Was Made

Gateway startup now republishes the exact post-plugin-activation config as the active runtime snapshot before downstream prepared owners are created. The persisted source snapshot remains unchanged, and explicit per-request config overrides continue to use exact isolated owners.

User Impact

Gateway turns can use the model catalog published during startup when plugins were enabled at runtime, including service-account-backed Codex plugin turns.

Evidence

  • Added a focused regression test covering the pre-activation to post-activation runtime snapshot transition and source-snapshot retention.
  • git diff --check passed.
  • Targeted oxfmt --check passed.
  • Fresh autoreview --mode uncommitted returned clean with no accepted/actionable findings (0.97).
  • Exact-head hosted CI passed on 56fe70e96de1553656b4aeab9925d9c3d4b108d2, including openclaw/ci-gate, build artifacts, Node test shards, dependency/dead-export checks, and security checks.
  • The focused local Vitest command was attempted but the existing linked-worktree dependency tree failed before test collection because its installed @openclaw/* workspace package predates configureFsSafeNative. No local dependency reconciliation was performed; hosted CI is the authoritative hydrated environment.

Real behavior proof

  • Behavior or issue addressed: Gateway Slack dispatch failed before model selection when the prepared model owner was published from the plugin-activated config but the active runtime snapshot still referenced the pre-activation config.
  • Real environment tested: Staging tenant dxclaw, with Gateway traffic routed to the remote clawdx app-server.
  • Exact steps or command run after this patch: Exact-head hosted PR CI on 56fe70e96de1553656b4aeab9925d9c3d4b108d2, followed by the ordinary Applied image pin/build/rollout workflow and a structured Slack-to-Linear read after the merged artifact is available.
  • Evidence after fix: The regression test asserts that the exact plugin runtime config becomes the active snapshot while the canonical source snapshot is retained. All required exact-head hosted CI checks passed. The final immutable staging artifact and structured connector result will be recorded in the follow-up pin PR.
  • Observed result after fix: Source review, the focused regression assertion, and exact-head hydrated CI cover the mismatched-owner condition. The current deployed pre-fix artifact still reproduces the startup owner mismatch, which is the reason the merged artifact rollout is required.
  • What was not tested: A pre-merge staging build was not used because the supported Applied CLI attempted linked-worktree dependency hydration and Azure authentication was unavailable in the sandbox. Live Slack-to-Linear verification is therefore reserved for the exact merged OpenClaw SHA pinned by the internal build PR.

AI Assistance

This PR was AI-assisted. I reviewed the implementation and understand the runtime ownership change.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Jul 29, 2026
@kevinslin kevinslin self-assigned this Jul 29, 2026
@kevinslin
kevinslin force-pushed the dev/kevinlin/gateway-runtime-catalog-owner branch from d7dde6a to fc2665b Compare July 29, 2026 07:54
@kevinlin-openai
kevinlin-openai merged commit 8704d3d into main Jul 29, 2026
126 checks passed
@kevinlin-openai
kevinlin-openai deleted the dev/kevinlin/gateway-runtime-catalog-owner branch July 29, 2026 08:33
@kevinlin-openai

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main:
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
  fix(msteams): finalize sent replies after dispatch (#82354)
  fix(cron): deliver explicitly configured failure alerts (#115762)
  fix(hooks): resolve inbound claim conversation once (#115491)
  refactor: retire legacy provider and secret paths (#115655)
  fix(memory): reject malformed QMD result entries (#115705)
  fix(diagnostics): keep internal thinking out of telemetry [AI] (#115261)
  fix(ui): localize remaining control surfaces (#115730)
  fix(gateway): prevent model owner mismatch after plugin activation (#115747)
  fix(agents): run reply hooks for restart recovery (#115711)
  fix(cron): initialize detached hook run sessions (#115765)
  fix(ios): keep stop available for staged voice notes (#115744)
  fix(doctor): preserve config includes during cleanup (#115723)
  fix(memory): keep dreaming consolidation within project scope (#115721)
  fix(discord): keep tool rows under verbose progress (#111947)

# Conflicts:
#	ui/src/pages/custodian/custodian-surface.ts
#	ui/src/styles/custodian.css
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
…penclaw#115747)

* fix(gateway): publish plugin runtime config at startup

* chore: allow gateway startup test seam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants