Skip to content

Reject duplicate extracted-license identifiers - #914

Open
Motaghi wants to merge 1 commit into
spdx:mainfrom
Motaghi:fix/spdx-tools-809
Open

Motaghi wants to merge 1 commit into
spdx:mainfrom
Motaghi:fix/spdx-tools-809

Conversation

@Motaghi

@Motaghi Motaghi commented Nov 12, 2026 •

Copy link
Copy Markdown

Extracted-license validation accepted records with the same license_id, even when their extracted text differed. Track identifiers within each list and report repeated IDs with the affected license as context. Full-document validation uses this same check. Fixes #809.

Tests cover duplicate and distinct identifiers through list and full-document validation. Both duplicate cases fail before the fix. Afterward the validation tests and the full SPDX 2 test suite pass. Changed-file isort, Black and flake8 checks pass.

I used gpt-6.1-sol via Codex, run from T3 Code, to write the patch and tests, and Claude Opus 5.5 reviewed the change independently. I've read and verified the diff myself.

Fixes spdx#809 by checking license_id uniqueness in extracted-license list
validation, with duplicate and distinct IDs tested through both list and
full-document validation.

Signed-off-by: Behzad Motaghi <behzad@motaghi.dk>

This branch has not been deployed

No deployments
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.

duplicate licenseId not detected

1 participant