Skip to content

test(combo): revive PR-010 targetExhaustion unit tests - #191

Merged
KooshaPari merged 3 commits into
mainfrom
revive-140-fresh
Jul 2, 2026
Merged

KooshaPari merged 3 commits into
mainfrom
revive-140-fresh

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Revives the unit tests for open-sse/services/combo/targetExhaustion.ts cherry-picked from the original PR-010 branch (which had gone stale against the recovered main).

What

  • Adds open-sse/services/combo/__tests__/targetExhaustion.test.ts (13 tests) covering applyComboTargetExhaustion and ComboExhaustionSets behavior.
  • Wires the suite into the test:vitest runner (check-test-discovery.mjs + vitest.mcp.config.ts).

Validation (Hard Rule #18)

npx vitest run --config vitest.mcp.config.ts open-sse/services/combo/__tests__/targetExhaustion.test.ts
 Test Files  1 passed (1)
      Tests  13 passed (13)

Impl (targetExhaustion.ts) is present on the recovered main; this PR is test-only (no production logic changed).

Co-authored-by: diegosouzapw diegosouza.pw@gmail.com

KooshaPari and others added 3 commits July 2, 2026 01:40
…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>
…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>
@gemini-code-assist

Copy link
Copy Markdown

Warning

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

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ff90fdb8-94ab-4bfe-b546-b01a44ed63a0

📥 Commits

Reviewing files that changed from the base of the PR and between d4d9e8f and 8f966f4.

📒 Files selected for processing (3)
  • open-sse/services/combo/__tests__/targetExhaustion.test.ts
  • scripts/check/check-test-discovery.mjs
  • vitest.mcp.config.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revive-140-fresh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@KooshaPari
KooshaPari merged commit 2e76764 into main Jul 2, 2026
12 of 25 checks passed
@KooshaPari
KooshaPari deleted the revive-140-fresh branch July 2, 2026 08:42
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

L17 Latency Budget Report

--- Latency Budget Summary ---
  Total endpoints checked: 0
  Passed: 0
  Warnings: 0
  Failures: 0

Checked against: budgets/rest-endpoints.yaml.

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

diegosouzapw added a commit that referenced this pull request Sep 3, 2026
…uzapw#12601)

Dependabot alerts #196–#199 — four HIGH advisories on fast-uri
(GHSA-jqff-g426-hqxp, GHSA-fph4-wmhf-6fwf, GHSA-f65p-4m7j-42xc,
GHSA-5jgf-p345-68v8), all patched in 3.1.6.

The root package-lock.json was already on a patched fast-uri (3.1.7) — those
alerts close on their own with the next scan. `electron/package-lock.json` is a
second lockfile and was still pinning 3.1.5, which is what these four alerts are
actually reporting.

Transitive, one copy, pulled by ajv (`^3.0.1`), so a package-lock-only update
lifts it without touching any manifest. The diff is three lines: version,
resolved and integrity for that single entry.

check:lockfile and check:tracked-artifacts pass.

Not fixed here: extract-zip (#191, HIGH, <= 2.0.1) has no published patch. It
comes in through @openai/codex-security and is dev-scope; it needs either an
upstream release or a decision to drop/replace the dependency, neither of which
belongs in a lockfile bump.
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