diff --git a/packages/loopover-engine/src/objective-anchor.ts b/packages/loopover-engine/src/objective-anchor.ts index ce59c55f03..b8dce0936e 100644 --- a/packages/loopover-engine/src/objective-anchor.ts +++ b/packages/loopover-engine/src/objective-anchor.ts @@ -228,7 +228,7 @@ function kindsFromPath(path: string): ObjectiveAnchorChangeKind[] { if (DOC_EXTENSIONS.has(extensionOf(path)) || segments.includes("docs") || filename.toLowerCase() === "readme.md") { kinds.push("docs"); } - if (segments.some((segment) => CI_SEGMENTS.has(segment)) || filename.endsWith(".yml") || filename.endsWith(".yaml")) { + if (segments.some((segment) => CI_SEGMENTS.has(segment))) { kinds.push("ci"); } if (CONFIG_FILENAMES.has(filename) || filename.endsWith(".jsonc") || filename.endsWith(".toml")) { diff --git a/packages/loopover-engine/test/objective-anchor.test.ts b/packages/loopover-engine/test/objective-anchor.test.ts index 5f0d84d57c..4e1bdbc0bf 100644 --- a/packages/loopover-engine/test/objective-anchor.test.ts +++ b/packages/loopover-engine/test/objective-anchor.test.ts @@ -383,3 +383,18 @@ test("renderObjectiveAnchorAuditMarkdown escapes markdown controls and collapses assert.ok(markdown.includes("- src/review/\\[unsafe\\].ts")); assert.ok(markdown.includes("- src/review/\\.ts")); }); + +test("extractObjectiveAnchorFeatures does not classify non-CI YAML as ci (#8873)", () => { + const features = extractObjectiveAnchorFeatures({ + paths: [".loopover.yml", "docs/mkdocs.yml", "config/app.yaml"], + }); + + assert.equal(features.changeKinds.includes("ci"), false); + assert.ok(features.changeKinds.includes("config")); + assert.ok(features.changeKinds.includes("docs")); + + const ciWorkflow = extractObjectiveAnchorFeatures({ + paths: [".github/workflows/ci.yml"], + }); + assert.ok(ciWorkflow.changeKinds.includes("ci")); +});