fix(workflows): resync actions.lock, repair validate-spdx staged mode, refresh registry - #799
Conversation
validate-spdx.sh scan mode filters by extension; staged mode did not. Any commit touching an extensionless or non-source staged file was therefore judged against a rule the scan path would never have applied to it -- and in particular NO commit touching .github/workflows/actions.lock could pass pre-commit, because the lockfile is not a source file and carries no SPDX header by design. This is instance 15 of the estate's recurring trap: a guard asking a different question than its consumer. Adds scripts/tests/validate-spdx-test.sh covering both modes, including the lockfile case that motivated the fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168Bgpez8mFBcAqYAj8VgEx
Dependabot bumped codeql-action in the workflow files; actions.lock was not resynced, so the lockfile named a ref the workflows no longer used and the actions-lock gate reported 3 stale findings. Six lines, hand-edited: cdf488f595d80d6e07e03d4674febd5ab45fa938 -> b96794f015dfd88f77b49b1c93e0fa7110f94c63 (the three codeql-action refs in the workflows: stanzas, plus the dependencies: block key, ref: and commit:). owner_id 9919 / repo_id 259445878 unchanged. The lockfile was edited BY HAND, deliberately. gh actions-lock fix mode was measured to rewrite 16 .yml files (42 with --no-narrow), de-pinning correct SHAs back to mutable tags and inventing invalid local action refs -- straight into a sha_pinning_required ruleset and startup death. Only --no-fix --json is safe to read. This change touches ZERO .yml bytes. ref: stays a bare SHA, per the estate lock regime. Verification: stale findings 3 -> 0; gate rc 1 -> 0; git diff confirms no workflow file was modified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168Bgpez8mFBcAqYAj8VgEx
REGISTRY.a2ml is a GENERATED artefact (scripts/build-registry.sh). Three source_hash values had drifted from the file tree, so build-registry.sh --check fails on main today -- which means registry-verify.yml is red before this branch touches anything. Regenerated with the generator, not hand-edited. The diff is exactly three source_hash lines; the file's shape is UNCHANGED (owner ruling R-H4). Reshaping the registry away from its TOML-shaped record dialect is a separate, deliberate job against build-registry.sh, and is not coupled to this branch. Verification: build-registry.sh --check rc 1 (at HEAD) -> 0 (with this). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168Bgpez8mFBcAqYAj8VgEx
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 SummarySummary by CodeRabbit
WalkthroughThe SPDX hook now treats JSON files as source files and uses the same allowlist for staged and full scans. A new shell test script verifies lockfile handling, source-file failures, valid headers, non-source files, and scan-mode parity. ChangesSPDX validation
Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
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. I hop through files where headers gleam Comment |
…-bump Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
|



Three commits, each one file, each independently reviewable.
1.
fix(hooks)— validate-spdx staged mode gets the filter its scan mode hasvalidate-spdx.shscan mode filters by extension; staged mode did not. So nocommit touching
.github/workflows/actions.lockcould pass pre-commit — the lockfileis not a source file and carries no SPDX header by design. Instance 15 of the estate's
recurring trap: a guard asking a different question than its consumer.
Ships
scripts/tests/validate-spdx-test.shcovering both modes, including the lockfilecase that motivated it.
2.
fix(workflows)— resyncactions.lockafter the codeql-action bumpDependabot bumped codeql-action in the workflow files; the lockfile was not resynced, so
it named a ref the workflows no longer used.
Six lines, hand-edited:
cdf488f5…→b96794f0…(the threecodeql-actionrefs inthe
workflows:stanzas, plus thedependencies:block key,ref:andcommit:).owner_id/repo_idunchanged.ref:stays a bare SHA per the lock regime.Verification:
stalefindings 3 → 0 (re-measured on this branch); gate rc 1 → 0;git diff origin/main..HEAD -- '.github/workflows/*.yml'is empty — zero.ymlbytestouched.
(The 75
sha-as-reffindings the tool also reports are pre-existing and doctrinal: thetool prefers a tag, the estate ruleset mandates a SHA. Not addressed here.)
3.
chore(registry)— refresh three stalesource_hashlinesNot cosmetic:
build-registry.sh --checkfails atmain's HEAD, soregistry-verify.ymlis red before this branch touches anything. Regenerated with thegenerator, not hand-edited; the diff is exactly three
source_hashlines.The file's shape is unchanged (owner ruling R-H4). Reshaping the registry away from
its superseded TOML-shaped record dialect is a separate, deliberate job against
build-registry.sh.Verification:
build-registry.sh --checkrc 1 → 0.⚠ Depends on #798. This branch was previously uncommittable:
standardscould acceptno commit through its own pre-commit hook. #798 removes the two dead-format gates that
deadlocked it. These three commits are signed and passed the repaired hook; merge #798
first so the fix is reproducible for anyone else on this branch.
🤖 Generated with Claude Code
https://claude.ai/code/session_0168Bgpez8mFBcAqYAj8VgEx