feat(scc): the honest banner — coverage-by-category + foreign-language concentration caveat (#117) - #118
Merged
Conversation
…e concentration caveat (#117) Plan 0002 Phase 3. Makes first-party exclusions visible and actionable, and catches the markerless flat-vendored case the auto-exclude deliberately can't. - detection.json coverage-by-category (schema 1.5): tracked / firstParty / pctExcluded, and excluded.{generated,authorDeclared,convention} over the all-extension keep-set the scc engines use — surfaced on the console and the report headline so a shrunk scan never reads as "nothing here". Wires in the previously-unsurfaced exclusion counts via staged deltas in build_scc_keepset. - single-directory concentration caveat (plan §6.5): a dir dominated by a language FOREIGN to the repo's primary is flagged as vendored-looking, with the exact one-line fix. Language-aware on purpose — pure share flags the primary source dir on every normal repo (a false positive found in end-to-end testing); the foreign-language test matches the spike evidence (dotCMS webapp/html/js is JS while the codebase is Java) and stays silent on monolithic-source repos. Pure transform in lib/scc-concentration.jq; threshold CHECKUP_CONCENTRATION_PCT (default 25); advisory only, never auto-excluded. - generated-marker exclusion flipped DEFAULT-ON with a loud banner + the enumerated raw/…generated list; kill-switch CHECKUP_EXCLUDE_GENERATED=0. The shrink is announced, never silent. Tests: language-aware concentration (incl. the primary-dir-not-flagged guard) and the coverage-by-category count partition, both env-independent / determinism-safe (#96); flipped the Phase 2 default expectations. Docs: README env vars, architecture.md schema 1.5, CHANGELOG. Refs #107. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 24, 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.
Plan 0002 Phase 3 — "the honest banner". Phases 1 (#110) and 2 (#115) routed the scc engines through the first-party inventory and added a banner-shaped generated-marker exclusion (opt-in). Phase 3 makes the exclusions visible and actionable and catches the markerless flat-vendored case the auto-exclude deliberately can't (plan §6.5, the dotCMS class).
What changed
detection.jsonschema → 1.5):coverage.tracked/firstParty/pctExcluded, plusexcluded.{generated,authorDeclared,convention}over the all-extension keep-set the scc engines use. Surfaced on the console and the report headline, so a shrunk scan can never read as "nothing here" — % excluded is itself a signal. Computed via staged count-deltas inbuild_scc_keepset(wires in the previously-unsurfacedGENERATED_EXCLUDED_COUNT).lib/scc-concentration.jq, plan §6.5): a directory dominated by a language foreign to the repo's primary is flagged as vendored-looking, with the exact one-line fix (CHECKUP_EXCLUDE='<dir>/*'). Language-aware on purpose — end-to-end testing showed pure share flags the primary source dir on every normal repo (a real false positive); the foreign-language rule matches the spike evidence (dotCMSwebapp/html/jsis JS while the codebase is Java) and stays silent on monolithic-source repos. ThresholdCHECKUP_CONCENTRATION_PCT(default 25). Advisory only, never auto-excluded.raw/…generatedlist) and kill-switchCHECKUP_EXCLUDE_GENERATED=0. The shrink is announced, never silent.Verification
scc-inventory(+ concentration: foreign-tree detection, primary-dir-not-flagged guard, thresholds, determinism) andsource-inventory(+ coverage-by-category partition, flipped Phase 2 default, kill-switch).shellcheck --severity=errorclean (CI's gate);bash -nclean.docs/architecture.md(schema 1.5 + example), CHANGELOG.Refs #107. Closes #117.
🤖 Generated with Claude Code