Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"commitSignature",
"iacMisconfig",
"nativeBuild",
"history",

Check notice on line 26 in packages/loopover-engine/src/review/enrichment-analyzer-names.ts

View check run for this annotation

Loopover ORB / LoopOver Context

Review queue is busy

This repo has a busy review queue in the local Gittensory cache.
"docCommentDrift",
"duplication",
"duplicationDelta",
"churnHotspot",
"blameLink",
"approvalIntegrity",
Expand Down
1 change: 1 addition & 0 deletions src/review/enrichment-analyzer-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"commitSignature",
"iacMisconfig",
"nativeBuild",
"history",

Check notice on line 26 in src/review/enrichment-analyzer-names.ts

View check run for this annotation

Loopover ORB / LoopOver Context

Review queue is busy

This repo has a busy review queue in the local Gittensory cache.
"docCommentDrift",
"duplication",
"duplicationDelta",
"churnHotspot",
"blameLink",
"approvalIntegrity",
Expand Down
24 changes: 24 additions & 0 deletions test/unit/enrichment-analyzers-taxonomy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import { join } from "node:path";
import { describe, expect, it } from "vitest";
import {
buildEnrichmentAnalyzersTaxonomyDocument,

Check notice on line 5 in test/unit/enrichment-analyzers-taxonomy.test.ts

View check run for this annotation

Loopover ORB / LoopOver Context

Review queue is busy

This repo has a busy review queue in the local Gittensory cache.
ENRICHMENT_ANALYZERS_URI,
} from "../../src/review/enrichment-analyzers-taxonomy";
import { REES_ANALYZER_NAMES } from "../../src/review/enrichment-analyzer-names";

const metadataPath = join(process.cwd(), "review-enrichment/analyzer-metadata.json");

Expand Down Expand Up @@ -45,3 +46,26 @@
expect(ENRICHMENT_ANALYZERS_URI).toBe("gittensory://enrichment-analyzers");
});
});

describe("REES_ANALYZER_NAMES stays in sync with analyzer-metadata.json", () => {
const metadataNames = (
JSON.parse(readFileSync(metadataPath, "utf8")) as { analyzers: Array<{ name: string }> }
).analyzers.map((a) => a.name);

it("covers exactly the analyzers the metadata registry defines (no missing, no extra)", () => {
// The canonical name list validates every operator `REES_ANALYZERS` env entry and per-repo
// `.loopover.yml review.enrichment` toggle, so an analyzer present in the metadata registry but absent
// here is silently un-toggleable/un-selectable. Compared as sets against the registry (the source of
// truth) rather than a hardcoded count so a newly-added analyzer can't drift the two apart unnoticed.
expect(new Set(REES_ANALYZER_NAMES)).toEqual(new Set(metadataNames));
});

it("includes duplicationDelta alongside duplication (regression for the one-entry gap)", () => {
expect(REES_ANALYZER_NAMES).toContain("duplication");
expect(REES_ANALYZER_NAMES).toContain("duplicationDelta");
});

it("has no duplicate entries", () => {
expect(new Set(REES_ANALYZER_NAMES).size).toBe(REES_ANALYZER_NAMES.length);
});
});
Loading