Skip to content

fix(output): preserve hoisted SPDX license data#701

Merged
mstykow merged 6 commits intomainfrom
fix/license-hoisting-spdx
Apr 15, 2026
Merged

fix(output): preserve hoisted SPDX license data#701
mstykow merged 6 commits intomainfrom
fix/license-hoisting-spdx

Conversation

@mstykow
Copy link
Copy Markdown
Owner

@mstykow mstykow commented Apr 15, 2026

Summary

  • derive detected_license_expression_spdx from SPDX-bearing detections instead of the overloaded internal file field
  • preserve Debian copyright license expressions, SPDX siblings, and detections when merging parsed copyright metadata into package data
  • include other_license_expression_spdx in golden package/reference-follow projections so sibling hoist regressions stay visible

Scope and exclusions

  • Included: file-level SPDX output serialization, Debian package license merge behavior, golden projection coverage for package SPDX sibling fields
  • Explicit exclusions: broader internal model renaming or storage cleanup for ScanCode-vs-SPDX license fields

Intentional differences from Python

  • None; this aligns hoisted SPDX output with ScanCode semantics and preserves Debian package license metadata that was already parsed but previously dropped during merge

Follow-up work

  • Created or intentionally deferred: consider separating internal ScanCode and SPDX storage fields to reduce future hoisting ambiguity

mstykow and others added 6 commits April 15, 2026 17:30
Serialize file-level detected SPDX expressions from SPDX-bearing detections instead of the overloaded internal field so hoisted output stays aligned with nested license detections.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Carry declared and other license expressions, SPDX siblings, and detections from parsed copyright metadata into merged Debian package data so package hoists do not silently drop computed license output.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Include other SPDX sibling fields in package and reference-follow golden projections so future hoisting regressions are visible in fixture comparisons.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Update post-processing reference-follow expected output to match the corrected file-level SPDX hoist for MIT-based fixtures.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Update the file-to-package inheritance golden to expect the corrected BSD SPDX hoist at the file level.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Align the package tallies golden with the repo's current public-domain SPDX mapping now that the package projection compares that field explicitly.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@mstykow mstykow enabled auto-merge (rebase) April 15, 2026 20:23
@mstykow mstykow merged commit c2d0947 into main Apr 15, 2026
14 checks passed
@mstykow mstykow deleted the fix/license-hoisting-spdx branch April 15, 2026 20:32
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