Skip to content

feat(chunker): expand built-in artifact pattern list (#482)#498

Merged
justn-hyeok merged 1 commit intomainfrom
feat/482-expand-artifact-patterns
Apr 20, 2026
Merged

feat(chunker): expand built-in artifact pattern list (#482)#498
justn-hyeok merged 1 commit intomainfrom
feat/482-expand-artifact-patterns

Conversation

@justn-hyeok
Copy link
Copy Markdown
Collaborator

Summary

Expand `BUILT_IN_ARTIFACT_PATTERNS` with the generated-code / build-output / lock-file / binary patterns the default list was missing.

Added categories

category new patterns
build outputs `.svelte-kit/`, `.turbo/`, `.docusaurus/`, `storybook-static/`
minified / bundled `.min.mjs`, `.bundle.{css,mjs}`
source maps `.mjs.map`, `.css.map`
generated code `.pb.{go,ts,py}`, `_pb.{js,ts}`, `.gen.{ts,go}`, `_generated.{go,ts}`
lock files (non-JS) Cargo, poetry, Pipfile, uv, composer, Gemfile, go.sum, mix, flake, bun.lock
binary assets png/jpg/jpeg/gif/webp/ico/bmp/tiff, font files, mp3/mp4/mov/webm, pdf, archives
test snapshots `*.snap`, `snapshots/`

Scope

Only the default list was expanded. The two escape hatches that already existed are unchanged:

  • `.reviewignore` (project-level gitignore-style file) — chunker.loadReviewIgnorePatterns
  • Custom per-run patterns via `chunkDiff(..., { ignorePatterns })` (if already wired)

The full "zero-config across every ecosystem" acceptance criterion in #482 stays open; this PR is the concrete default-list improvement.

Test plan

  • 51 new pattern-filter cases (every added pattern verified to match at least one representative path)
  • 7 "should survive" cases guarding against prefix/substring FP (e.g. `distribution/index.ts` is NOT `dist/`, `build-helpers.ts` is NOT `build/`)
  • Full test suite: 3368 → 3426 passing
  • `pnpm typecheck` — clean

Risks

  • Over-filtering real source: patterns like `**/*.pb.ts` could theoretically match a human-written `foo.pb.ts`. Low risk — `.pb.{lang}` is an established convention for protobuf-generated output; the "should survive" guard tests only cover common aliases, not edge-case human files. Users who hit this can add to `.reviewignore` or remove from defaults.
  • Backcompat: default list is additive. Any project that was relying on `Cargo.lock` or similar being reviewed will no longer see them. That's the intent; users who want them back can document per-project.

Before this change, BUILT_IN_ARTIFACT_PATTERNS covered the common JS
ecosystem basics (dist/, node_modules/, minified JS/CSS, JS lock files)
but missed several generated-code patterns that still reach reviewers
in real repos — burning cost and triggering phantom findings on code
that no human wrote.

Added categories:
- Build outputs: .svelte-kit/, .turbo/, .docusaurus/, storybook-static/
- Minified / bundled: *.min.mjs, *.bundle.{css,mjs}
- Source maps: *.mjs.map, *.css.map
- Generated code: *.pb.{go,ts,py}, *_pb.{js,ts}, *.gen.{ts,go},
  *_generated.{go,ts}
- Lock files (other ecosystems): Cargo.lock, poetry.lock,
  Pipfile.lock, uv.lock, composer.lock, Gemfile.lock, go.sum,
  mix.lock, flake.lock, bun.lock
- Binary assets: png/jpg/jpeg/gif/webp/ico/bmp/tiff, woff/woff2/ttf/
  otf/eot, mp3/mp4/mov/webm, pdf, zip/tar/gz/tgz/7z/rar
- Test snapshots: *.snap, __snapshots__/

Added 51 test cases covering each new filtered path plus 7 "should
survive" cases to guard against prefix/substring false matches (e.g.
distribution/index.ts is NOT dist/, src/build-helpers.ts is NOT
build/). Tests 3368 → 3426.

Config `ignorePatterns` override and the `.reviewignore` syntax are
both already supported (chunker.loadReviewIgnorePatterns) — users who
want additional patterns for their specific project add them there.
The full "zero-config for N ecosystems" acceptance criterion in #482
stays open; this PR delivers the concrete default-list expansion.
@github-actions github-actions Bot added the size/M <200 lines label Apr 20, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ CodeAgora: ACCEPT

no issues | 5 reviewers

There were no discussions, no escalations, and no reported findings at any severity level, so there is no evidence of a blocking defect or unresolved ambiguity. Based on the available review data, the change appears safe to merge.


CodeAgora · Session: 2026-04-20/001

@justn-hyeok justn-hyeok merged commit c352fe0 into main Apr 20, 2026
5 checks passed
@justn-hyeok justn-hyeok deleted the feat/482-expand-artifact-patterns branch April 20, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M <200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant