Skip to content

feat(copyright): preserve less-normalized output by default#837

Merged
mstykow merged 3 commits intomainfrom
feat/copyright-compat-mode
May 3, 2026
Merged

feat(copyright): preserve less-normalized output by default#837
mstykow merged 3 commits intomainfrom
feat/copyright-compat-mode

Conversation

@mstykow
Copy link
Copy Markdown
Owner

@mstykow mstykow commented May 3, 2026

Summary

  • keep a less-normalized file-level copyright string in files[].copyrights[].copyright by default while still carrying normalized shadow values internally for tallies, shaping, summary fallback, and package metadata promotion
  • add a generic --compat-mode scancode projection so parity-sensitive workflows can still emit ScanCode-style rendered copyright strings without changing the public field shape
  • teach compare workflows to ignore the intentional All rights reserved / trailing-punctuation rendering delta while still surfacing real copyright-count and value differences

Scope and exclusions

  • Included: copyright model/projection changes, compare normalization, replay/cache handling, targeted tests, and scoped documentation updates
  • Explicit exclusions: no new output field was added, no separate sidecar artifact was introduced, and no broad fixture regeneration was done

Intentional differences from Python

  • native Provenant output now keeps a less-normalized file-level copyright string in files[].copyrights[].copyright; users can opt back into ScanCode-style rendering with --compat-mode scancode
  • the output shape stays the same; this is a rendering-policy difference, not a schema fork

Concrete examples

From a real Kubernetes file:
vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/errors.go

Source header:
// Copyright 2020 The Go Authors. All rights reserved.

  • native/default Provenant output:
    Copyright 2020 The Go Authors. All rights reserved.
  • --compat-mode scancode output:
    Copyright 2020 The Go Authors

From another real Kubernetes file:
vendor/k8s.io/kube-openapi/pkg/aggregator/aggregator.go

Source header:
Copyright 2017 The Kubernetes Authors.

  • native/default Provenant output:
    Copyright 2017 The Kubernetes Authors.
  • --compat-mode scancode output:
    Copyright 2017 The Kubernetes Authors

Follow-up work

  • Created or intentionally deferred: if future compatibility bundles grow beyond copyright rendering, reevaluate whether --from-json should preserve more compatibility metadata than the current output shape carries

mstykow added 3 commits May 3, 2026 13:02
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@mstykow mstykow merged commit 316df69 into main May 3, 2026
15 checks passed
@mstykow mstykow deleted the feat/copyright-compat-mode branch May 3, 2026 11:56
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