mirror of
https://github.com/expo/code-review-cli.git
synced 2026-11-13 20:28:06 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ff59614c1 |
No files matched your search
@@ -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(
|
||||
|
||||
+2
-2
@@ -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),
|
||||
"",
|
||||
@@ -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("");
|
||||
|
||||
+2
-2
@@ -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).
|
||||
|
||||
Reference in new issue
Block a user