Phase 2 of #107 (plan 0002). Builds on the now-merged Phase 1 (#110): the
inventory + scc keep-set already route every engine through the first-party set;
this adds the generated-marker exclusion — the corvus lever (≈87% of that
repo is generated), which also pre-empts the #105 lizard blow-ups by shrinking the
set before the engines run.
Mechanism
Drop files whose head carries a banner-shaped generated marker, applied to
BOTH build_source_inventory (lizard) and build_scc_keepset (scc) — mirroring
_apply_gitattr_excludes.
Markers — banner-shaped, NOT loose substrings (Morlock M1)
The spike used DO NOT EDIT|@generated|<auto-generated>|Code generated as
case-insensitive substrings — which fire on first-party code that merely mentions
them (codegen tooling, Flow/Relay, lint configs) or owns them (IaC # DO NOT EDIT,
hand-written migrations). Tighten to anchored, comment-leader, case-sensitive forms:
- Go canonical full line:
^//\s*Code generated .* DO NOT EDIT\.\s*$
@generated only inside a comment leader at line start
- C#
<auto-generated> at line start
- Bare
DO NOT EDIT is NOT a marker (too weak — demoted).
Honesty guards (non-negotiable)
Rollout decision (open)
Ship opt-in first (CHECKUP_EXCLUDE_GENERATED, default off) so the regex
is field-tested with zero default-behaviour change, then flip to default-on
(with a kill-switch) in a follow-up once proven on real repos. Flagging for review:
default-on-now vs opt-in-first.
Acceptance
- corvus (opt-in): ~39k → ~4k files; complexity over the real library; duplication
runs; no overflow.
- A first-party fixture that quotes the markers (prose,
// @generated mid-file
banner in hand-written code, IaC DO NOT EDIT) is not dropped.
- Clean repo unchanged (default off).
Branch off main as <issue#>-generated-markers.
Phase 2 of #107 (plan 0002). Builds on the now-merged Phase 1 (#110): the
inventory + scc keep-set already route every engine through the first-party set;
this adds the generated-marker exclusion — the corvus lever (≈87% of that
repo is generated), which also pre-empts the #105 lizard blow-ups by shrinking the
set before the engines run.
Mechanism
Drop files whose head carries a banner-shaped generated marker, applied to
BOTH
build_source_inventory(lizard) andbuild_scc_keepset(scc) — mirroring_apply_gitattr_excludes.Markers — banner-shaped, NOT loose substrings (Morlock M1)
The spike used
DO NOT EDIT|@generated|<auto-generated>|Code generatedascase-insensitive substrings — which fire on first-party code that merely mentions
them (codegen tooling, Flow/Relay, lint configs) or owns them (IaC
# DO NOT EDIT,hand-written migrations). Tighten to anchored, comment-leader, case-sensitive forms:
^//\s*Code generated .* DO NOT EDIT\.\s*$@generatedonly inside a comment leader at line start<auto-generated>at line startDO NOT EDITis NOT a marker (too weak — demoted).Honesty guards (non-negotiable)
raw/+ a count — loud, not just anumber (the guard that earns the subtractive design).
real finding, not silent shrinkage).
LC_COLLATE/LC_ALL=C, deterministic output (Engine-health spine: enforce the honesty contract + test the real sections (plan 0001 §A) #96).Rollout decision (open)
Ship opt-in first (
CHECKUP_EXCLUDE_GENERATED, default off) so the regexis field-tested with zero default-behaviour change, then flip to default-on
(with a kill-switch) in a follow-up once proven on real repos. Flagging for review:
default-on-now vs opt-in-first.
Acceptance
runs; no overflow.
// @generatedmid-filebanner in hand-written code, IaC
DO NOT EDIT) is not dropped.Branch off
mainas<issue#>-generated-markers.