Skip to content

refactor(qa-lab): reuse model reference splitter - #130317

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/qa-model-ref-splitter
Aug 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/qa-model-ref-splitter

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The QA runner model catalog maintained a second parser for provider/model references beside the established QA model-selection parser. Keeping both implementations made a simple internal contract easier to drift.

Why This Change Was Made

The catalog now reuses the plugin-owned splitQaModelRef helper and removes its private duplicate. Catalog coverage also asserts the parsed provider for OpenAI and Anthropic rows.

The canonical owner remains inside the QA Lab plugin. No SDK, package export, config, persistence, protocol, or user-visible behavior changes.

User Impact

No user-visible behavior change. QA model catalog parsing now has one canonical implementation.

Evidence

  • Exact pushed head: 4a7735098972179056711b25acb10775c1563082
  • node_modules/.bin/oxfmt --check extensions/qa-lab/src/model-catalog.runtime.ts extensions/qa-lab/src/model-catalog.runtime.test.ts
  • pnpm exec vitest run extensions/qa-lab/src/model-catalog.runtime.test.ts - 4 tests passed
  • pnpm check:import-cycles - 0 runtime value cycles
  • pnpm check:changed passed twice on the same patch before the final mainline refresh.
  • Fresh exact-head pnpm check:changed reached extension typecheck, then stopped only because the shared worktree dependency symlink predates the newly merged IMAP plugin dependencies (imapflow, mailauth, mailparser). Per worktree policy, no install was run inside the Codex worktree; hosted CI will install the exact current lockfile.
  • Fresh Autoreview: clean, 0.99, no actionable findings.
  • Exact-head Blacksmith Testbox: provider blacksmith-testbox, lease tbx_01m10rn5zhe0198e05s36nybfw, Actions run https://github.com/openclaw/openclaw/actions/runs/33040433439. Delegated remote-fetch sync completed; expected, local, and live PR SHA were all 4a7735098972179056711b25acb10775c1563082; focused catalog tests passed 4/4; timing receipt recorded exitCode: 0 and runStatus: succeeded.
  • AWS Crabbox run run_0ba94b4e6df3, lease cbx_de6bb8a16264: fresh public-network checkout, no instance role, no Tailscale, no hydration, frozen install, exact head 4a7735098972179056711b25acb10775c1563082, 4/4 focused tests passed. Lease released after proof.
  • The trusted bootstrap was uploaded with a transient umask 022 insertion because the current AWS image otherwise creates its Node install root as root-only and cannot expose the pinned binaries to the unprivileged test user. This is a Crabbox bootstrap follow-up, not a branch change.

Root cause: two QA Lab consumers independently implemented the same slash validation and provider/model projection.

Architectural owner and canonical fix: extensions/qa-lab/src/model-selection.ts already owns QA model-reference parsing, so model-catalog.runtime.ts now imports that helper.

Removed path: the private splitModelKey implementation.

Production LOC: +2/-12, net -10. Tests: +5/-2.

Sibling coverage: existing model-selection callers remain unchanged; catalog tests cover both OpenAI and Anthropic provider projection. Malformed references retain the existing shared-helper behavior.

Changelog: not required for an internal behavior-neutral refactor.

ClawSweeper rank-up disposition: completed. The sole remaining move was normal maintainer review; native review artifacts record no actionable findings and recommend READY FOR /prepare-pr.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vincentkoc vincentkoc self-assigned this Aug 26, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 26, 2026 19:42
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 4:23 PM ET / 20:23 UTC.

ClawSweeper review

What this changes

The PR replaces QA Lab’s duplicate provider/model reference parser with its existing shared parser and adds catalog assertions for parsed providers.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open for normal maintainer review: current main still has the duplicate catalog parser, while this focused refactor routes that call site through the existing QA Lab helper without changing public behavior.

Priority: P3
Reviewed head: 4a7735098972179056711b25acb10775c1563082

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrow patch removes duplicated logic, preserves the owner boundary, and adds useful catalog-level assertions.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal refactor is exempt from the external contributor real-behavior-proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal refactor is exempt from the external contributor real-behavior-proof gate.
Evidence reviewed 6 items Current main still duplicates parsing: Current main retains the private catalog parser, so the PR's central cleanup is not already implemented.
Canonical owner exists on main: The QA Lab model-selection module already owns the identical provider/model split contract used by gateway configuration and scenario evaluation.
Changed call site reuses the owner: The proposed catalog path replaces only its private parser call with the shared QA Lab helper and preserves the existing unknown-provider behavior.
Findings None None.
Security None None.

Live Verification

Command: pnpm test extensions/qa-lab/src/model-catalog.runtime.test.ts

Result: FAIL (failed) — step 1 run pnpm test extensions/qa-lab/src/model-catalog.runtime.test.ts: previous terminal command was still running after 30 seconds: "pnpm test extensions/qa-lab/src/model-catalog.runtime.test.ts"

$ node --import tsx scripts/test-projects.mts extensions/qa-lab/src/model-catalog.runtime.test.ts
[test] starting test/vitest/vitest.extension-qa.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-130317-FKqmJA/target

Assertions:

  • FAIL expect_output: qa runner model catalog

How this fits together

QA Lab builds a model catalog from configured provider/model rows for its runner. The catalog parser feeds normalized provider and model fields into selectable QA runner options.

flowchart LR
  A[Configured model rows] --> B[QA model catalog]
  B --> C[Shared model reference parser]
  C --> D[Normalized provider and model]
  D --> E[QA runner options]
Loading

Before merge

  • Complete next step (P2) - No actionable repair blocker was found; this maintainer-authored PR should proceed through normal review.
Agent review details

Security

None.

PR surface

Source -10, Tests +3. Total -7 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 12 -10
Tests 1 5 2 +3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 7 14 -7

Review metrics

Metric Value Why it matters
Production versus test delta production -10 net; tests +3 net The change removes a duplicate production parser while adding direct assertions for the retained provider projection.

Technical review

Best possible solution:

Land the single-parser refactor after normal exact-head checks so QA Lab model-reference semantics remain owned by one local helper.

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

Not applicable: this PR refactors an internal parser rather than reporting a user-observable failure.

Is this the best way to solve the issue?

Yes: direct source comparison shows the removed parser is behaviorally identical to QA Lab’s established shared helper, which sibling configuration and scenario paths already use.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a27f7fe56c28.

Labels

Label changes:

  • add P3: This is a small behavior-neutral QA Lab consolidation with no configuration, persistence, or user-flow change.
  • 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: This MEMBER-authored internal refactor is exempt from the external contributor real-behavior-proof gate.

Label justifications:

  • P3: This is a small behavior-neutral QA Lab consolidation with no configuration, persistence, or user-flow change.
  • 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: This MEMBER-authored internal refactor is exempt from the external contributor real-behavior-proof gate.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame attributes the shared helper and catalog duplicate to the same commit, making this the strongest owner-boundary history signal. (role: feature introducer and recent area contributor; confidence: high; commits: 3601020fb4c2; files: extensions/qa-lab/src/model-selection.ts, extensions/qa-lab/src/model-catalog.runtime.ts)

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-08-26T19:40:21.131Z sha 4a77350 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 26, 2026
@vincentkoc
vincentkoc merged commit d561fd3 into main Aug 27, 2026
515 of 521 checks passed
@vincentkoc
vincentkoc deleted the refactor/qa-model-ref-splitter branch August 27, 2026 04:50
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 27, 2026
…-retirement-v13

* origin/main: (243 commits)
  fix: preserve Gateway error reasons in text logs (#130645)
  refactor(video): deduplicate generation contracts (#130635)
  fix(agents): preserve direct-message sender identity (#124548)
  fix(agents): preserve silent reply after settled tools (#130675)
  fix(talk): preserve replacement speech when an old utterance is canceled (#130687)
  fix(browser): preserve literal names and formatter-owned snapshot refs (#130599)
  fix(auth): reset only the profile replaced by a successful login (#124014)
  fix: bind session creation to admitted Gateway (#130686)
  refactor(qa-lab): reuse model reference splitter (#130317)
  docs(gateway): clarify independent HTTP endpoint switches (#130690)
  fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428)
  refactor(lmstudio): remove unreachable catalog merge (#130689)
  fix(crabbox): restore cloud machine CPU and RAM (#130684)
  fix(secrets): compare proxy bearer tokens directly (#127054)
  fix(matrix): show recovery key availability in text status (#128051)
  fix(ios): restore approval settings navigation and remove duplicate shell state (#130651)
  refactor(agents): use fixed tool-loop defaults directly (#130681)
  refactor(qa-lab): share process tree metric reader (#130419)
  refactor(models): simplify prepared owner access (#130683)
  fix(parallels): main install and update smoke cannot complete (#130658)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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