Skip to content

Fix reported license normalization bugs#1599

Open
AgentGoose32 wants to merge 1 commit intoecosyste-ms:mainfrom
AgentGoose32:polar-1059-normalized-licenses
Open

Fix reported license normalization bugs#1599
AgentGoose32 wants to merge 1 commit intoecosyste-ms:mainfrom
AgentGoose32:polar-1059-normalized-licenses

Conversation

@AgentGoose32
Copy link
Copy Markdown

Refs #1059

Summary

  • Removes the 150-character early fallback so long license texts can still be recognized.
  • Recognizes standard MIT license text using the canonical permission grant phrase.
  • Preserves EDL-1.0 in compound license expressions instead of letting the fuzzy SPDX lookup misclassify it.
  • Adds regression coverage for both examples from the issue.

Validation

  • ruby -c app/models/package.rb
  • ruby -c test/models/package_test.rb
  • git diff --check

bundle exec ruby -Itest test/models/package_test.rb -n '/normalize_licenses (preserves EDL|recognizes long MIT)/' is blocked locally because this checkout requires Bundler 4.0.10 from Gemfile.lock, which is not available in the system Ruby environment.

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