Skip to content

fix: retain catalog generation scope during full assembly - #147323

Merged
steipete merged 1 commit into
mainfrom
codex/r21-full-catalog-scope
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/r21-full-catalog-scope

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Full model-catalog assembly can lose the requested provider filter and load source descriptors even when the catalog belongs to a built plugin generation.

User Impact

Selected-provider catalog reads stay filtered and use their own generation's artifact choice. Callers without a plugin registry retain source-based behavior.

Why This Change Was Made

Run full assembly inside the existing generation scope when a registry is supplied, and forward the existing provider filter to static-context discovery. Unfiltered reads continue to include all providers; the no-registry path still runs directly.

Evidence

Three regression cases failed on the original implementation. The fixed metadata integration file passes all four cases, and 46 sibling tests across five files pass. The tests observe descriptor imports and returned model rows for selected/all-provider assembly, built generations, and the source-only path. The full selected core/coreTests changed gate and managed review passed with no actionable findings.

The full build passed with source and dependency inputs unchanged. Exact-head CI passed with 116 successful jobs and 17 skipped.

Fresh Package Acceptance tested the same candidate head. Package build, integrity and npm 12 installation passed, along with both published [email protected] upgrade scenarios: custom plugin siblings and legacy operator state. The survivor scenarios used manual restart; generation scope, descriptor selection and provider filtering are covered separately by the integration and Gateway evidence below.

One matched baseline-then-candidate Gateway diagnostic, after an explicit provider-scoped catalog refresh and 65-second idle, observed catalog-worker heap after GC fall from 129.682 to 95.801 MiB (-26.126%) and process idle RSS from 662.891 to 580.547 MiB (-82.344 MiB). The selected worker's installed TypeScript compiler/Jiti-Babel script counts went from 1/3 to 0/0. Both arms returned 11 models and one ready provider outcome, with matching checked install/runtime inputs and 26 serving native images; main heap was essentially unchanged.

This is one diagnostic pair, with intrusive GC endpoints and overlapping memory categories, not per-turn allocation, timing, or statistical proof. Script absence applies to that catalog worker; the catalog checks do not establish byte-identical full rows.

Separate real-OpenAI functional validation completed all 12 turns through the normal pnpm openclaw Gateway entry: 10 Code Mode and Tool Search turns with same-session tool-call/result, session-list and chat-history checks, plus two managed web-search and text-fetch turns. Both runs completed without failure or interruption, with stable checked identities and no tracked runtimes remaining after isolated cleanup. These legs establish functional completion and cleanup only; no timing, RSS, per-turn allocation or statistical claim is drawn from them.

@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@steipete
steipete marked this pull request as ready for review September 13, 2026 19:26
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 4:56 PM ET / 20:56 UTC (Revision 2).

ClawSweeper review

What this changes

Keeps model-catalog assembly within its prepared plugin generation, preserves the requested provider filter, and adds coverage for built and source descriptors.

Merge readiness

✅ Ready for maintainer review

The repair remains useful: current main still loses the generation context during static catalog assembly. No actionable patch defects were found, and the updated build evidence resolves the prior review blocker.

Priority: P2
Reviewed head: eda9a5b04b364ca6fa05e6d2fb6dec27ee55b794

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, relevant Gateway observations, and the prior build requirement satisfied.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The recorded baseline/candidate Gateway refresh exercises the changed catalog owner and observes removal of source-compilation scripts while preserving model count and a ready provider outcome; focused tests separately establish filtering and artifact identity.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The recorded baseline/candidate Gateway refresh exercises the changed catalog owner and observes removal of source-compilation scripts while preserving model count and a ready provider outcome; focused tests separately establish filtering and artifact identity.
Evidence reviewed 8 items Introduced repair: The complete pinned introduction contains only catalog assembly and its regression tests. Assembly now retains the supplied registry and metadata scope and forwards providerIds to static-context discovery.
Actual caller and artifact owner: The catalog worker passes request.providerIds into full assembly. Provider descriptor loading reads the generation registry's artifact preference; losing that scope selects the standalone source path. These are OpenClaw-owned contracts, and the added cases disable native harness augmentation.
Behavioral regression coverage: Three added cases observe descriptor imports and returned static rows for selected/built, all/built, and selected/source assembly. Tiny fixture runtime entries throw if activated. Existing source-composition coverage protects merge/replace behavior and current request settings. Tests were inspected, not executed in this read-only review.
Findings None None.
Security None None.

How this fits together

OpenClaw assembles its model catalog from configured models and provider plugin descriptors. The prepared generation determines which plugin artifacts supply those descriptors, and catalog results feed model discovery and selection.

flowchart TD
  A[Catalog refresh request] --> B[Requested providers]
  C[Prepared plugin generation] --> D[Full catalog assembly]
  B --> D
  D --> E[Scoped descriptor discovery]
  E --> F[Built or source artifact]
  F --> G[Model catalog]
  G --> H[Model selection]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +12, Tests +138. Total +150 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 72 60 +12
Tests 1 138 0 +138
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 210 60 +150

Review metrics

None.

Technical review

Best possible solution:

Use the existing generation owner throughout catalog assembly while retaining unfiltered discovery, source-only callers, and configured model precedence.

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

Yes, from source: a provider-scoped refresh reaches static descriptor discovery without its generation scope or provider filter on current main. The added regression cases target this path; this review did not execute them.

Is this the best way to solve the issue?

Yes. The patch carries existing generation facts and the existing filter through the owning assembly function without introducing another discovery mechanism or public API.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The recorded baseline/candidate Gateway refresh exercises the changed catalog owner and observes removal of source-compilation scripts while preserving model count and a ready provider outcome; focused tests separately establish filtering and artifact identity.

Label justifications:

  • P2: This is a bounded catalog correctness and unnecessary-import repair without evidence of an urgent user-facing outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The recorded baseline/candidate Gateway refresh exercises the changed catalog owner and observes removal of source-compilation scripts while preserving model count and a ready provider outcome; focused tests separately establish filtering and artifact identity.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded baseline/candidate Gateway refresh exercises the changed catalog owner and observes removal of source-compilation scripts while preserving model count and a ready provider outcome; focused tests separately establish filtering and artifact identity.

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)
  • steipete: 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 (1 earlier review cycle)
  • reviewed 2026-09-13T19:38:35.670Z sha eda9a5b :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 13, 2026
@steipete
steipete merged commit 1e66cc0 into main Sep 13, 2026
262 checks passed
@steipete
steipete deleted the codex/r21-full-catalog-scope branch September 13, 2026 22:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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