Skip to content

test(signals): fold reward-risk-engine-branch-coverage.test.ts into its siblings#8582

Merged
JSONbored merged 1 commit into
mainfrom
test/consolidate-reward-risk-engine-coverage
Jul 24, 2026
Merged

test(signals): fold reward-risk-engine-branch-coverage.test.ts into its siblings#8582
JSONbored merged 1 commit into
mainfrom
test/consolidate-reward-risk-engine-coverage

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #8578.

Summary

reward-risk-engine-branch-coverage.test.ts was a #2281 Codecov bolt-on testing buildRepoRewardRisk / rewardRiskFreshnessInternals / buildContributorRewardRiskStrategy from its own disconnected file. Moved each case to the sibling that already owns the function under test:

Test plan

  • npx vitest run test/unit/reward-risk-freshness.test.ts test/unit/reward-risk-reports.test.ts test/unit/reward-risk-competition-fail-closed.test.ts — 34/34 pass
  • npm run typecheck — clean
  • Coverage regression check, before (siblings + bolt-on) vs after (siblings merged): identical on both touched modules —
    • packages/loopover-engine/src/reward-risk.ts: 259/303 branches (85.47%), 152/164 lines (92.68%)
    • packages/loopover-engine/src/signals/engine.ts: 441/1973 branches (22.35%), 437/1351 lines (32.34%)

…ts siblings (#8578)

reward-risk-engine-branch-coverage.test.ts was a #2281 Codecov bolt-on
testing buildRepoRewardRisk / rewardRiskFreshnessInternals /
buildContributorRewardRiskStrategy from its own disconnected file. Move
each case to the sibling that already owns the function under test:

- bestFitLabels tie-break -> reward-risk-freshness.test.ts's existing
  "bestFitLabels keyword anchoring" describe (reused its pick() idiom)
- reviewChurnRisk (high/medium) + maintainer-cut readiness ->
  reward-risk-freshness.test.ts, new describe block (buildRepoRewardRisk)
- buildContributorRewardRiskStrategy tie-break -> reward-risk-reports.test.ts,
  new describe block (the only reward-risk sibling besides the signals-v2/
  signals-coverage family, which stays out of scope per #8574/#8576)

Verified zero coverage regression: packages/loopover-engine/src/reward-risk.ts
(259/303 branches, 152/164 lines) and packages/loopover-engine/src/signals/engine.ts
(441/1973 branches, 437/1351 lines) are identical before and after.
@JSONbored JSONbored self-assigned this Jul 24, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored merged commit b091240 into main Jul 24, 2026
4 checks passed
@JSONbored
JSONbored deleted the test/consolidate-reward-risk-engine-coverage branch July 24, 2026 22:26
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.99%. Comparing base (346c183) to head (2ffb737).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8582      +/-   ##
==========================================
- Coverage   92.54%   91.99%   -0.56%     
==========================================
  Files         796      796              
  Lines       79845    79845              
  Branches    24134    24134              
==========================================
- Hits        73896    73452     -444     
- Misses       4802     5309     +507     
+ Partials     1147     1084      -63     
Flag Coverage Δ
backend 92.95% <ø> (-0.78%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

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.

Fold reward-risk-engine-branch-coverage.test.ts into the reward-risk main suites

1 participant