diff --git a/lib/review-pass.ts b/lib/review-pass.ts index 49cdca9d9..03fa06431 100644 --- a/lib/review-pass.ts +++ b/lib/review-pass.ts @@ -130,7 +130,8 @@ export function renderStage(m: Manifest, stage: Stage, t: SectionTexts, diffFor: continue; } const role = r.role!; - const slots: Slots = { name: r.name, diff_base: m.diff_base, exclude: r.exclude, stack: m.stack, test_fw: m.test_fw, learnings: m.learnings ?? undefined, checklists: r.checklists?.join(',') }; + const slots: Slots = { name: r.name, diff_base: m.diff_base, exclude: r.exclude, stack: m.stack, test_fw: m.test_fw, learnings: m.learnings ?? undefined, + checklists: r.checklists?.map(n => path.join(m.checklist_root, 'review/specialists', `${n}.md`)).join(',') }; if (role === 'specialist') slots.checklist = path.join(m.checklist_root, 'review/specialists', `${r.name}.md`); let findingsSha: string | undefined; if (role === 'red-team') { diff --git a/test/review-pass.test.ts b/test/review-pass.test.ts index 15975ab07..15c8ef0ff 100644 --- a/test/review-pass.test.ts +++ b/test/review-pass.test.ts @@ -37,6 +37,9 @@ describe('pass manifest', () => { const light = manifest([{ role: 'specialist', name: 'batched', effort: 'full', exclude: [':(exclude)docs/a.md'], checklists: ['testing', 'red-team'] }]); expect(light.readers[0]).toMatchObject({ reader: 'specialist-batched', role: 'specialist-batched', exclude: "-- . ':(exclude)docs/a.md'", checklists: ['testing', 'red-team'] }); expect(() => manifest([{ role: 'fix-check', name: 'fix-check', effort: 'full', exclude: [] }])).toThrow(/fix-check runs on its own/); + // PR #3665 review: the batched reviewer reads each checklist by path, as the render CLI is given them, never by bare name. + renderStage(light, 'specialists', texts, () => ''); + expect(fs.readFileSync(light.readers[0]!.file!, 'utf8')).toContain(`Read each checklist at ${path.join(ROOT, 'review/specialists/testing.md')}, ${path.join(ROOT, 'review/specialists/red-team.md')} (tag each finding`); }); test('a manifest render is byte for byte the render CLI\'s brief for the same slots', () => {