feat(scc): generated-marker exclusion — banner-shaped, opt-in (#114) - #115
Merged
Merged
Conversation
…ated (#114) Phase 2 of plan 0002 (#107), on the merged Phase 1 routing. With CHECKUP_EXCLUDE_GENERATED=1, drop files whose head carries a banner-shaped generated marker from BOTH the lizard inventory and the scc keep-set — the corvus lever (39,208 -> 3,569 source files; 41,081 -> 5,442 keep-set), which also pre-empts the #105 lizard blow-ups by shrinking the set first. - lib/source-inventory.sh: INV_GENERATED_RE (Go `Code generated … DO NOT EDIT.`, comment-leader `@generated`, C# `<auto-generated>`) + _apply_generated_excludes, called from build_source_inventory and build_scc_keepset (mirrors _apply_gitattr_excludes). Markers are case-sensitive + anchored (NOT the spike's loose substrings) so first-party code that quotes a marker, or owns a bare `DO NOT EDIT` (IaC, migrations), is kept (Morlock M1). Whole-file `grep -lIZ` short-circuits at the marker (cheap even on mostly-generated trees) and catches markers below line 1 (corvus's sit on line 2). Every drop is ENUMERATED to `<lst>.generated` (loud, not a silent count); sets GENERATED_EXCLUDED_COUNT. - Opt-in (default off) so the regex is field-tested with zero default- behaviour change; flip to default-on is a deliberate follow-up. Surfacing "% generated" as a headline signal is Phase 3. - test/source-inventory.test.sh: opt-in off = unchanged; on = drops the three banner forms, keeps prose/bare-DO-NOT-EDIT first-party, sets the count, and enumerates the drops. Refs #107. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of #107 (plan 0002), on the merged Phase 1 routing (#110).
With
CHECKUP_EXCLUDE_GENERATED=1, files whose head carries a banner-shapedgenerated marker are dropped from both the lizard inventory and the scc
keep-set — the corvus lever: it stops a codegen-heavy repo from drowning the
measurement and pre-empts the #105 lizard overflow/OOM by shrinking the set before
the engines run.
Validated on corvus
(corvus's generated C# carries
// <auto-generated>on line 2 — whole-filegrep -lcatches it and short-circuits there, so it's cheap.)Banner-shaped, not loose substrings (Morlock M1)
Markers are case-sensitive + anchored to a comment leader at line start:
// Code generated … DO NOT EDIT.@generatedonly inside a comment leader (//,#,*,/*,--,<!--)<auto-generated>at line startSo first-party code that merely quotes a marker (prose, a
@generatedin astring), or owns a bare
DO NOT EDIT(IaC, hand-written migrations), is kept.Regression-tested both directions.
Honesty
Every drop is enumerated to
raw/….generated(loud, greppable — not a silentcount), and
GENERATED_EXCLUDED_COUNTis set. Surfacing "% generated" as aheadline signal is Phase 3.
Rollout (review decision)
Shipped opt-in, default off so the regex is field-tested with zero
default-behaviour change. Flipping to default-on (with a kill-switch) is a
deliberate follow-up once proven on real repos. Open to default-on-now if preferred.
Full suite green (source-inventory 29), shellcheck clean. Refs #107.
🤖 Generated with Claude Code