Skip to content

fix(copyright): scan bounded YAML credit sections - #1409

Merged
mstykow merged 1 commit into
mainfrom
fix/embedded-yaml-credits
Sep 3, 2026
Merged

fix(copyright): scan bounded YAML credit sections#1409
mstykow merged 1 commit into
mainfrom
fix/embedded-yaml-credits

Conversation

@mstykow

@mstykow mstykow commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Parse YAML front matter and explicitly tagged YAML sections without treating the surrounding document as YAML.
  • Keep extraction bounded by closing/tag markers and preserve global source line numbers.
  • Remove a redundant structured handle prefix only when it exactly matches the declared email local part.

Issues

Scope and exclusions

  • Included: array-valued author/contributor credits in leading YAML front matter and --- yaml tagged sections.
  • Explicit exclusions: unmarked code literals that merely resemble metadata and arbitrary recovery from invalid YAML.

How to verify

  • Scan Perl 5.38.4 with provenant --copyright --json out.json perl-5.38.4. Relative to fix(copyright): extract structured contributor credits #1408, this adds the source-backed Matt S. Trout credit in the bounded YAML section of cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/quoting.tml, with no other author changes and no copyright/holder changes. The InfoZIP 3.0 control scan is unchanged in all three fields.

Intentional differences from Python

  • Provenant strips mst: because it duplicates the local part of <mst@shadowcatsystems.co.uk>; ScanCode renders the handle as part of the person's name. Unmarked Perl fixture literals remain excluded.

Follow-up work

  • Created or intentionally deferred: explicit prose author sections and malformed/template author cleanup remain in later stacked branches.

Expected-output fixture changes

  • Files changed: none.
  • Why the new expected output is correct: focused tests cover front-matter bounds, tagged-section bounds, source lines, and conservative handle normalization.

Generated with Claude Code

@mstykow
mstykow force-pushed the fix/embedded-yaml-credits branch from 299ce89 to e6a72e4 Compare September 3, 2026 02:25
@mstykow
mstykow force-pushed the fix/embedded-yaml-credits branch from e6a72e4 to 0fccf10 Compare September 3, 2026 02:28
An error occurred while trying to automatically change base from fix/structured-contributor-metadata to fix/yaml-author-metadata September 3, 2026 10:23
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@mstykow
mstykow force-pushed the fix/embedded-yaml-credits branch from 0fccf10 to 2e04467 Compare September 3, 2026 10:24
@mstykow
mstykow changed the base branch from fix/structured-contributor-metadata to main 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 of 23 checks passed
@mstykow
mstykow deleted the fix/embedded-yaml-credits 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