Skip to content

fix: whitelist orjson (Apache/MIT; MPL only on a bundled part) in license check - #86

Merged
JarbasAl merged 1 commit into
devfrom
fix/whitelist-orjson
Aug 11, 2026
Merged

fix: whitelist orjson (Apache/MIT; MPL only on a bundled part) in license check#86
JarbasAl merged 1 commit into
devfrom
fix/whitelist-orjson

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Opus 4.8 (claude-opus-4-8) via Claude Code — NOT human-reviewed. Verify before acting.

Problem

license_tests fails on orjson in the WeakCopyleft category on every repo that resolves it transitively — which is most of OVOS, since ovos-bus-client and ovos-config pull it. First hit: ovos-PHAL-sensors #15.

Why it's a false positive

orjson declares License-Expression: MPL-2.0 AND (Apache-2.0 OR MIT). Verified against the bundled license files in the wheel: LICENSE-APACHE, LICENSE-MIT, and LICENSE-MPL-2.0. The code is Apache-2.0 OR MIT (elect either — both permissive); the MPL-2.0 covers only a bundled component and is file-level copyleft, safe when used as an unmodified imported library — the same footing as the already-whitelisted tqdm (MPL-2.0 AND MIT). The checker categorises the combined expression as WeakCopyleft, a fail category, so the permissive election never gets a chance.

Fix

Add orjson to the central whitelist alongside tqdm / marisa-trie / paho-mqtt / fsspec / skops, anchored per-package (^orjson(version-spec)?$). Regex verified to match orjson/orjson==3.11.9 and reject orjsonx/notorjson; YAML validated.

Blast radius

Shared reusable workflow — greens license_tests across every OVOS repo pulling orjson. Immediate beneficiary: ovos-PHAL-sensors #15.

…ense check

orjson declares License-Expression 'MPL-2.0 AND (Apache-2.0 OR MIT)': the code
is Apache/MIT (elect either), MPL-2.0 covers only a bundled component and is
file-level copyleft, safe as an unmodified imported library — same footing as
the already-whitelisted tqdm. The checker categorises the combined expression as
WeakCopyleft (a fail category), so every OVOS repo that resolves orjson
transitively (via ovos-bus-client / ovos-config) fails license_tests despite the
permissive election. Add it to the central whitelist, anchored per-package.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a2fa00f7-b3eb-4e80-89d8-fee313ca11fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JarbasAl
JarbasAl marked this pull request as ready for review August 11, 2026 22:23
@JarbasAl
JarbasAl merged commit 0a0a8df into dev Aug 11, 2026
1 check passed
@JarbasAl
JarbasAl deleted the fix/whitelist-orjson branch August 11, 2026 22:23
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