Repository navigation
refactor(qa-lab): reuse model reference splitter - #130317
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 4:23 PM ET / 20:23 UTC. ClawSweeper reviewWhat this changesThe PR replaces QA Lab’s duplicate provider/model reference parser with its existing shared parser and adds catalog assertions for parsed providers. Merge readinessKeep 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 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherQA 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -10, Tests +3. Total -7 across 2 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…-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) ...
What Problem This Solves
The QA runner model catalog maintained a second parser for
provider/modelreferences 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
splitQaModelRefhelper 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
4a7735098972179056711b25acb10775c1563082node_modules/.bin/oxfmt --check extensions/qa-lab/src/model-catalog.runtime.ts extensions/qa-lab/src/model-catalog.runtime.test.tspnpm exec vitest run extensions/qa-lab/src/model-catalog.runtime.test.ts- 4 tests passedpnpm check:import-cycles- 0 runtime value cyclespnpm check:changedpassed twice on the same patch before the final mainline refresh.pnpm check:changedreached 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.blacksmith-testbox, leasetbx_01m10rn5zhe0198e05s36nybfw, Actions runhttps://github.com/openclaw/openclaw/actions/runs/33040433439. Delegated remote-fetch sync completed; expected, local, and live PR SHA were all4a7735098972179056711b25acb10775c1563082; focused catalog tests passed 4/4; timing receipt recordedexitCode: 0andrunStatus: succeeded.run_0ba94b4e6df3, leasecbx_de6bb8a16264: fresh public-network checkout, no instance role, no Tailscale, no hydration, frozen install, exact head4a7735098972179056711b25acb10775c1563082, 4/4 focused tests passed. Lease released after proof.umask 022insertion 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.tsalready owns QA model-reference parsing, somodel-catalog.runtime.tsnow imports that helper.Removed path: the private
splitModelKeyimplementation.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.