From 819ac68d56307c92a0693fb262a82c94f833e773 Mon Sep 17 00:00:00 2001 From: kiannidev <156195510+kiannidev@users.noreply.github.com> Date: Tue, 30 Jun 2026 12:55:35 +0200 Subject: [PATCH] feat(enrichment): register docCommentDrift in REES_ANALYZER_NAMES Allow operators to select the shipped doc-comment drift analyzer via REES_ANALYZERS instead of treating the name as invalid config. Co-authored-by: Cursor --- src/review/enrichment-wire.ts | 1 + test/unit/enrichment-wire.test.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/review/enrichment-wire.ts b/src/review/enrichment-wire.ts index 938235dbbc..d3442d02d5 100644 --- a/src/review/enrichment-wire.ts +++ b/src/review/enrichment-wire.ts @@ -92,6 +92,7 @@ export const REES_ANALYZER_NAMES = [ "iacMisconfig", "nativeBuild", "history", + "docCommentDrift", ] as const; const REES_ANALYZER_NAME_SET = new Set(REES_ANALYZER_NAMES); diff --git a/test/unit/enrichment-wire.test.ts b/test/unit/enrichment-wire.test.ts index 33c85db7c0..0c6e6546ad 100644 --- a/test/unit/enrichment-wire.test.ts +++ b/test/unit/enrichment-wire.test.ts @@ -491,12 +491,18 @@ describe("resolveReesAnalyzers", () => { warnSpy.mockRestore(); }); + it("accepts docCommentDrift as a configured analyzer subset", () => { + expect( + resolveReesAnalyzers(env({ REES_ANALYZERS: "docCommentDrift" })), + ).toEqual(["docCommentDrift"]); + }); + it("accepts every REES analyzer currently registered by the service", () => { expect( resolveReesAnalyzers( env({ REES_ANALYZERS: - "dependency,lockfileDrift,secret,license,installScript,heavyDependency,actionPin,eol,redos,provenance,codeowners,secretLog,assetWeight,typosquat,commitSignature,iacMisconfig,nativeBuild,history", + "dependency,lockfileDrift,secret,license,installScript,heavyDependency,actionPin,eol,redos,provenance,codeowners,secretLog,assetWeight,typosquat,commitSignature,iacMisconfig,nativeBuild,history,docCommentDrift", }), ), ).toEqual([ @@ -518,6 +524,7 @@ describe("resolveReesAnalyzers", () => { "iacMisconfig", "nativeBuild", "history", + "docCommentDrift", ]); });