Address findings from a three-agent adversarial review of the GH-35
delta:
- Compute the repo-wide incompatibility set from the full report, not the
--only-narrowed listing, so a filtered listing can no longer understate
a group's policy-aware risk. Add groupFilesWith(r, spec, incompatIDs)
and thread the full-report set through the text/markdown/JSON renderers.
- Use path.Base (not filepath.Base) on the slash-normalized enumerate
path when matching the config file, for cross-platform correctness.
- Tests: directory-grouping escalation across a mixed bucket, incompat
beating the headerless-unknown fallback, non-policy tokens not
escalating, incompatibleIDs cardinality (0/1/3 ids), the filtered-
listing risk contract, nested/--only config exclusion, no detected-
license/violation leak on the skipped config, and a check exit-code
regression guard for the config exclusion.
- Docs: correct the README grouped-output samples (risk markers,
(no-header) label, JSON group shape) and note the check exit-code
implication of the config exclusion in README and CHANGELOG.
README: policy-aware group risk and the .license-tool.yaml exclusion.
CHANGELOG: comprehensive Unreleased entry for the audit reporting overhaul.
DESIGN: post-implementation addenda recording the two new features and the
three audit-flagged items resolved by decision (dep-grouping non-goal,
JSON percentages declined, go.mod not a supported ecosystem).
A group's [risk] marker was computed solely from its files' license
categories, so it was policy-blind: an Apache-2.0 group beside an
AGPL-3.0-or-later group read "low" even though the pair is a curated
hard incompatibility, and a deny-listed permissive license also read
"low".
Escalate a group's risk to "high" when it carries a policy concern: a
file whose license is party to a repo-level hard incompatibility
(computed once over the distinct source ids via policy.Incompatible),
or a file carrying a file-scoped policy-violation token. Category-only
risk is preserved when there is no policy concern, with no false
escalation (MIT beside AGPL, not an incompatibility, stays "low").
The config file is YAML (commentable), so the audit counted it as a
coverable source file missing a managed header, inflating sourceTotal
and sourceMissing. It is tool metadata, not coverable source, and never
carries a header.
Mark any file whose basename is .license-tool.yaml as skipped (reason
"tool config") in the audit pipeline, so it still appears in the file
listing but is excluded from source/header tallies. Export
config.RepoConfigName as the single source of truth for the name.