Repository navigation
fix: make jd license URL deterministic before grouping reports - #3534
IrynaKulakova wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 66177876-e733-4a86-b7bc-236e5d06cbf7
There was a problem hiding this comment.
🟢 Approval recommended
The narrow rewrite matches the pinned dependency, the reports are consistent, and validation remains enforced.
No open issues 🎉
What changed in this PR
Makes jd/v2 license URLs deterministic so identical architecture reports group consistently.
Changes:
- Normalize the verified
v2.5.0URL before sorting and hashing. - Refresh platform reports without changing license validation or workflow notifications.
| File | Description |
|---|---|
| third-party-licenses.windows.md | Uses the canonical license URL. |
| third-party-licenses.linux.md | Uses the canonical license URL. |
| third-party-licenses.darwin.md | Uses the canonical license URL. |
| script/licenses | Normalizes the version-specific URL before grouping. |
Review effort: Max
| # go-licenses can resolve jd/v2's license to a nonexistent v2/LICENSE. | ||
| # At v2.5.0 it lives at the repository root; normalize before hashing. | ||
| grep -E '^ - \[' "${report_file}" | | ||
| sed 's|https://github\.com/josephburnett/jd/blob/v2\.5\.0/v2/LICENSE)|https://github.com/josephburnett/jd/blob/v2.5.0/LICENSE)|g' | | ||
| LC_ALL=C sort > "${packages_file}" |
There was a problem hiding this comment.
can we make this generic instead of pinning jd v2.5.0? go-licenses sends a HEAD to blob/<tag>/v2/go.mod and only keeps the v2/ folder when that request goes through, so it's really a flaky network check that can hit any /vN module living in a subfolder. if we always drop the folder we get the same output as when the check fails (which is also the link that actually works), and it won't quietly stop matching when jd gets bumped
| # go-licenses can resolve jd/v2's license to a nonexistent v2/LICENSE. | |
| # At v2.5.0 it lives at the repository root; normalize before hashing. | |
| grep -E '^ - \[' "${report_file}" | | |
| sed 's|https://github\.com/josephburnett/jd/blob/v2\.5\.0/v2/LICENSE)|https://github.com/josephburnett/jd/blob/v2.5.0/LICENSE)|g' | | |
| LC_ALL=C sort > "${packages_file}" | |
| # go-licenses only keeps a /vN/ folder in license URLs when a GitHub check succeeds, so always drop it. | |
| grep -E '^ - \[' "${report_file}" | | |
| sed -E 's#(github\.com/[^/]+/[^/]+/blob/[^/]+)/v[0-9]+/#\1/#' | | |
| LC_ALL=C sort > "${packages_file}" |
Summary
Normalize the inconsistent
jd/v2license URL before sorting and hashing architecture reports, preventing spurious license-check failures. Regenerate the Darwin, Linux, and Windows reports with the canonical URL.Why
Addresses the review feedback on #3490. The failed job split otherwise identical Windows architecture reports because
go-licensesemitted different license URLs for the same dependency; making notification failures nonfatal does not fix that mismatch.What changed
https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSEto the verified repository-root license URL before sorting and hashing. This is a version-specific workaround, not a general rewrite of/v2/paths.MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint-script/lintpassed with 0 issues../script/test-script/testpassed, including race tests.Additional validation:
PATH="$(go env GOPATH)/bin:$PATH" script/licenses- passed twice; SHA-256 comparisons confirmed identical reports and all saved license files across consecutive runs.bash -n script/licenses- passed.git diff --check- passed.Docs