Skip to content

fix(models): resolve authored catalog aliases once - #143967

Merged
steipete merged 1 commit into
mainfrom
codex/authored-catalog-main705
Sep 10, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/authored-catalog-main705

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #130706, #142100. Follows the planner cleanup #143851.

What Problem This Solves

Provider catalog planning can apply an authored alias more than once: entry → middle → final can publish the wrong model and miss the intended discovery donor. Later publication can also reinterpret already-emitted manual/plugin IDs. Source cost and input-presence records use display keys that can attach one row's fields to another model.

Why This Change Was Made

Resolve authored rows once before discovery. Merge same-spelling partial costs, select an exact destination before equivalent rows, and retain omitted fields for the real catalog donor. Carry source cost/input-presence facts with exact provider/model tuple keys. Later catalog publication preserves emitted IDs and applies only the existing Google/Together retirement corrections.

Provider/auth normalization, secret-marker enforcement, root authorship, replace-mode membership, and the generic registry merge contracts remain in their existing owners. Remove their obsolete alias-normalization plumbing and document the catalog behavior. This adds 28 production lines; the separately landed planner cleanup #143851 removed 47.

User Impact

Configured aliases select the intended executable model, explicit input/cost metadata stays attached to its row, and repeated refreshes preserve manual and generated catalog IDs. No setting, dependency, schema, or stored-state design is added.

Evidence

Six intended regressions failed against unchanged main, covering duplicate input ownership, repeated alias resolution in merge/replace modes, and manual catalog drift in both row orders. The fixed focused cohort passed 206 tests across 11 files, including normalization, merging, source metadata, root authorship, discovery, environment handling, retirement corrections, and ModelRegistry. Two mechanical test-fixture type/lint corrections subsequently passed 51 focused tests and targeted lint. Fresh P2 review and the complete changed-file gate passed; production remained unchanged through those fixture corrections.

At exact commit c481d1644dbf8b2d86cd52c8ebed2f4b349681e9, one canonical sourcePerformance build and all 12 compiled public writer/registry scenarios passed. They repeat merge/replace planning and verify exact omissions, duplicate input, namespace-separated costs, and literal manual/generated IDs, including spaced IDs. All 9,253 captured root/workspace build files were unchanged, no checkout TypeScript or HTTP was used, both synthetic state roots were removed, and all processes joined. This runtime build excludes UI and SDK declarations.

The first compiled attempt stopped with an incomplete hand-built metadata fixture. The retained failure was corrected by constructing metadata through the emitted canonical producer; no product changes, rebuild, or restamping occurred. Review also caught an unnecessary trim of emitted IDs, which was reproduced and removed before the final source review.

Materialize authored provider rows before discovery and preserve exact destination fields, including omissions. Keep source input and pricing facts tied to exact provider/model tuples through both merge passes.

Finalize manual and generated catalogs without reinterpreting their identities, while retaining existing Google and Together model retirements. Preserve current session-registry metadata and transport ownership.

Related: #130706, #142100
@clawsweeper

clawsweeper Bot commented Sep 10, 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 docs Improvements or additions to documentation agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 10, 2026
@steipete
steipete marked this pull request as ready for review September 10, 2026 11:01
@steipete
steipete requested a review from a team as a code owner September 10, 2026 11:01
@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 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 7:08 AM ET / 11:08 UTC.

ClawSweeper review

What this changes

The PR resolves configured model aliases before discovery, preserves literal catalog IDs during refresh, and keeps authored pricing and input capabilities attached to the correct model.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main and the latest release retain the problematic normalization path. No blocking correctness finding was identified, and the broader related PR is a decomposition reference rather than a replacement.

Priority: P2
Reviewed head: c481d1644dbf8b2d86cd52c8ebed2f4b349681e9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with meaningful regression coverage, relevant recorded runtime validation, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Its captured body nevertheless reports compiled public writer/registry runs covering the changed planner's repeated refresh, exact omissions, and literal-ID behavior; no material authority change requires additional final-effect proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Its captured body nevertheless reports compiled public writer/registry runs covering the changed planner's repeated refresh, exact omissions, and literal-ID behavior; no material authority change requires additional final-effect proof.
Evidence reviewed 8 items Authored-input ownership: The planner materializes configured rows before discovery and builds source-field records from those selected rows. The materializer merges same-spelling duplicates and gives an exact destination ownership of its omitted fields.
Still necessary on current main: Current main retains authored alias normalization during publication. The planner and normalization modules have no changes between the pinned merge base and fetched main, so this repair is not already present there.
Latest release retains the old behavior: The v2026.9.3 normalization module still applies configured aliases during publication; the tag resolves to the supplied release commit.
Findings None None.
Security None None.

How this fits together

OpenClaw's model catalog planner combines configured models, plugin discovery, and existing catalogs. Its output feeds the session model registry, which supplies model identities and capabilities for agent execution.

flowchart TD
  A[Configured model rows] --> B[Resolve aliases once]
  B --> C[Merge exact model metadata]
  D[Plugin discovery] --> C
  C --> E[Finalize catalog rows]
  F[Existing catalogs] --> E
  E --> G[Session model registry]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +28, Tests +307, Docs +6. Total +341 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 7 106 78 +28
Tests 8 435 128 +307
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 547 206 +341

Review metrics

Metric Value Why it matters
Production versus regression coverage production +28 net lines; tests +307 net lines The production growth implements the missing authored-row selection boundary, with most growth devoted to regression coverage.

Technical review

Best possible solution:

Keep alias interpretation at the authored-input boundary and preserve emitted identities and exact field ownership through subsequent catalog refreshes.

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

Yes, source establishes a concrete path: configure a chained alias and refresh the catalog through repeated normalization. The added regression cases target that path; this review did not execute them.

Is this the best way to solve the issue?

Yes. Resolving authored rows before discovery and retaining literal identities afterward fixes the producer boundary while reusing existing pricing, merge, and retirement helpers.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes model identity and metadata errors in configured catalog refreshes without evidence of an urgent widespread outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Its captured body nevertheless reports compiled public writer/registry runs covering the changed planner's repeated refresh, exact omissions, and literal-ID behavior; no material authority change requires additional final-effect proof.

Label justifications:

  • P2: This fixes model identity and metadata errors in configured catalog refreshes without evidence of an urgent widespread outage.
  • 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 ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Its captured body nevertheless reports compiled public writer/registry runs covering the changed planner's repeated refresh, exact omissions, and literal-ID behavior; no material authority change requires additional final-effect proof.

Evidence

What I checked:

  • Authored-input ownership: The planner materializes configured rows before discovery and builds source-field records from those selected rows. The materializer merges same-spelling duplicates and gives an exact destination ownership of its omitted fields. (src/agents/models-config.providers.normalize.ts:143, c481d1644dbf)
  • Still necessary on current main: Current main retains authored alias normalization during publication. The planner and normalization modules have no changes between the pinned merge base and fetched main, so this repair is not already present there. (src/agents/models-config.providers.normalize.ts:80, 341932a8ef40)
  • Latest release retains the old behavior: The v2026.9.3 normalization module still applies configured aliases during publication; the tag resolves to the supplied release commit. (src/agents/models-config.providers.normalize.ts:80, 1391f7cd2d40)
  • Regression coverage: The added planner cases exercise chained aliases, exact-row omissions, namespace-separated costs, duplicate input ownership, merge/replace modes, and repeated planning. Root-authorship coverage preserves manual and generated IDs in both row orders. (src/agents/models-config.model-input-presence.test.ts:116, c481d1644dbf)
  • Captured runtime evidence: The supplied body snapshot, sourceRevision 34c56c4cd4b1e7e95ee75a0d78ff15fc367cf65ecaf7b61618282e7828e0b314, reports six failing pre-fix regressions, 206 passing focused tests, and 12 compiled public writer/registry scenarios at the reviewed head. Those scenarios cover repeated merge/replace planning and literal manual/generated IDs, including whitespace. These are contributor-recorded results; this read-only review did not execute them. (c481d1644dbf)
  • Implementation boundary: The newly imported normalization helper belongs to the repository's private model-catalog-core workspace package and only performs existing embedded Google-name corrections. The changed path does not depend on the Codex harness or protocol. (packages/model-catalog-core/src/provider-model-id-normalization.ts:223, c481d1644dbf)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: 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.

@steipete
steipete merged commit 11a267d into main Sep 10, 2026
252 checks passed
@steipete
steipete deleted the codex/authored-catalog-main705 branch September 10, 2026 11:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 11, 2026
Materialize authored provider rows before discovery and preserve exact destination fields, including omissions. Keep source input and pricing facts tied to exact provider/model tuples through both merge passes.

Finalize manual and generated catalogs without reinterpreting their identities, while retaining existing Google and Together model retirements. Preserve current session-registry metadata and transport ownership.

Related: openclaw#130706, openclaw#142100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation 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: L 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