Skip to content

Commit bbad5c8

Browse files
test(config): lock in review.test_generation manifest plumbing (#3848)
The review.test_generation kill-switch (#2189, config slice of the boundary-safe test-generation advisory #1972) shipped and is documented in gittensory.full.yml, but the config-templates inventory test — which locks in the plumbing for the sibling review toggles (changed_files_summary, effort_score) — never covered it. Add a focused case asserting review.test_generation is documented in gittensory.full.yml and round-trips through parseFocusManifest + reviewConfigToJson (unset -> null, true/false preserved). test_generation gates the test-generation advisory rather than a review prompt, so it is exercised via the JSON round-trip rather than resolveReviewPromptOverrides, which does not surface it. Closes #2189.
1 parent ceeb905 commit bbad5c8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test/unit/config-templates.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,21 @@ describe("config/examples review templates (#1682)", () => {
101101
expect(resolveReviewPromptOverrides(off).effortScore).toBe(false);
102102
});
103103

104+
it("locks in review.test_generation via manifest parse + JSON round-trip and documents it in gittensory.full.yml (#2189)", () => {
105+
// test_generation is a kill-switch that gates the boundary-safe test-generation advisory (#1972); it is NOT a
106+
// review prompt override, so it is exercised through the manifest parse + reviewConfigToJson round-trip rather
107+
// than resolveReviewPromptOverrides (which does not surface it).
108+
const full = readConfigExample("gittensory.full.yml");
109+
expect(full).toMatch(/# test_generation:/);
110+
expect(parseFocusManifest({}).review.testGeneration).toBeNull();
111+
const on = parseFocusManifest({ review: { test_generation: true } });
112+
expect(on.review.testGeneration).toBe(true);
113+
expect(reviewConfigToJson(on.review)).toEqual({ test_generation: true });
114+
const off = parseFocusManifest({ review: { test_generation: false } });
115+
expect(off.review.testGeneration).toBe(false);
116+
expect(reviewConfigToJson(off.review)).toEqual({ test_generation: false });
117+
});
118+
104119
it("parses gittensory.minimal.yml with zero warnings and enables no agent actions", () => {
105120
const manifest = parseFocusManifestContent(readConfigExample("gittensory.minimal.yml"), "repo_file");
106121
expect(manifest.warnings).toEqual([]);

0 commit comments

Comments
 (0)