hn.today

ImpactGate: A merge gate that scores the structural decay AI adds

github.com35 points44 comments
Screenshot of ImpactGate: A merge gate that scores the structural decay AI adds

ImpactGate is a tool that measures and gates the structural decay a change introduces to a codebase, letting teams warn on or block merges that disproportionately add complexity. It quantifies "impact" by scoring changed functions against the pre-change complexity of their enclosing container, so adding small new files is cheap while piling work onto an already-heavy class or module is expensive. The score blends factors like the container's existing complexity, the changed function's cyclomatic complexity, and the change’s size to surface real decay signals. Large generated or vendored diffs are skipped to avoid distortion, and the report ranks files by their share of impact to point developers at refactoring targets before a commit is blocked.

Usage covers a standalone CLI, a Docker image for CI, a git pre-commit hook, and plugins/workflows for GitHub Actions, GitLab CI, and Jenkins. Gates can use absolute thresholds or a percentile-based grading curve: build a project baseline from merged history and combine it with a seed per-language prior so fresh repos fall back to the seed while mature repos lean on their own history. Configuration lives in .impact-gate.yml (or via CLI flags), with enforcement modes (off, warn, block), tolerance multipliers, and baseline caching. Outputs include textual, JSON or markdown reports, exit codes for CI control, and a sticky PR/MR comment when integrated with SCM.

Read on github.com44 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.