Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The workflow counts checkout-HEAD stamp changes as updates, causing recurring header-only pull requests even when the license data and ScanCode pin are unchanged.
1 open issue
What changed in this PR
This PR completes the license-category update stack by integrating ScanCode refreshes and npm data generation into the existing daily SPDX update workflow.
Changes:
- Adds immutable ScanCode revision resolution, archive checksums, and pin updates while preserving verification and category overrides.
- Serializes automated updates and validates Go, generated data, and npm tests before creating a PR.
- Extends PR descriptions and operations documentation to distinguish category-data changes from provenance-only updates.
| File | Description |
|---|---|
packages/license-categories/docs/operations.md |
Documents scheduled updates, validation, and operational requirements. |
cmd/pr_body.go |
Adds ScanCode commit and category-payload summaries. |
cmd/pr_body_test.go |
Tests payload and provenance-only summaries. |
cmd/license-categories/update_scancode.go |
Resolves immutable revisions, computes checksums, and replaces pins. |
cmd/license-categories/update_scancode_test.go |
Adds offline refresh, failure, checksum, and verification-mode tests. |
cmd/license-categories/main.go |
Integrates refresh mode with generation and verification. |
.github/workflows/fetch-licenses.yaml |
Adds serialized ScanCode updates, npm regeneration, and pre-PR validation. |
Review effort: Balanced (auto)
| genfiles_changed=true | ||
| # --quiet: Exits with 1 if there are changes; otherwise, exits with 0 | ||
| git diff --quiet -- spdxexp/spdxlicenses/*.go && genfiles_changed=false | ||
| git diff --quiet -- spdxexp/spdxlicenses/*.go cmd/license-categories/main.go packages/license-categories/src/generated.ts && genfiles_changed=false |
elrayle
force-pushed
the
elr/license-categories-scancode-updates
branch
from
November 11, 2026 17:50
7eed4fa to
b8541a8
Compare
This was referenced Nov 11, 2026
elrayle
force-pushed
the
elr/license-categories-data-only
branch
from
November 11, 2026 18:43
d3b0f4d to
2238d31
Compare
elrayle
force-pushed
the
elr/license-categories-scancode-updates
branch
from
November 11, 2026 18:44
b8541a8 to
216e82c
Compare
elrayle
force-pushed
the
elr/license-categories-data-only
branch
from
November 11, 2026 21:03
2238d31 to
a991934
Compare
elrayle
force-pushed
the
elr/license-categories-scancode-updates
branch
from
November 11, 2026 21:04
216e82c to
c373e53
Compare
elrayle
force-pushed
the
elr/license-categories-data-only
branch
from
November 11, 2026 22:28
a991934 to
a0b1264
Compare
Extend the existing daily license updater to refresh the ScanCode pin and checksum, regenerate npm data, validate both outputs, and maintain one reviewable update PR. Preserve provenance verification and data-only publication policy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Scope G703's path-traversal exclusion to the fixed fixture write under t.TempDir. The CI-pinned golangci-lint v2.11.4 reports this controlled test path; keep production scanning unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
elrayle
force-pushed
the
elr/license-categories-scancode-updates
branch
from
November 11, 2026 22:29
c373e53 to
50de9b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fourth and final layer of native stack #179, based directly on #177 (
elr/license-categories-data-only, verified parentd3b0f4df730fbdd79bf6903d88205c42af10d8b4). Stack order and PR bases remain #175 → #176 → #177 → #178.auto-update-licensesPR againstmain.-update-scancode: resolve upstreammainonce to a full immutable commit, download that revision once, compute SHA-256, and generate from the same bytes. Advance pin/provenance even for upstream documentation-only changes; unchanged revisions still verify the recorded checksum.-verify, and layer 3's literal-data-only publication policy. Verification cannot be combined with pin updates.No version bumps, auto-merges, publication changes, remote workflow dispatches, registry/configuration changes, or SPDX identifier expansion. The checked-in ScanCode pin and generated data remain unchanged in this implementation PR.
File scope
.github/workflows/fetch-licenses.yaml: independent ScanCode refresh, npm regeneration/diff inclusion, pre-PR validation, serialization, and explicit update paths.cmd/license-categories/main.go: integrate refresh mode and renamedefaultScancodeSourcetocurrentScancodeSourcewithout replacing parent provenance/verification logic.cmd/license-categories/update_scancode.goandupdate_scancode_test.go: immutable API/archive refresh, AST-based pin replacement, and offline success/error/checksum/verification-mode cases.cmd/pr_body.goandpr_body_test.go: ScanCode commits and category-payload summary in the existing update PR description.packages/license-categories/docs/operations.md: concise cron operations documentation; retain existing publication/override guidance.Validation
Passed again after syncing the corrected parent:
go test -race ./...go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 run ./...(exact CI version, 0 issues)npm test --prefix packages/license-categories(all 26 parent cases pass)make verify-license-categoriesgo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/*.yamlgit diff --checkThe initial CI run exposed two distinct causes: CI's newer gosec reported G703 on the updater test's fixed fixture write under
t.TempDir; a one-line, narrowly scoped annotation documents why this test path is safe without weakening production scanning. Package validation separately inherited aHEAD~1assumption from layer 3's Actions-entrypoint test, which fails in shallow checkouts. That test was fixed in #177 using an isolated Git fixture and known mismatching tag; this layer incorporates that corrected parent without changing its test or checkout policy.Also repeated offline updater/PR-body cases under the race detector. A disposable isolated checkout refreshed to live immutable ScanCode commit
f10c818a2fbf0cd57a7c1b6cadd86a863408183c, recorded archive SHA-256047188d4a4f2e62c497e63e74f8ebdeccbf889d2bee200fca60b18cd52bd6ed2, verified generated data, and successfully reran with the unchanged pin. That live update changed provenance only; the unchanged layer-3 comparator confirmed identical literal license data. The fixture was removed without changing this branch's reviewed pin.Local validation used Go 1.26.4 and Node 26.4.0; Actions retain their declared Go version and Node 24. Existing missing-metadata warnings remain explicit. Scheduled execution and GitHub-token PR creation were not run remotely; repository Actions settings may need to permit workflow-created PRs as documented.