feat(signals): classify build and CI configuration files in path-matchers (#561) - #1045
Conversation
…hers (JSONbored#561) Add `isConfigFile()` to distinguish build, lint, test-runner, and environment config files from source code and non-substantive padding. Expand `ChangedFileCategory` with a `"config"` bucket and wire it into `classifyChangedFile` after dependency manifests so config-only diffs are no longer lumped with source effort. Recognised patterns: exact basenames (Dockerfile, Makefile, .editorconfig …), known prefixes (tsconfig, vitest.config, .env, .eslint …), the generic `.config.ext` / `.rc.ext` form, and dot-prefixed bare-rc files (.stylelintrc, .huskyrc). Lockfiles and dependency manifests still rank above config in the classifier, preserving the existing priority order. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 🛠️ Maintainer review — Held for maintainer reviewReviewed 2 changed file(s) — two independent AI reviewers, synthesized. ✅ Safe to merge — both reviewers found no blocking issues.
Merge readiness: ✅ Mergeable · all CI checks green/neutral/skipped. Summary The change adds comprehensive detection for build and CI configuration files, updates the file classification logic, and expands the ChangedFileCategory enum. All new functions are pure, deterministic, and have thorough unit tests covering typical and edge cases. TypeScript passes, CI is green, and no security concerns are introduced. 💡 Nits — non-blocking, optional
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary Suggestions
Risks
Nits — 1 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. The change introduces a new `isConfigFile` matcher and a corresponding "config" category in `ChangedFileCategory`. The implementation normalizes paths, checks exact basenames, known prefixes, generic `.config.ext` / `.rc.ext` patterns, and bare `.rc` suffixes. Tests cover positive and negative cases, and the classification order respects existing precedence (vendored > lockfile > dependency manifest > config). All existing CI checks pass, indicating no type errors or broken imports. The logic appears sound, handling null/undefined inputs gracefully via `normalize`. The only notable consideration is that other parts of the codebase that switch on `ChangedFileCategory` may now need to handle the new "config" value, but this does not affect current tests. Suggestions
Risks
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1045 +/- ##
=======================================
Coverage 95.28% 95.28%
=======================================
Files 149 149
Lines 18053 18061 +8
Branches 6535 6539 +4
=======================================
+ Hits 17202 17210 +8
Misses 363 363
Partials 488 488 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ghost
left a comment
There was a problem hiding this comment.
Held for maintainer (guardrail_area) — correct + CI green
ghost
left a comment
There was a problem hiding this comment.
Gittensory approves — the gate is satisfied and CI is green.
Add
isConfigFile()to distinguish build, lint, test-runner, and environment config files from source code and non-substantive padding. ExpandChangedFileCategorywith a"config"bucket and wire it intoclassifyChangedFileafter dependency manifests so config-only diffs are no longer lumped with source effort.Recognised patterns: exact basenames (
Dockerfile,Makefile,.editorconfig…), known prefixes (tsconfig,vitest.config,.env,.eslint…), the generic.config.ext/.rc.extform, and dot-prefixed bare-rc files (.stylelintrc,.huskyrc). Lockfiles and dependency manifests still rank above config in the classifier, preserving the existing priority order.Relates to the #561 slop-classification family of matchers.