Skip to content

test(engine): cover reviewer-consensus-calibration under root vitest#8399

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
claytonlin1110:feat/reviewer-consensus-calibration-vitest-8349-v2
Jul 24, 2026
Merged

test(engine): cover reviewer-consensus-calibration under root vitest#8399
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
claytonlin1110:feat/reviewer-consensus-calibration-vitest-8349-v2

Conversation

@claytonlin1110

Copy link
Copy Markdown
Contributor

What

packages/loopover-engine/src/reviewer-consensus-calibration.ts (658 lines, ~128 branches) already had a full, passing node:test suite one directory over — but Codecov's codecov/patch gate only reads root vitest coverage, so the package's largest branch surface reported ~0% despite real tests. Same blind-spot class as #6250.

Changes

  • Added test/unit/reviewer-consensus-calibration.test.ts (vitest), importing the four public APIs from the engine barrel — matching the test/unit/calibration-dashboard.test.ts pattern.
  • Mirrored every scenario from packages/loopover-engine/test/reviewer-consensus-calibration.test.ts, plus remaining branch edges, so the module hits 100% statements/branches/functions/lines under npm run test:coverage.
  • No changes under packages/loopover-engine/src/** or packages/loopover-engine/test/**.
  • Documented the root vitest mirror in packages/loopover-engine/README.md (also trips the engine CI path filter so this PR runs the unscoped suite — a test-only diff under scoped --changed currently writes empty lcov and fails validate-tests-merge).

Closes

Closes #8349

Verification

  • npx vitest run test/unit/reviewer-consensus-calibration.test.ts — 23 passed
  • Coverage on packages/loopover-engine/src/reviewer-consensus-calibration.ts100% stmts/branches/funcs/lines
  • Prior attempt (test(engine): cover reviewer-consensus-calibration under root vitest #8374) failed CI solely on the scoped-selection empty-lcov hole; this PR includes the README note so engine=true and the full suite runs.

…SONbored#8349)

The engine package already had a full node:test suite for this module, but
Codecov's codecov/patch gate only reads root vitest coverage — so the
package's largest branch surface (~128 branches) reported ~0% despite real
tests one directory over. Mirror every existing scenario (plus remaining
branch edges) into test/unit/ so the file reaches 100% line/branch coverage
under npm run test:coverage. No source or package-test changes.

Also note the root vitest mirror in packages/loopover-engine/README.md so
the engine path filter selects the unscoped CI suite (a test-only diff
under --changed currently writes empty lcov and trips validate-tests-merge).
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 92.41%. Comparing base (ce5f5aa) to head (d0f29b4).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8399      +/-   ##
==========================================
+ Coverage   92.17%   92.41%   +0.23%     
==========================================
  Files         791      791              
  Lines       79249    79249              
  Branches    23947    23945       -2     
==========================================
+ Hits        73048    73238     +190     
+ Misses       5062     4868     -194     
- Partials     1139     1143       +4     
Flag Coverage Δ
shard-1 56.38% <ø> (+2.72%) ⬆️
shard-2 50.63% <ø> (-0.21%) ⬇️
shard-3 56.14% <ø> (-2.09%) ⬇️

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-24 11:39:26 UTC

2 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This adds a root-vitest mirror test file (740 lines) for reviewer-consensus-calibration.ts, matching the existing package-local node:test suite plus adding branch-complete edge cases, and documents the Codecov-visibility pattern in the package README. No src/ or package-test changes are made, all assertions trace to real exported functions and match the barrel imports shown, and CI is fully green on this commit. The PR closes #8349 and follows the precedent of #6250/calibration-dashboard.test.ts for the same class of Codecov blind-spot.

Nits — 3 non-blocking
  • The file is a large, mechanical duplication of the existing packages/loopover-engine/test/reviewer-consensus-calibration.test.ts suite — worth watching for future drift between the two copies if the source module changes and only one suite gets updated.
  • test/unit/reviewer-consensus-calibration.test.ts:1 imports directly from '../../packages/loopover-engine/src/index' rather than the package name '@​loopover/engine' — confirm this matches the established convention in calibration-dashboard.test.ts rather than introducing a new import style.
  • Consider a lint rule or comment convention requiring the root mirror and package-local suite to be updated together, since nothing currently enforces they stay in sync (packages/loopover-engine/README.md:36-39 documents the pattern but doesn't enforce it).

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8349
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 394 registered-repo PR(s), 251 merged, 92 issue(s).
Contributor context ✅ Confirmed Gittensor contributor claytonlin1110; Gittensor profile; 394 PR(s), 92 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds exactly the requested root-level vitest file test/unit/reviewer-consensus-calibration.test.ts, importing the four required functions from the engine barrel and mirroring/expanding the scenarios listed in the issue (config resolution precedence, opt-in/weight validation, ingestion rejection reasons, composite scoring including the all-zero-weights fallback per #6170, and markdown render

Review context
  • Author: claytonlin1110
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 394 PR(s), 92 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit af270b9 into JSONbored:main Jul 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reviewer-consensus-calibration.ts (658 lines) is the package's largest branch surface invisible to Codecov

1 participant