Skip to content

fix(agents): preserve discovered models for isolated completions - #182952

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-red-live-only-model-20260919
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-red-live-only-model-20260919

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Image utilities reject an already-discovered provider model with Unknown model: opencode/live-only-model, even though chat can use it. This also breaks the catalog-dispatch integration test on main CI.

User Impact

Restores plugin-discovered models for isolated image/completion runtimes while preserving separate plugin execution generations. No configuration or migration is required.

Why This Change Was Made

Commit 9b2de57 (#171822) correctly introduced the isolated-completion execution purpose to avoid plugin reload freezes. The catalog-owner comparison also included that purpose, however, so image preparation lost the configured agent's published discovery results and saw only its static inventory.

Ignore execution purpose only when comparing the catalog source, alongside the already-excluded plugin loading and selection fields. Keep purpose in execution owner identity and keep isolated plugin loading intact. The configured agent remains the catalog owner; no discovery, cache, or fallback is added.

Simplification: +3 production lines (two identity-field exclusions and one ownership comment), no new machinery. The existing integration test already protects the regression, so its assertions remain unchanged instead of adding duplicate coverage. This restores the documented shared-catalog contract; no public contract changes.

Evidence

  • Scheduled main failure, head a677064: requireImageCapableModel / resolveImageRuntime reports the unknown discovered model. The offending commit is an ancestor of this evidence head.
  • Local unchanged-main reproduction: the exact integration test fails with the same error (90.56 seconds test time; 334.36 seconds wrapper wall time, including cold worker preparation).
  • With the fix, node scripts/run-vitest.mjs src/gateway/server-methods/models-dispatch.catalog.integration.test.ts src/agents/prepared-model-runtime.owner-selection.test.ts src/agents/prepared-model-runtime.catalog-owner.test.ts --maxWorkers=1 passes all 57 tests. The Gateway regression takes 20.38 seconds; the complete focused command takes 95.61 seconds including worker preparation. This proves chat and image dispatch, profile/transport selection, in-flight completion after withdrawal, later rejection, and separate execution generations.
  • Changed-file oxfmt, repository lint, and git diff --check pass. No Testbox/Crabbox lease was allocated; broad validation belongs to PR CI. Timing differences are test-run context, not a performance claim.

Independent subagent review (autoreview route unavailable): scoped-clean, no actionable P0–P2 findings. The helper refused the configured provider route; operator configuration was not changed. Review confirmed that execution generations stay separate and agent/auth/environment/workspace identity checks remain intact.

PR CI passed on exact head 19b719491f9d524eb2ae8854c62954c0cb86ef4a: all 62 non-skipped checks green, including the required gate; no reruns. CI run.

@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review October 24, 2026 21:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T21:58:54.954276Z 19b7194 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Oct 24, 2026
@steipete
steipete merged commit 4c3bf18 into main Oct 24, 2026
195 of 197 checks passed
@steipete
steipete deleted the steipete/perf-micro-main-red-live-only-model-20260919 branch October 24, 2026 22:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
RomneyDa added a commit that referenced this pull request Oct 28, 2026
…2952)

(cherry picked from commit 4c3bf18)

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit e7b67ef13e85a316d10dd5a1691c81784d07a6be)
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…r test

Backport 0c77c1d (#182952, main 4c3bf18, which shipped no test)
carried a test adapted from another line that seeded discovered rows only
through the in-process catalog builder. On this branch Gateway-configured
agents load their full catalog through the catalog worker, so the setup never
saw the row and the test failed from the commit that added it. Seed the worker
mock too and match the row by its own fields (the catalog adds provenance).
Verified: the test fails at the lease assertion when #182952's
runtimePluginPurpose normalization is removed and passes with it.
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…s lane FRV tests (#187567)

* docs(secrets): include Beam mirror token in credential matrix

(cherry picked from commit dfa7774)

* test(infra): supply versions list in astral ClawHub detail fixture

The backport of #182753 (74e414a) dropped the versions: { items: [] }
default that main's readDetail helper supplies, so the release-branch
fixture fails the versions response guard.

* test(web-search): carry #179703 envelope bound into release security test

Main's 47c1c2a raised the aggregate JSON envelope bound from 22,000 to
23,000 because rows now keep their titles and site names (more wrap
envelopes); the 20,000-char untrusted content cap is unchanged. The release
backport 2b35452 put the new tests in web-search-budget.test.ts and
missed this assertion in the release-only security test file.

* test(auto-reply): expect preserved multiline /side input in registry test

Backport 9b93c22 (#176293, main d7359a7) intentionally preserves
multiline /btw, /side and /loop arguments. The release-only registry test
still asserted the old first-line truncation for /side; main no longer has
that assertion.

* test(pdf): hold a Codex OAuth login in the ChatGPT PDF fixture

Backport f41ea65 (#181356, main f64e38f) intentionally resolves a
ChatGPT catalog row with only an API key as stale, routing it to the Platform
contract. Port main's matching fixture update from 280c7c7 (shipped
inside an unrelated visitor-access commit) so the test exercises the Codex
subscription route it names.

* test(auto-reply): expect agent inventory workspace for reply runtime

Release backports 23e702a (#185573) and 59b6c10 (main 786cfd7)
together adopt #185512's design: replies prepare the configured agent
inventory workspace (preserveWorkspaceDirOnRefresh: false) and nested runs
borrow it, while the reply workspace stays the execution boundary. Main's
copy of this test no longer asserts the acquire input (db8180b).

* test(agents): expect unverifiable stateless reasoning to be omitted

Backport c93fe0b (#185774, main 86ddabd) intentionally stops
replaying reasoning that has neither a replay ID nor authorized encrypted
state when store is disabled. Main removed this test earlier (542e074);
the release copy still expected the unverifiable item.

* fix(plugins): allow retained registrations on reused inspections

Catalog scope growth can reuse the same physical registry inspection. Keep
its already-owned registrations in place instead of transferring them into
their own resource map and failing with a duplicate-custody error.

Preserve live-owner validation and all distinct-inspection transfer and
disposal behavior. Extend the resource-backed lifecycle regression with
self-adoption before abandoned growth and promotion.

Proof: regression fails on unchanged production; fixed resource lifecycle
and all seven selected catalog cases pass. Targeted native types, typed
lint, format, suppression tests, runtime/static cycles and planner pass.
Independent review found no actionable P0-P2 findings.

(cherry picked from commit 52df852)

* test(agents): seed the worker catalog in the isolated-completion owner test

Backport 0c77c1d (#182952, main 4c3bf18, which shipped no test)
carried a test adapted from another line that seeded discovered rows only
through the in-process catalog builder. On this branch Gateway-configured
agents load their full catalog through the catalog worker, so the setup never
saw the row and the test failed from the commit that added it. Seed the worker
mock too and match the row by its own fields (the catalog adds provenance).
Verified: the test fails at the lease assertion when #182952's
runtimePluginPurpose normalization is removed and passes with it.

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant