Skip to content

fix(models): isolate catalog refresh failures across source changes - #142622

Merged
obviyus merged 2 commits into
mainfrom
fix/catalog-refresh-retention
Sep 8, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/catalog-refresh-retention

Conversation

@obviyus

@obviyus obviyus commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where a catalog refresh failure remained visible after changing the provider endpoint. The replacement catalog dropped the previous source's learned models but still reported refreshFailed: true until another refresh succeeded.

Why This Change Was Made

Catalog attempt status now belongs to its captured source, plugin generation and prepared credentials. Compatible reloads share that status; a replacement source starts without the previous error. This replaces the unscoped error field while preserving failed first attempts, retained inventory, current-generation checks and the original error value.

User Impact

A new catalog source no longer inherits an unrelated refresh warning. A logging-only reload keeps the warning for the same source until a successful refresh clears it.

Evidence

  • The public baseline reproduced the stale warning after an endpoint-only hot reload on the same Gateway.
  • The compiled candidate passes warm failure, neutral reload, source replacement and recovery through the public Gateway interface. Independent source-blind acceptance passes all six clauses, including one fresh cold first-attempt failure and recovery sequence.
  • All 45 focused runtime reload and scoped-refresh tests passed. The five added scenarios passed again after placement in the existing suites. Formatting and scoped lint passed.
  • Required CI passed for b41792da7118a37137071607aef27fd39e269755. Public proof used its actual CI merge build, 1b284af37e091fab9fc58297e4478a0f701ed6fd.

Proof uses synthetic backend fixtures. It does not claim native-client, browser, account-policy or inference coverage.

AI-assisted.

@obviyus obviyus self-assigned this Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Sep 8, 2026
@obviyus
obviyus marked this pull request as ready for review September 8, 2026 22:10
@obviyus
obviyus requested a review from a team as a code owner September 8, 2026 22:10
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 8, 2026, 6:56 PM ET / 22:56 UTC (Revision 3).

ClawSweeper review

What this changes

Tie model-catalog refresh warnings to their provider configuration, plugin metadata, and credentials so replacement sources do not inherit unrelated failures.

Merge readiness

⛔ Blocked before merge - 3 items remain

This remains a useful, focused repair for a defect present on current main. No introduced correctness or security defect was found.

Priority: P2
Reviewed head: b41792da7118a37137071607aef27fd39e269755
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression coverage and no concrete defect found; ownership verification remains separate from patch quality.
Proof confidence 🌊 off-meta tidepool Not applicable: The host identifies a MEMBER author, so the ordinary contributor proof gate is exempt. The body reports public-Gateway failure/reload/recovery observations for the changed catalog owner; those runs were not independently replayed here, and no material authority change triggers additional proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The host identifies a MEMBER author, so the ordinary contributor proof gate is exempt. The body reports public-Gateway failure/reload/recovery observations for the changed catalog owner; those runs were not independently replayed here, and no material authority change triggers additional proof.
Evidence reviewed 10 items Source-scoped status: The reporter shares attempt state only when source identity matches. The builder supplies the same inventory key, plugin fingerprint, and prepared credentials used to determine inventory compatibility.
Current main still needs the repair: Fetched main reads refreshFailed from owner.catalogAttemptError without a source identity. Its relevant production files match the PR merge-base versions, so current-main drift does not supply this repair.
Release comparison: The supplied latest-release revision also contains unscoped catalogAttemptError state and does not contain this source-bound attempt implementation.
Findings None None.
Security None None.

How this fits together

The prepared model runtime supplies the Gateway with configured and discovered model choices. Its catalog status tells clients when discovery failed while keeping usable inventory available.

flowchart TD
  A[Provider configuration] --> D[Catalog source identity]
  B[Plugin metadata and credentials] --> D
  D --> E{Same source?}
  E -->|Yes| F[Share refresh status]
  E -->|No| G[Start fresh status]
  F --> H[Gateway model catalog]
  G --> H
Loading

Decision needed

Question Recommendation
Can secops confirm that the restricted reload-auth test change has the required listed-owner involvement? Confirm secops involvement: Have a listed secops owner review the test change or confirm their existing authorship or request.

Why: The approval marker does not identify verified secops authority, and no submitted owner review is visible.

Before merge

  • Resolve merge risk (P1) - Required secops involvement for the restricted reload-auth test is not established by the available evidence; a team review request alone does not confirm participation.
  • Complete next step (P2) - Establish listed secops-owner involvement for src/agents/prepared-model-runtime.reload-auth.test.ts before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +25, Tests +155. Total +180 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 36 11 +25
Tests 2 160 5 +155
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 196 16 +180

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain source-bound catalog diagnostics and compatible-reload recovery, with listed-owner involvement covering the restricted test change.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain source-bound catalog diagnostics and compatible-reload recovery, with listed-owner involvement covering the restricted test change.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: fail catalog refresh, replace the provider endpoint, then read the replacement catalog before another successful refresh. Current main's getter still reads the shared owner's previous error; this review did not execute that sequence.

Is this the best way to solve the issue?

Yes. Binding diagnostic state to the existing inventory compatibility identity repairs the lifecycle owner without adding configuration, duplicating discovery, or changing authorization.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8459d9be8093.

Labels

Label justifications:

  • P2: Repairs misleading catalog refresh warnings after source changes without evidence of broken inference or message delivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The host identifies a MEMBER author, so the ordinary contributor proof gate is exempt. The body reports public-Gateway failure/reload/recovery observations for the changed catalog owner; those runs were not independently replayed here, and no material authority change triggers additional proof.

Evidence

What I checked:

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • openclaw/openclaw-secops: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-08T22:10:01.199Z sha 93fee25 :: blocked before merge. :: none
  • reviewed 2026-09-08T22:21:34.005Z sha b41792d :: blocked before merge. :: none

@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 142622
head: b41792d
scope: owner-review

@obviyus
obviyus merged commit 73b5c9e into main Sep 8, 2026
181 checks passed
@obviyus
obviyus deleted the fix/catalog-refresh-retention branch September 8, 2026 22:57
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as 73b5c9eb.

Proof: Compiled Gateway warm and cold failure/recovery sequences passed. Independent source-blind acceptance passed all six clauses. All 45 focused tests passed, and required CI is green.

Operation Verified result
Same-source refresh fails Published models remain available with a failure warning.
Logging-only reload The same-source warning remains.
Provider endpoint changes The previous learned models and warning are removed.
Replacement refresh succeeds The new model is published without the warning.

Exact-head local review passed with proof tier A, patch tier B, and no correctness or security findings. All five changed files match the reviewed head in the landed commit; signing and attribution are verified.

The guarded merge used the exact-head owner-review approval for the procedural listed-owner hold. Correctness, security, behavior proof and required CI remained mandatory.

Proof covers synthetic backend behavior; it does not claim native-client, browser, account-policy or inference coverage.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…penclaw#142622)

## What Problem This Solves

Fixes an issue where a catalog refresh failure remained visible after changing the provider endpoint. The replacement catalog dropped the previous source's learned models but still reported `refreshFailed: true` until another refresh succeeded.

## Why This Change Was Made

Catalog attempt status now belongs to its captured source, plugin generation and prepared credentials. Compatible reloads share that status; a replacement source starts without the previous error. This replaces the unscoped error field while preserving failed first attempts, retained inventory, current-generation checks and the original error value.

## User Impact

A new catalog source no longer inherits an unrelated refresh warning. A logging-only reload keeps the warning for the same source until a successful refresh clears it.

## Evidence

- The public baseline reproduced the stale warning after an endpoint-only hot reload on the same Gateway.
- The compiled candidate passes warm failure, neutral reload, source replacement and recovery through the public Gateway interface. Independent source-blind acceptance passes all six clauses, including one fresh cold first-attempt failure and recovery sequence.
- All 45 focused runtime reload and scoped-refresh tests passed. The five added scenarios passed again after placement in the existing suites. Formatting and scoped lint passed.
- [Required CI passed](https://github.com/openclaw/openclaw/actions/runs/34285022508) for `b41792da7118a37137071607aef27fd39e269755`. Public proof used its actual CI merge build, `1b284af37e091fab9fc58297e4478a0f701ed6fd`.

Proof uses synthetic backend fixtures. It does not claim native-client, browser, account-policy or inference coverage.

AI-assisted.

Co-authored-by: Ayaan Zaidi <[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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant