Skip to content

fix(copyright): bound and normalize author candidates - #1413

Merged
mstykow merged 1 commit into
fix/pod-narrative-creditsfrom
fix/author-candidate-boundaries
Sep 3, 2026
Merged

fix(copyright): bound and normalize author candidates#1413
mstykow merged 1 commit into
fix/pod-narrative-creditsfrom
fix/author-candidate-boundaries

Conversation

@mstykow

@mstykow mstykow commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Stop author candidates at grammatical lowercase prose and change-action boundaries while preserving conjoined and handle-bearing rosters.
  • Normalize quoted names and punctuated obfuscated contacts idempotently across repeated refinement.
  • Reject identity templates and subject-role object phrases that are not file authorship.

Issues

Scope and exclusions

  • Included: generic final author refinement and grammar-context cleanup.
  • Explicit exclusions: repository-specific values, filename checks, and package-party extraction.

How to verify

  • Scan Perl 5.38.4 with provenant scan --copyright --json out.json perl-5.38.4. Relative to fix(copyright): recover bounded POD contributor rosters #1412, seven malformed or false author values disappear and six supported values appear: three clean replacements (Larry Wall, Nicholas Clark, Paul Marquess), two newly recovered Benchmark contributors, and one structured obfuscated-contact author. Quoted duplicates, a command template, and an obituary object phrase are removed. Copyright and holder output is unchanged.
  • Scan InfoZIP 3.0 as a control. Its only author delta is two occurrences of Greg Roelofs newt (at) pobox.com normalized to the idempotent Greg Roelofs newt at pobox.com; copyright and holder output is unchanged.
  • Run cargo test --lib copyright::detector, cargo test --test copyright_golden --features golden-tests, and cargo test --test post_processing_golden --profile ci-release --features golden-tests.

Intentional differences from Python

  • ScanCode's token grammar avoids some of these Provenant overrun shapes but misses both Benchmark contributors, and it reduces the structured obfuscated-contact author to Masaaki Goshima. Provenant retains the supported identity and contact while enforcing explicit grammar boundaries.

Follow-up work

  • Created or intentionally deferred: source-header credit recovery remains in the next stacked branch.

Expected-output fixture changes

  • Files changed: none.
  • Why the new expected output is correct: focused unit and end-to-end tests cover prose/action boundaries, list preservation, quote normalization, templates, subject-role constructions, and repeated obfuscated-contact refinement; both broad golden suites pass unchanged.

Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@mstykow
mstykow force-pushed the fix/author-candidate-boundaries branch from bbbef60 to 06ac294 Compare September 3, 2026 10:24
@mstykow

mstykow commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@mstykow
mstykow merged commit 32d6c6b into main Sep 3, 2026
12 checks passed
@mstykow
mstykow deleted the fix/author-candidate-boundaries branch September 3, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant