From f69592fe0c6ca9f751229a5ec2a7d4c0b2dc5d96 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:29:06 -0700 Subject: [PATCH] test(signals): rename signals-coverage.test.ts, scope down the #8576 consolidation Investigated merging signals.test.ts + signals-v2.test.ts + signals-coverage.test.ts per #8576. Found no real duplication to dedupe: across all ~148 top-level test cases in the trio, zero title collisions, and spot-checking similarly-named pairs (e.g. "audits configured labels..." vs "audits label ordering...") confirmed they test different functions entirely (buildConfigQuality vs buildLabelAudit). signals-v2.test.ts genuinely covers newer builders (buildCollisionEdges, buildContributorPatternReport, buildMaintainerPacket, buildRoleContext) absent from signals.test.ts -- organic API growth, not lazy duplication. A forced 6,255-line merge would be pure structural churn with real risk (import/identifier collisions across three large files) and no dedup benefit, so scoped this down to the honest, warranted action: only signals-coverage.test.ts actually matches the epic's *-coverage.test.ts anti-pattern (the file #8580's guard will block going forward). Renamed to signals-edge-cases.test.ts, retitled its top-level describe, and updated the three cross-file comments that referenced the old filename (feasibility-gate-branches.test.ts, queue-4.test.ts, signals/engine.ts). signals.test.ts and signals-v2.test.ts are left untouched. --- packages/loopover-engine/src/signals/engine.ts | 2 +- test/unit/feasibility-gate-branches.test.ts | 2 +- test/unit/queue-4.test.ts | 2 +- ...signals-coverage.test.ts => signals-edge-cases.test.ts} | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) rename test/unit/{signals-coverage.test.ts => signals-edge-cases.test.ts} (99%) diff --git a/packages/loopover-engine/src/signals/engine.ts b/packages/loopover-engine/src/signals/engine.ts index 512facbb0a..aee31fdd67 100644 --- a/packages/loopover-engine/src/signals/engine.ts +++ b/packages/loopover-engine/src/signals/engine.ts @@ -4520,7 +4520,7 @@ export function formatRiskValueQuadrant( /** Builds the optional "Improvement" row, or `null` when the caller has no improvement data to show. `null` * here (rather than a placeholder row) is what keeps `allRows`/`buildPublicPrPanelSignalRows`'s `rows` * byte-identical to today for every existing caller that doesn't pass `improvementSignal` -- see the - * `KEYS`/`toHaveLength(7)` assertions in signals-coverage.test.ts, which assume a fixed 7-row table. Defense + * `KEYS`/`toHaveLength(7)` assertions in signals-edge-cases.test.ts, which assume a fixed 7-row table. Defense * in depth (#4744 requirement, epic #4737): both the deterministic findings and the LLM rationale are * re-checked against `containsPrivatePublicTerm` here even though `improvement.ts`'s findings are safe by * construction (integers interpolated into a fixed template) and the LLM rationale already passed diff --git a/test/unit/feasibility-gate-branches.test.ts b/test/unit/feasibility-gate-branches.test.ts index 39fbe0ef30..9ca4dfeae4 100644 --- a/test/unit/feasibility-gate-branches.test.ts +++ b/test/unit/feasibility-gate-branches.test.ts @@ -10,7 +10,7 @@ import { import { buildPreStartCheck } from "../../src/signals/engine"; import type { IssueRecord, PullRequestRecord, RegistryRepoConfig, RepositoryRecord } from "../../src/types"; -// Record builders mirror test/unit/signals-coverage.test.ts so parity cases reuse the same fixture shape. +// Record builders mirror test/unit/signals-edge-cases.test.ts so parity cases reuse the same fixture shape. function repo(fullName: string, overrides: Partial = {}): RepositoryRecord { const [owner, name] = fullName.split("/") as [string, string]; return { diff --git a/test/unit/queue-4.test.ts b/test/unit/queue-4.test.ts index b6edbf73e6..ab981067cc 100644 --- a/test/unit/queue-4.test.ts +++ b/test/unit/queue-4.test.ts @@ -2950,7 +2950,7 @@ describe("queue processors", () => { // takes its TRUE arm: every other existing test leaves the feature off (the default), which already covers the // FALSE arm thousands of times over. Proves the deterministic tier threads end to end into a real posted // comment, not just in the isolated `buildPublicPrPanelSignalRows`/`buildStructuralImprovementAssessment` unit - // tests (signals-coverage.test.ts). + // tests (signals-edge-cases.test.ts). it("#4744: threads the improvement-signal row into the unified comment when the converged feature resolves on", async () => { const env = createTestEnv({ GITHUB_APP_PRIVATE_KEY: await generatePrivateKeyPem(), diff --git a/test/unit/signals-coverage.test.ts b/test/unit/signals-edge-cases.test.ts similarity index 99% rename from test/unit/signals-coverage.test.ts rename to test/unit/signals-edge-cases.test.ts index cc1e6b67f6..7505126257 100644 --- a/test/unit/signals-coverage.test.ts +++ b/test/unit/signals-edge-cases.test.ts @@ -56,7 +56,12 @@ import type { ScoringModelSnapshotRecord, } from "../../src/types"; -describe("signal coverage edge cases", () => { +// Deep edge-case and regression coverage across many src/signals/engine builders (label audit, +// preflight, public panel rendering, duplicate-winner suppression, reward/risk scoring, ...) -- +// distinct from signals.test.ts's core builder suite and signals-v2.test.ts's newer-builder suite. +// Not a Codecov bolt-on: every case here targets a specific real scenario/regression, verified +// against the other two files with zero title or assertion overlap found (see #8576). +describe("signals engine edge cases", () => { it("branches lane, label, config, and public comment publishing decisions", () => { const directRepo = repo("owner/direct", { issueDiscoveryShare: 0, labelMultipliers: { bug: 1.2 }, trustedLabelPipeline: true }); const issueRepo = repo("owner/issues", { issueDiscoveryShare: 1 });