test(calibration): make signal-tracking's real coverage visible to Codecov#8407
test(calibration): make signal-tracking's real coverage visible to Codecov#8407cleanjunc wants to merge 1 commit into
Conversation
…decov `packages/loopover-engine/src/calibration/signal-tracking.ts` (JSONbored#7982) is fully exercised by the engine package's own `node --test` suite, but that runner is not part of the root vitest run Codecov reads `codecov/patch` from, so `computeRulePrecision` / `computeRuleRepeatCount` / `evaluateRuleRepeatAlarm` report as ~0% covered despite being genuinely tested (same blind spot as JSONbored#6250). Add a root-level vitest twin that imports the three primitives via the engine barrel and re-exercises every scenario the package suite covers, so vitest — and therefore Codecov — sees the module too. Mirrors the existing sibling twins `test/unit/calibration-dashboard.test.ts` and `test/unit/discovery-soft-claim.test.ts`. Test-only: no change to any file under `packages/loopover-engine/src/**` or `packages/loopover-engine/test/**`. Covers both arms of every branch in the three functions (100% line + branch of the source module locally). Closes JSONbored#8343
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-24 12:02:52 UTC
Review summary Nits — 4 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests-merge)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
…decov (#8438) `packages/loopover-engine/src/calibration/signal-tracking.ts` (#7982) — `computeRulePrecision`, `computeRuleRepeatCount`, `evaluateRuleRepeatAlarm` — is fully exercised by the engine package's own `node --test` suite, but that runner is not part of the root vitest run Codecov reads `codecov/patch` from, so the module reports as ~0% covered despite being genuinely tested (same blind spot as #6250). Add a root-level vitest twin that imports the three primitives via the engine barrel and re-exercises every scenario the package suite covers, so vitest — and therefore Codecov — sees the module too. Mirrors the existing sibling twins `test/unit/calibration-dashboard.test.ts` and `test/unit/discovery-soft-claim.test.ts`. Covers both arms of every branch in the three functions (100% line + branch of the source module locally). No change to any file under `packages/loopover-engine/src/**` or `packages/loopover-engine/test/**`. Also document the root mirror in the engine package README, next to the existing Codecov-mirror note (#8349) — the same doc touch the merged #8349 twin used, which keeps this a full-coverage CI run: a root-`test/**`-only diff is otherwise treated as a scoped, coverage-artifact-free run whose shard blobs never reach the merge step (that is what auto-closed the first attempt, #8407). Closes #8343
Summary
packages/loopover-engine/src/calibration/signal-tracking.ts(Extract a shared, deployment-agnostic calibration/signal-tracking module for ORB + AMS #7982) —computeRulePrecision,computeRuleRepeatCount, andevaluateRuleRepeatAlarm— is fully exercised by the engine package's ownnode --testsuite (packages/loopover-engine/test/signal-tracking.test.ts), but that runner is not part of the rootvitestrun Codecov readscodecov/patchfrom, so the module reports as ~0% covered in Codecov's eyes despite being genuinely tested. Same blind spot as fix(ci): review-enrichment's real node:test coverage is invisible to Codecov (83 of 83 files effectively unmeasured) #6250 (review-enrichment);packages/loopover-engine/src/**is already invitest.config.ts'scoverage.include, so the fix is per-file test coverage, not a wiring change.test/unit/signal-tracking.test.ts, importing the three primitives via the engine barrel (../../packages/loopover-engine/src/index) and re-exercising every scenario the package suite covers — mirroring the existing sibling twinstest/unit/calibration-dashboard.test.tsandtest/unit/discovery-soft-claim.test.ts.packages/loopover-engine/src/**orpackages/loopover-engine/test/**— the only new artifact is the one vitest file the issue calls for.Covers both arms of every branch in the three functions:
computeRulePrecision(fired-rule filter both arms, override rule match/no-match,reversed/confirmedverdicts,decided > 0 ? … : nullboth arms),computeRuleRepeatCount(both&&operands' false arms via same-rule-different-target and same-target-different-rule, plus the empty-list case), andevaluateRuleRepeatAlarm(below/at threshold boundary,seen-dedup first-seen order, other-ruleIdexclusion, empty list). Locally this brings the source module to 100% line + branch under vitest.Closes #8343
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #8343.Validation
git diff --check— clean (no whitespace errors on the diff).npm run actionlint— N/A: no GitHub Actions workflow or composite-action changes.npm run typecheck— green (afternpm run build --workspace @loopover/engine, as the roottest:cisequence does before typecheck).npm run test:coveragelocally — green; the new file passes (13 tests) and reports 100% line + branch coverage ofsignal-tracking.ts.codecov/patchnote: this PR changes zero lines undersrc/**(it only adds atest/**file), socodecov/patchhas no changed production lines to grade — the coverage this adds is what makes a future PR touchingsignal-tracking.tsgate correctly.npm run test:workers— N/A: no worker code changed; this adds a root vitest unit test only.npm run build:mcp/npm run test:mcp-pack— N/A: no MCP changes.npm run ui:openapi:check/npm run ui:lint/npm run ui:typecheck/npm run ui:build— N/A: no UI, API, or OpenAPI surface changed.npm audit --audit-level=moderate— not run locally (the local sandbox's audit endpoint returns a lockfile 400); this PR makes no dependency changes (package.json/ lockfiles untouched), so it cannot affect the audit result. CI runs it against a clean install.If any required check was skipped, explain why:
Safety
CHANGELOG.mdnot edited (not a release-prep PR).Notes
../../packages/loopover-engine/src/index), not via a relative path into the source file, matching every existing sibling root-level engine test.signal-tracking.tswas changed, and its ownnode --testsuite was left untouched, as the issue requires.