Skip to content

ci(workflow-linter): look for SPDX in the leading comment block - #139

Merged
hyperpolymath merged 2 commits into
mainfrom
ci/spdx-header-check
Nov 5, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
ci/spdx-header-check

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What was wrong

The SPDX check in workflow-linter.yml reads only line 1 of each workflow. Dependabot's actions-lock bumps prepend # This workflow is managed by gh actions-lock. above the existing header, so all 23 workflows on main now have their SPDX line on line 2 or later and fail the check. Moving it back to the top would only last until the next bump.

Change

The "Check SPDX headers" step now accepts an SPDX-License-Identifier anywhere in the leading block of comment and blank lines, before the first YAML line. A file whose only SPDX line comes after YAML, or that has none, still fails.

Testing

I ran the step scripts locally against this branch:

  • SPDX check: exit 0.
  • Permissions check: exit 0.
  • Negative test: a file with no SPDX header and a file with SPDX after name: both fail.

Generated by Claude Code

The "Check SPDX headers" step only read line 1 of each workflow. Dependabot's
actions-lock bumps now prepend "# This workflow is managed by gh
actions-lock." above the existing header, so every workflow's SPDX line sits
on line 2 or later and lint-workflows fails on main ("missing SPDX header",
one error per file). Moving the SPDX line back to the top would last only
until the next Dependabot bump.

The check now accepts an SPDX-License-Identifier anywhere in the leading
block of comment and blank lines, before the first YAML line. A file whose
only SPDX line comes after YAML content, or that has none, still fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132Cdz3iwk2QGKv2sUhhsye
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1dcc356f-e2ab-4e5c-94c8-53f463e8af05
Commits

Reviewing files that changed from the base of the PR and between 5318bfe and 05f4e92.

Files selected for processing: 1

  • .github/workflows/workflow-linter.yml

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • The workflow license check now accepts SPDX identifiers in the opening comment and blank lines, and still reports an error if none is found there.

The SPDX check now searches the initial comment and blank-line section of each workflow file. It stops at the first non-comment, non-blank line and fails if the identifier is absent.

Changes: Workflow linting

Layer / File(s) Summary
SPDX header scan
.github/workflows/workflow-linter.yml
The check scans the initial comment and blank-line section for SPDX-License-Identifier, instead of checking only the first line.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · previous review 5318b

The SPDX header change satisfies the intended workflow-linter behavior and introduces no identified merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: the workflow linter now searches the leading comment block for the SPDX identifier.
Description check Passed The description directly explains the defect, the linter change, the validation boundary, and the reported tests.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e72f392f-cbff-4447-8122-a04c8c7aca4e
Commits

Reviewing files that changed from the base of the PR and between 1d6ecd0 and 5318bfe.

Files selected for processing: 1

  • .github/workflows/workflow-linter.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 7

  • GitHub Check: CodeRabbit
  • GitHub Check: Idris2 core tests
  • GitHub Check: release-readiness
  • GitHub Check: rsr-compliance
  • GitHub Check: seam-health
  • GitHub Check: analyze (javascript-typescript, none)
  • GitHub Check: semgrep-cloud-platform/scan
Additional comments: 1

.github/workflows/workflow-linter.yml: 1

29-29: LGTM!

@linear-code
linear-code Bot marked this pull request as ready for review November 4, 2026 23:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T23:53:20.975770Z 5318bfe Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

The failing finishingbot / release-readiness and rhodibot / rsr-compliance checks are not caused by this PR, so they won't be fixed here.

  • What fails: both checks are gitbot-fleet audits of the whole repository's content.
  • Why they aren't this PR's: both also fail on main on every recent push, including 1d6ecd0, 8e217f3 and e4adfec. This PR changes only one line in .github/workflows/workflow-linter.yml.
  • Fix: none exists yet. The audit findings are in each run's uploaded *-results artifact. Clearing them is repository-content work (the descriptile/RSR layout migration) that is outside this PR's scope.

The check this PR targets is Workflow Linter / lint-workflows.


Generated by Claude Code

SonarCloud's quality gate failed this PR on two findings in the lines
around the SPDX change: "Redirect this error message to stderr (>&2)"
on the missing-SPDX and missing-permissions echo lines. Both lines are
diagnostics, and the step's result still comes from its exit status, so
sending them to stderr changes nothing about pass or fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132Cdz3iwk2QGKv2sUhhsye
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 549e08f into main Nov 5, 2026
18 of 20 checks passed
@hyperpolymath
hyperpolymath deleted the ci/spdx-header-check branch November 5, 2026 16:58
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.

2 participants