Skip to content

fix(ci): retire unused model normalization wrapper - #198768

Merged
vincentkoc merged 2 commits into
mainfrom
fix-ci-retire-model-normalization-wrapper-20261114
Nov 14, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix-ci-retire-model-normalization-wrapper-20261114

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The scheduled main dependency checks fail on normalizeDiscoveredAgentModel, an exported one-shot wrapper whose only remaining callers are live-test code.

User Impact

No user-visible change. Production model discovery keeps the same normalizer factory and implementation.

Why This Change Was Made

Remove the obsolete wrapper and have both live-test callers invoke the existing factory with the same arguments and per-call lifetime. The prepared/resolved dynamic-model tests now assert that the returned candidate contains the normalized model rather than spying on the removed wrapper. The closed normalizer mock documents its isolation from provider runtimes, and its obsolete mock-baseline entry is removed. No Knip exception or new baseline allowance is added.

Related: #198591

Evidence

  • Scheduled main dependency check reports the exact export in production dependency and unused-export scans.
  • Repository-wide references confirm only the two live-test callers. The obsolete symbol has no remaining references, and an exact source comparison confirms that the production factory body is unchanged.
  • Formatting, TypeScript syntax parsing, and git diff --check passed. The complete change removes 9 production lines and has a net reduction of 2 test/helper lines plus one removed mock-baseline entry.
  • Full local ClawSweeper review (high reasoning) completed with no actionable correctness or security findings on 08ae8c62b83ede02db3a8d2bc3ce36206008d253..b748dc1c821d1cddf26ad72f00459b008a1d6cf8.
  • Final-head CI passed all 36 executed jobs (29 skipped), including the mock-export guard, type/lint checks, and all three dynamic-model candidate tests. Both prepared and resolved candidates retain the normalizer output.
  • Local tests/type checks and full Knip scans were not run because this checkout has no qualified dependencies. Final-head CI supplied test and type/lint proof. Ordinary PR CI omits full Knip scans. No live provider sweep was run; normalization behavior and its per-call lifetime are unchanged.

@vincentkoc vincentkoc self-assigned this Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 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: XS labels Nov 14, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 14, 2026 08:39
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) November 14, 2026 09:02
@clawsweeper

clawsweeper Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Removes the unused one-shot model normalization wrapper and migrates its live-test callers to the existing factory.

Example: A live-model test normalizes dynamic-test-provider/glm-5.

  • Before: The test calls normalizeDiscoveredAgentModel, which creates a normalizer and immediately applies it.
  • After: The test creates and immediately applies the same normalizer directly, preserving its arguments and lifetime.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, minimal patch with preserved behavior and no findings; available execution evidence covers the first head, and no completed full scanner result is supplied.
Proof confidence 🦐 gold shrimp (3/6) This behavior-preserving cleanup needs no shipped-entry-point demonstration; source comparison confirms the production factory is unchanged, and the first-head changed-check job succeeded.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Scheduled dependency checks report a production export whose remaining consumers are live tests.
Reason: The maintainer-authored change removes obsolete machinery without adding an exception, configuration, or competing normalization path.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-authored cleanup of an unused internal export still present on main, with no actionable correctness or security findings.

Priority: P3
Reviewed head: b748dc1c821d1cddf26ad72f00459b008a1d6cf8

Before merge

None.

Findings

None.

Agent review details

How this fits together

Model discovery passes model rows and scoped configuration through provider normalization and compatibility hooks; production discovery already uses the retained factory.

flowchart TD
  A[Production model discovery] --> C[Normalizer factory]
  B[Live model tests] --> C
  C --> D[Provider normalization hooks]
  D --> E[Model compatibility hooks]
  E --> F[Normalized model rows]
Loading

Technical review

Best possible solution:

Retire the forwarding export while retaining the existing normalizer factory and both callers’ current normalization lifetime.

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

Source confirms that the exported wrapper has only live-test callers and that production discovery already uses the factory; the reported scanner diagnostic could not be inspected because its log storage host is blocked.

Is this the best way to solve the issue?

The patch is the smallest complete cutover: it removes the redundant wrapper, updates both remaining consumers, and leaves normalization implementation and scope unchanged.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Shared normalization owner and wrapper keeps the original intent (89fcceb: Extracted common provider normalization so registry discovery and live tests share the same hooks and compatibility handling.)
  • Factory and normalization lifetime keeps the original intent (730ce41: Reuse provider selections within a synchronous production catalog pass while discarding them afterward; the wrapper retained one-shot behavior.)
  • Dynamic-model candidate coverage keeps the original intent (e794898: Consolidated prepared and resolved default-hook cases into the existing parameterized test; both cases remain covered.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Complete, behavior-preserving cutover: The pinned introduced diff removes only the forwarding production wrapper, migrates both live-test callers with identical arguments and per-call lifetime, adjusts their existing test, and removes the obsolete mock-baseline entry. (src/agents/model-discovery-normalize.ts:15, b748dc1c821d)
  • Still needed on current main: Fetched main retains the wrapper and its two live-test callers; production discovery already invokes createDiscoveredAgentModelNormalizer directly. (src/agents/agent-model-discovery.ts:83, 896cc0cc44d7)
  • Prior owner intent preserved: perf(models): reduce catalog normalization allocations #198591 introduced the factory and moved production discovery to catalog-pass reuse; this PR preserves that implementation and does not extend reuse across live-test calls. (src/agents/model-discovery-normalize.ts:15, 730ce41827c4)
  • Validation and inspection limits: The linked first-head checks-node-changed-1 job succeeded. Exact-head checks-node-changed-1 and the aggregate CI gate remain pending, with no failed exact-head check reported. The scheduled dependency job failed, but its log download redirects to a blocked storage host, so its exact diagnostic was not independently inspected; no tests or full Knip scans were run during this read-only review. (b748dc1c821d)
  • Repository policy applied: Read the full root and agents policies, applied pr-simplify steps 1–3 and the test-audit guidance, and verified the checkout remains clean; no maintainer-notes directory is present. (src/agents/AGENTS.md:12, b748dc1c821d)

Likely related people:

  • Vincent Koc: Raw commit 730ce41 adds src/agents/model-discovery-normalize.ts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 730ce41827c4; files: src/agents/model-discovery-normalize.ts)

PR surface

Source -9, Tests -2, Other -1. Total -12 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 0 9 -9
Tests 3 13 15 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 5 13 25 -12

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This removes an unused internal export without changing user-visible model discovery behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This removes an unused internal export without changing user-visible model discovery behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Verify that the production and all-export Knip scans no longer report the retired symbol.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 14, 2026, 4:05 AM ET / 09:05 UTC.

@vincentkoc
vincentkoc merged commit 01b4c13 into main Nov 14, 2026
138 of 139 checks passed
@vincentkoc
vincentkoc deleted the fix-ci-retire-model-normalization-wrapper-20261114 branch November 14, 2026 09:06
roboclaw-bot added a commit that referenced this pull request Nov 14, 2026
Preserve the independent normalizer repair in #198768 and current main. The only remaining delta is the maintained opt-in Vitest configuration root.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
* fix(ci): retire unused model normalization wrapper

* test: document isolated model normalizer fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant