Skip to content

Commit 30e77ba

Browse files
authored
test(signals): rename signals-coverage.test.ts, scope down the #8576 consolidation (#8586)
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.
1 parent 35b934e commit 30e77ba

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

packages/loopover-engine/src/signals/engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4520,7 +4520,7 @@ export function formatRiskValueQuadrant(
45204520
/** Builds the optional "Improvement" row, or `null` when the caller has no improvement data to show. `null`
45214521
* here (rather than a placeholder row) is what keeps `allRows`/`buildPublicPrPanelSignalRows`'s `rows`
45224522
* byte-identical to today for every existing caller that doesn't pass `improvementSignal` -- see the
4523-
* `KEYS`/`toHaveLength(7)` assertions in signals-coverage.test.ts, which assume a fixed 7-row table. Defense
4523+
* `KEYS`/`toHaveLength(7)` assertions in signals-edge-cases.test.ts, which assume a fixed 7-row table. Defense
45244524
* in depth (#4744 requirement, epic #4737): both the deterministic findings and the LLM rationale are
45254525
* re-checked against `containsPrivatePublicTerm` here even though `improvement.ts`'s findings are safe by
45264526
* construction (integers interpolated into a fixed template) and the LLM rationale already passed

test/unit/feasibility-gate-branches.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { buildPreStartCheck } from "../../src/signals/engine";
1111
import type { IssueRecord, PullRequestRecord, RegistryRepoConfig, RepositoryRecord } from "../../src/types";
1212

13-
// Record builders mirror test/unit/signals-coverage.test.ts so parity cases reuse the same fixture shape.
13+
// Record builders mirror test/unit/signals-edge-cases.test.ts so parity cases reuse the same fixture shape.
1414
function repo(fullName: string, overrides: Partial<RegistryRepoConfig> = {}): RepositoryRecord {
1515
const [owner, name] = fullName.split("/") as [string, string];
1616
return {

test/unit/queue-4.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2950,7 +2950,7 @@ describe("queue processors", () => {
29502950
// takes its TRUE arm: every other existing test leaves the feature off (the default), which already covers the
29512951
// FALSE arm thousands of times over. Proves the deterministic tier threads end to end into a real posted
29522952
// comment, not just in the isolated `buildPublicPrPanelSignalRows`/`buildStructuralImprovementAssessment` unit
2953-
// tests (signals-coverage.test.ts).
2953+
// tests (signals-edge-cases.test.ts).
29542954
it("#4744: threads the improvement-signal row into the unified comment when the converged feature resolves on", async () => {
29552955
const env = createTestEnv({
29562956
GITHUB_APP_PRIVATE_KEY: await generatePrivateKeyPem(),
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ import type {
5656
ScoringModelSnapshotRecord,
5757
} from "../../src/types";
5858

59-
describe("signal coverage edge cases", () => {
59+
// Deep edge-case and regression coverage across many src/signals/engine builders (label audit,
60+
// preflight, public panel rendering, duplicate-winner suppression, reward/risk scoring, ...) --
61+
// distinct from signals.test.ts's core builder suite and signals-v2.test.ts's newer-builder suite.
62+
// Not a Codecov bolt-on: every case here targets a specific real scenario/regression, verified
63+
// against the other two files with zero title or assertion overlap found (see #8576).
64+
describe("signals engine edge cases", () => {
6065
it("branches lane, label, config, and public comment publishing decisions", () => {
6166
const directRepo = repo("owner/direct", { issueDiscoveryShare: 0, labelMultipliers: { bug: 1.2 }, trustedLabelPipeline: true });
6267
const issueRepo = repo("owner/issues", { issueDiscoveryShare: 1 });

0 commit comments

Comments
 (0)