Skip to content

fix(tests): pass models to combo create in cli-combo-command (#9985) - #31

Closed
jonlwheat2-gif wants to merge 1 commit into
release/v3.8.50from
fix/9985-cli-combo-models
Closed

jonlwheat2-gif wants to merge 1 commit into
release/v3.8.50from
fix/9985-cli-combo-models

Conversation

@jonlwheat2-gif

Copy link
Copy Markdown
Owner

🔴 Issue

Unit test tests/unit/cli-combo-command.test.ts — 3 of 5 tests fail with AssertionError: Expected values to be strictly equal: 1 !== 0:

📍 Where to look

File: tests/unit/cli-combo-command.test.ts — lines 41, 60, 77, 100 (the four runComboCreateCommand calls).

🟢 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.

  • Red (before): runComboCreateCommand(name, strategy, {}) — no models → refused with exit 1
  • Green (after): models: ["openai/gpt-4o-mini"] passed → create succeeds → delete/switch setup works

✅ Verification (Linux, Docker, Node 24.19.0)

  • Pristine file at tip 79c5bdf68: 2 pass / 3 fail (matches reviewer's report)
  • With this fix: 5 pass / 0 fail

…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.
@jonlwheat2-gif
jonlwheat2-gif deleted the fix/9985-cli-combo-models branch August 24, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant