Skip to content
Merged
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
14 changes: 14 additions & 0 deletions src/__tests__/render.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ test("setup note renders only when there is ref advice, and never as a finding",
expect(body).toContain("No findings.");
});

test("a run that reviewed nothing renders No review, without claiming why", () => {
const body = renderMarkdown({ ...base, couldNotComplete: true }, "tag");
expect(body).toContain("**Decision:** No review\n");
const aggregate = renderAggregateMarkdown(
[
{ scope: "app", review: { ...base, couldNotComplete: true } },
{ scope: "docs", review: base },
],
"tag",
[],
);
expect(aggregate).toContain("| app | No review | 0 |");
});

test("coverage note only renders when incomplete is non-empty (no more wolf-crying)", () => {
expect(renderMarkdown(base, "tag")).not.toContain("Coverage note");
expect(renderMarkdown({ ...base, incomplete: ["a pass timed out"] }, "tag")).toContain(
Expand Down
4 changes: 2 additions & 2 deletions src/core/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function renderReviewBody(

const lines: string[] = [commentMarker(tag), "## 🤖 AI code review", ""];
lines.push(
`**Decision:** ${review.couldNotComplete ? "No review — every pass failed" : decisionLabel(review.decision)}`,
`**Decision:** ${review.couldNotComplete ? "No review" : decisionLabel(review.decision)}`,
"",
modelText(review.summary),
"",
Expand Down Expand Up @@ -1002,7 +1002,7 @@ export function renderAggregateMarkdown(
];
for (const { result, kept } of perScope) {
lines.push(
`| ${stripStateMarkers(result.scope)} | ${result.review.couldNotComplete ? "No review — every pass failed" : decisionLabel(result.review.decision)} | ${kept.length} |`,
`| ${stripStateMarkers(result.scope)} | ${result.review.couldNotComplete ? "No review" : decisionLabel(result.review.decision)} | ${kept.length} |`,
);
}
lines.push("");
Expand Down
4 changes: 2 additions & 2 deletions src/core/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ export const CoordinatorOutputSchema = CoordinatorModelOutputSchema.extend({
*/
incomplete: z.array(z.string()).default([]),
/**
* True when EVERY pass failed — nothing was actually reviewed. Set by the
* engine, never the model. Reporters must not render an approving decision
* True when nothing was actually reviewed: every pass failed, or the CI run
* failed or stopped before any pass. Set by the engine, never the model. Reporters must not render an approving decision
* label for such a run (the decision enum has no "no review" member, and
* widening it would ripple through dismiss state and exit codes — this flag
* overrides the presentation instead).
Expand Down
Loading