Repository navigation
fix(tests): pass models to combo create in cli-combo-command (#9985) - #31
Closed
jonlwheat2-gif wants to merge 1 commit into
Closed
jonlwheat2-gif wants to merge 1 commit into
jonlwheat2-gif wants to merge 1 commit into
Conversation
…uzapw#9985) diegosouzapw#11162 (b384455) made combo create refuse combos without any model, but this file was missed. The three failing tests all call runComboCreateCommand(..., {}) with no models, so the command returns exit code 1 (1 !== 0). delete and switch fail as collateral because they create a combo first as setup. Mirror what diegosouzapw#11162 did to its sibling tests: pass models: ["openai/gpt-4o-mini"]. Verified on Linux (Docker, Node 24): 5/5 pass (pristine was 2/5). Reported by reviewer on PR diegosouzapw#11201; written up as diegosouzapw#11203.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔴 Issue
Unit test
tests/unit/cli-combo-command.test.ts— 3 of 5 tests fail withAssertionError: Expected values to be strictly equal: 1 !== 0:combo create inserts a new combo via db module(line 41)combo delete removes the combo(line 73)combo switch updates active combo when server is offline(line 96)Linked issue: 🔴 Release branch not green: release/v3.8.50 diegosouzapw/OmniRoute#9985 (base-red report)
Root-cause PR: fix(api): refuse creating a routing combo without any model diegosouzapw/OmniRoute#11162 (
b3844550d) — madecombo createrefuse a combo with no targets ("combo create requires at least one target..."). It updated 5 sibling combo tests but missed this file. All three failures callrunComboCreateCommand(..., {})with no models → the command now returns exit code 1;deleteandswitchfail as collateral because they each create a combo first as setup.Reported by: reviewer on PR fix(ci): green the release/v3.8.50 base (#9985) diegosouzapw/OmniRoute#11201; written up in detail as base-red: cli-combo-command.test.ts — 3 testes falham com 1 !== 0 desde #11162 (combo create passou a exigir models) diegosouzapw/OmniRoute#11203 (deliberately not opening a competing PR since fix(ci): green the release/v3.8.50 base (#9985) diegosouzapw/OmniRoute#11201 owns the base-green work)
📍 Where to look
File:
tests/unit/cli-combo-command.test.ts— lines 41, 60, 77, 100 (the fourrunComboCreateCommandcalls).🟢 What was fixed
test("combo create inserts a new combo via db module", async () => { ... - const result = await runComboCreateCommand("my-combo", "priority", {}); + // #11162: combo create refuses combos without any model — pass a model + // like the sibling tests updated in that commit. + const result = await runComboCreateCommand("my-combo", "priority", { + models: ["openai/gpt-4o-mini"], + });Same treatment for the dup-combo (both calls), to-delete, and my-switch create calls — mirroring exactly what diegosouzapw#11162 did to its sibling tests.
runComboCreateCommand(name, strategy, {})— no models → refused with exit 1models: ["openai/gpt-4o-mini"]passed → create succeeds → delete/switch setup works✅ Verification (Linux, Docker, Node 24.19.0)
79c5bdf68: 2 pass / 3 fail (matches reviewer's report)