@krotovm/gitlab-ai-review 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ stages: [review]
23
23
 
24
24
  ai_review:
25
25
  stage: review
26
- image: node:20
26
+ image: node:24
27
27
  rules:
28
28
  - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
29
29
  script:
@@ -37,7 +37,7 @@ stages: [review]
37
37
 
38
38
  ai_review:
39
39
  stage: review
40
- image: node:20
40
+ image: node:24
41
41
  rules:
42
42
  - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
43
43
  script:
@@ -637,12 +637,14 @@ export async function reviewMergeRequestMultiPass(params) {
637
637
  });
638
638
  }
639
639
  const triageMap = new Map(triageResult.files.map((f) => [f.path, f.verdict]));
640
- const reviewFiles = changes.filter((c) => triageMap.get(c.new_path) !== "SKIP");
640
+ let reviewFiles = changes.filter((c) => triageMap.get(c.new_path) !== "SKIP");
641
641
  const skippedCount = changes.length - reviewFiles.length;
642
- logStep(`Triage: ${reviewFiles.length} file(s) to review, ${skippedCount} skipped. Summary: ${triageResult.summary.slice(0, 120)}...`);
643
642
  if (reviewFiles.length === 0) {
644
- const DISCLAIMER = "This comment was generated by AI review bot.";
645
- return `No confirmed bugs or high-value optimizations found.\n\n---\n_${DISCLAIMER}_`;
643
+ logStep(`Triage wanted to skip all ${changes.length} file(s) overriding to review all. Summary: ${triageResult.summary.slice(0, 120)}...`);
644
+ reviewFiles = changes;
645
+ }
646
+ else {
647
+ logStep(`Triage: ${reviewFiles.length} file(s) to review, ${skippedCount} skipped. Summary: ${triageResult.summary.slice(0, 120)}...`);
646
648
  }
647
649
  logStep(`Pass 2/4: reviewing ${reviewFiles.length} file(s) (concurrency=${reviewConcurrency})`);
648
650
  const allChangedPaths = changes.map((c) => c.new_path);
@@ -10,8 +10,12 @@ export const TRIAGE_SYSTEM_LINES = [
10
10
  "",
11
11
  "Rules:",
12
12
  "- When in doubt, verdict is NEEDS_REVIEW.",
13
+ "- Look beyond comments and JSDoc: if the diff changes function signatures, return types, control flow, variable assignments, or adds/removes code lines (not just comments), it is a logic change → NEEDS_REVIEW.",
14
+ "- If a file mixes doc/comment edits with actual code changes, verdict is NEEDS_REVIEW.",
15
+ "- Refactoring (splitting/merging functions, changing data structures, renaming with signature changes) is NEEDS_REVIEW.",
13
16
  "- Deleted files are SKIP unless the deletion could break dependents.",
14
17
  "- New files containing logic are NEEDS_REVIEW.",
15
- "- Test-only files are SKIP unless they cover security-critical or complex logic.",
18
+ "- Test files that add, remove, or change assertions or expected values are NEEDS_REVIEW.",
19
+ "- Test-only files are SKIP only if changes are purely cosmetic (formatting, comments).",
16
20
  "- Config/CI/docs files are SKIP unless they modify build targets, env vars, or secrets.",
17
21
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@krotovm/gitlab-ai-review",
4
- "version": "1.0.28",
4
+ "version": "1.0.29",
5
5
  "description": "CLI tool to generate AI code reviews for GitLab merge requests.",
6
6
  "main": "dist/cli.js",
7
7
  "bin": {