Skip to content

test(targets): add 14 unit tests for targetExhaustion handler - #5296

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.40from
KooshaPari:pr-010-target-exhaustion-tests
Jun 29, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.40from
KooshaPari:pr-010-target-exhaustion-tests

Conversation

@KooshaPari

Copy link
Copy Markdown
Contributor

Adds 14 unit tests for the targetExhaustion handler covering:

@KooshaPari
KooshaPari requested a review from diegosouzapw as a code owner June 29, 2026 05:17
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

…havior

The 3 quota-path cases asserted a mental model that diverged from
applyComboTargetExhaustion's real semantics, so they failed against the
release code:

- isProviderExhaustedReason reads reason/creditsExhausted/dailyQuotaExhausted,
  not error.code → signal exhaustion via creditsExhausted/reason.
- classifyErrorText flags 'quota exceeded' (not 'exhausted your quota') as
  QUOTA_EXHAUSTED → use a matched phrase.
- openai is NOT a per-model-quota provider; gemini is → use gemini for the
  per-model-quota (advance, don't exhaust) case.

Each test keeps its original intent; only the inputs/provider are corrected to
exercise the real code path. 13/13 green.

Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.40 June 29, 2026 06:00
KooshaPari and others added 2 commits June 29, 2026 03:12
…runner

The new open-sse/services/combo/__tests__/targetExhaustion.test.ts matched
vitest.config.ts's include glob but NOT vitest.mcp.config.ts (the config that
test:vitest actually runs in CI), so check:test-discovery flagged it as an
orphan that no runner collects. Register the combo/__tests__ glob in
vitest.mcp.config.ts and mirror it in the check-test-discovery COLLECTORS so
the suite runs in the blocking test-vitest job. 13/13 green; discovery OK.

Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
# Conflicts:
#	scripts/check/check-test-discovery.mjs
#	vitest.mcp.config.ts
@diegosouzapw
diegosouzapw merged commit 223e67a into diegosouzapw:release/v3.8.40 Jun 29, 2026
7 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jun 29, 2026
@KooshaPari
KooshaPari deleted the pr-010-target-exhaustion-tests branch August 13, 2026 06:55
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
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.

2 participants