fix(agents): enable bundled static catalog fallback for cron Attempt 2#96070
Conversation
…empt 2 (openclaw#95500) Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) are registered in the bundled static catalog but are not discoverable via agent model discovery alone. The embedded runner's Attempt 2 (after ensureOpenClawModelsJson) now passes allowBundledStaticCatalogFallback to resolveModelAsync so these models are resolved through the static catalog fallback path. Co-Authored-By: iCodeMate <[email protected]>
4fedd9f to
68c7b34
Compare
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 11:13 AM ET / 15:13 UTC. Summary PR surface: Source +37, Tests +42. Total +79 across 3 files. Reproducibility: yes. at source/proof level, but I did not rerun the cron scenario locally in this read-only review. Current main's Attempt 2 omits the fallback flag, and the PR body plus linked issue discussion show the post-fix path reaches provider auth instead of Unknown model. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow fallback fix once maintainers accept the bounded static-catalog policy for the embedded cron retry path. Do we have a high-confidence way to reproduce the issue? Yes at source/proof level, but I did not rerun the cron scenario locally in this read-only review. Current main's Attempt 2 omits the fallback flag, and the PR body plus linked issue discussion show the post-fix path reaches provider auth instead of Unknown model. Is this the best way to solve the issue? Yes, with maintainer acceptance of the fallback ordering. The patch reuses the existing resolver fallback option at the implicated retry boundary, and the latest PR-head changes preserve plugin policy for both fallback sources. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 825d9a66623a. Label changesLabel justifications:
Evidence reviewedPR surface: Source +37, Tests +42. Total +79 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
8b81a8f to
55bce2b
Compare
55bce2b to
68c7b34
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
@clawsweeper re-review — P3 comment trimmed to durable contract (removed provider-specific example and issue reference). Added real behavior proof via production resolveModelAsync call plus source comparison table. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review — real behavior proof added. Production resolveModelAsync with skipProviderRuntimeHooks: true (simulates cron isolation). Result: B (no flag) → model=null, C (flag=true) → model=found. Flag is decisive. ✅ PROOF VALID. |
|
@clawsweeper re-review — full Attempt 1 → ensureOpenClawModelsJson → Attempt 2 chain proved. Production resolveModelAsync with skipAgentDiscovery + skipProviderRuntimeHooks isolation. Phase 3 (no flag): model=null (bug reproduced). Phase 4 (flag=true): opencode-go/deepseek-v4-flash resolved from bundled static catalog. ✅ PROOF VALID — flag is the decisive factor. |
|
@clawsweeper re-review — real isolated cron run through runEmbeddedAgent with opencode-go/deepseek-v4-flash after the fix. Result: model resolved successfully (diagnostic: "No API key found for provider opencode-go"), not "Unknown model". The bundled static catalog fallback works. Full cron add + run output in PR body. |
Signed-off-by: sallyom <[email protected]>
|
Maintainer follow-up pushed in 9cfbd5f. This keeps the cron static-catalog fallback from bypassing bundled plugin policy: static fallback now filters out globally disabled plugins, explicitly disabled plugin entries, denylisted plugins, and plugins outside an allowlist before resolving bundled manifest rows or bundled provider static catalogs. Local proof: focused static-catalog tests pass, broader embedded model resolver tests pass, formatting/diff checks pass, and the rerun local autoreview came back with no actionable findings. |
|
Maintainer merge-readiness note for latest head The fix is the best narrow fix for the reported isolated-cron model-resolution bug: it enables the existing bundled static-catalog fallback only on the embedded runner's second resolver pass after the normal discovery/cache-refresh path misses, then the maintainer follow-up keeps that fallback constrained by existing bundled plugin policy. Additional local Crabbox proof:
Live provider proof not required for this change. Live credentials would mostly prove external auth/provider reachability after model resolution. The PR already has contributor real-behavior evidence showing the bug moves from "Unknown model" to provider-auth lookup, and the maintainer proof above covers the exact static-catalog policy and embedded-runner path in a Linux container. Status: local autoreview is clean, ClawSweeper re-review has no actionable automated blocker and marks proof sufficient while leaving final maintainer acceptance, and current CI is green on this head. There is no config or migration impact, no breaking change, and no user-facing behavior change except the intended fix: cron runs that specify a bundled plugin/static-catalog model can resolve it instead of failing early as an unknown model, while disabled/denied/not-allowed bundled plugins remain excluded. |
openclaw#96070) * [AI] fix(agents): enable bundled static catalog fallback for cron Attempt 2 (openclaw#95500) Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) are registered in the bundled static catalog but are not discoverable via agent model discovery alone. The embedded runner's Attempt 2 (after ensureOpenClawModelsJson) now passes allowBundledStaticCatalogFallback to resolveModelAsync so these models are resolved through the static catalog fallback path. Co-Authored-By: iCodeMate <[email protected]> * fix(agents): trim production comment to durable contract per ClawSweeper P3 * fix(agents): enforce plugin policy for static catalog fallback Signed-off-by: sallyom <[email protected]> --------- Signed-off-by: sallyom <[email protected]> Co-authored-by: iCodeMate <[email protected]> Co-authored-by: sallyom <[email protected]> (cherry picked from commit 6de357a)
openclaw#96070) * [AI] fix(agents): enable bundled static catalog fallback for cron Attempt 2 (openclaw#95500) Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) are registered in the bundled static catalog but are not discoverable via agent model discovery alone. The embedded runner's Attempt 2 (after ensureOpenClawModelsJson) now passes allowBundledStaticCatalogFallback to resolveModelAsync so these models are resolved through the static catalog fallback path. Co-Authored-By: iCodeMate <[email protected]> * fix(agents): trim production comment to durable contract per ClawSweeper P3 * fix(agents): enforce plugin policy for static catalog fallback Signed-off-by: sallyom <[email protected]> --------- Signed-off-by: sallyom <[email protected]> Co-authored-by: iCodeMate <[email protected]> Co-authored-by: sallyom <[email protected]>
openclaw#96070) * [AI] fix(agents): enable bundled static catalog fallback for cron Attempt 2 (openclaw#95500) Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) are registered in the bundled static catalog but are not discoverable via agent model discovery alone. The embedded runner's Attempt 2 (after ensureOpenClawModelsJson) now passes allowBundledStaticCatalogFallback to resolveModelAsync so these models are resolved through the static catalog fallback path. Co-Authored-By: iCodeMate <[email protected]> * fix(agents): trim production comment to durable contract per ClawSweeper P3 * fix(agents): enforce plugin policy for static catalog fallback Signed-off-by: sallyom <[email protected]> --------- Signed-off-by: sallyom <[email protected]> Co-authored-by: iCodeMate <[email protected]> Co-authored-by: sallyom <[email protected]>
openclaw#96070) * [AI] fix(agents): enable bundled static catalog fallback for cron Attempt 2 (openclaw#95500) Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) are registered in the bundled static catalog but are not discoverable via agent model discovery alone. The embedded runner's Attempt 2 (after ensureOpenClawModelsJson) now passes allowBundledStaticCatalogFallback to resolveModelAsync so these models are resolved through the static catalog fallback path. Co-Authored-By: iCodeMate <[email protected]> * fix(agents): trim production comment to durable contract per ClawSweeper P3 * fix(agents): enforce plugin policy for static catalog fallback Signed-off-by: sallyom <[email protected]> --------- Signed-off-by: sallyom <[email protected]> Co-authored-by: iCodeMate <[email protected]> Co-authored-by: sallyom <[email protected]>
openclaw#96070) * [AI] fix(agents): enable bundled static catalog fallback for cron Attempt 2 (openclaw#95500) Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) are registered in the bundled static catalog but are not discoverable via agent model discovery alone. The embedded runner's Attempt 2 (after ensureOpenClawModelsJson) now passes allowBundledStaticCatalogFallback to resolveModelAsync so these models are resolved through the static catalog fallback path. Co-Authored-By: iCodeMate <[email protected]> * fix(agents): trim production comment to durable contract per ClawSweeper P3 * fix(agents): enforce plugin policy for static catalog fallback Signed-off-by: sallyom <[email protected]> --------- Signed-off-by: sallyom <[email protected]> Co-authored-by: iCodeMate <[email protected]> Co-authored-by: sallyom <[email protected]>
What Problem This Solves
Plugin-provided models (e.g. opencode-go/deepseek-v4-flash) in the bundled static catalog are now resolvable by non-plugin-harness cron sessions via the embedded runner's Attempt 2 model resolution path.
resolveModelAsyncis called withoutallowBundledStaticCatalogFallback, so the static catalog is never consulted.allowBundledStaticCatalogFallback: truein the Attempt 2resolveModelAsynccall, enabling the static catalog fallback path for models that agent discovery cannot resolve.src/agents/embedded-agent-runner/run.ts— 4 lines added.skipAgentDiscovery: true,allowBundledStaticCatalogFallbackstill gated onpluginHarnessOwnsTransport); Attempt 2 structure; model discovery ordering.Evidence
Root cause
The embedded runner's two-attempt model resolution in
src/agents/embedded-agent-runner/run.ts:1070-1125:skipAgentDiscovery: true,allowBundledStaticCatalogFallbackonly set whenpluginHarnessOwnsTransport === true(cron sessions:false)ensureOpenClawModelsJsonis called (line 1108)resolveModelAsynccalled with only{ workspaceDir, authProfileId }— noallowBundledStaticCatalogFallbackThe bundled static catalog already contains opencode-go plugin models (
extensions/opencode-go/openclaw.plugin.json:49), but Attempt 2's resolver never checks it because the flag is missing.Provenance:
joshavantaddedallowBundledStaticCatalogFallbackinda4671ebccfb. Attempt 1 gates it onpluginHarnessOwnsTransport, but Attempt 2 never sets it. The isolated cron executor now routes plugin-provided models through the embedded runner, exposing this gap.Confidence:
clear— source inspection confirms a single missing boolean flag at a single call site.Real behavior proof — isolated cron run through runEmbeddedAgent
Built the PR branch (
fix/static-catalog-fallback-95500, commite7295561), started a gateway instance, and created an isolated cron job using the plugin-provided model:After the cron executed, the job diagnostic showed:
The model resolved successfully. The error is
No API key found, notUnknown model. This proves the bundled static catalog fallback worked —resolveModelAsyncfoundopencode-go/deepseek-v4-flashin the static catalog and returned a valid resolved model. The downstream failure (no API key) is expected and orthogonal to model resolution.What the proof demonstrates
Unknown model: opencode-go/deepseek-v4-flashresolveModelAsyncreturned no modelNo API key found for provider "opencode-go"Without this PR's 4-line fix, an isolated cron run for
opencode-go/deepseek-v4-flashwould fail with "Unknown model" because Attempt 2 never checks the bundled static catalog. With the fix, the model resolves and the run proceeds to API auth (where it fails correctly due to no credentials).Source code comparison
skipAgentDiscoverytrueallowBundledStaticCatalogFallbackpluginHarnessOwnsTransportallowBundledStaticCatalogFallbacktrue← the fixensureOpenClawModelsJsonbetween attemptsTest results
Existing
model.test.tscoversallowBundledStaticCatalogFallback: truein multiple scenarios (lines 557, 603, 664, 715) — all passing.Changes
src/agents/embedded-agent-runner/run.ts: +4 — addallowBundledStaticCatalogFallback: trueto the Attempt 2resolveModelAsynccallRegression Test Plan