Skip to content

Commit 475f979

Browse files
Merge pull request #52 from CodeAnt-AI/pranav/increased-limits
increased limit
2 parents e250533 + 5fe702a commit 475f979

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

‎changelog.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## [0.5.14] - 15/10/2026
4+
- Increased file limits on code review to 40 files
5+
36
## [0.5.13] - 13/10/2026
47
- Security: `--base` / `--base-commit` values (including from the MCP `codeant_review_local` tool) are resolved without a shell, and option-like values are rejected, so they can no longer run commands or pass options to git
58
- Security: symlinks that point outside the repository, and files reached through them, are no longer read into review or secrets payloads. In 0.5.12, `--base` / `--base-commit` sent a committed symlink's target contents

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeant-cli",
3-
"version": "0.5.13",
3+
"version": "0.5.14",
44
"description": "Code review CLI tool",
55
"type": "module",
66
"repository": {

‎src/utils/reviewApiHelper.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import fs from 'fs';
44
import { minimatch } from 'minimatch';
55

6-
const MAX_REVIEW_FILES = 15;
6+
const MAX_REVIEW_FILES = 40;
77
const MAX_FILE_LINES = 5000;
88
const MAX_FILE_SIZE_BYTES = 200 * 1024; // 200 KB
99

‎tests/reviewApiHelper.test.js‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,18 +345,22 @@ describe('ReviewApiHelper integration tests', () => {
345345
expect(result.file_contents).not.toHaveProperty('docs/guide.md');
346346
});
347347

348-
it('limits to MAX_REVIEW_FILES (15) unique files', async () => {
349-
for (let i = 1; i <= 18; i++) {
350-
writeFile(`src/file${i}.js`, `const f${i} = ${i};\n`);
348+
it.each([18, 40, 43])('applies the 40-file limit to %i staged files', async (totalFiles) => {
349+
for (let i = 1; i <= totalFiles; i++) {
350+
writeFile(`src/cap/file${i}.js`, `const f${i} = ${i};\n`);
351351
}
352-
git('add -A');
352+
git('add src/cap');
353353

354354
const helper = await createHelper();
355355
const result = await helper.buildReviewApiRequest('staged-only');
356356

357357
const fileCount = Object.keys(result.file_contents).length;
358-
expect(fileCount).toBe(15);
359-
expect(result._meta.max_files).toBe(15);
358+
expect(fileCount).toBe(Math.min(totalFiles, 40));
359+
expect(result._meta.reviewed_files).toHaveLength(fileCount);
360+
expect(result.diff_content.match(/^diff --git /gm)).toHaveLength(fileCount);
361+
expect(result._meta.max_files).toBe(40);
362+
expect(result._meta.capped).toBe(totalFiles > 40);
363+
expect(result._meta.skipped).toHaveLength(Math.max(totalFiles - 40, 0));
360364
});
361365

362366
it('skips files exceeding MAX_FILE_LINES (5000)', async () => {

0 commit comments

Comments
 (0)