Skip to content

Lint Composite Actions with Shellcheck and the Schema in the Repo Gate - #2347

Merged
ptr727 merged 11 commits into
developfrom
feature/composite-action-lint
Oct 4, 2026
Merged

ptr727 merged 11 commits into
developfrom
feature/composite-action-lint

Conversation

@ptr727

@ptr727 ptr727 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

The repo gate gains a composite-actions check, so composite actions under .github/actions/ are linted wherever the hub gate runs. actionlint reads workflows only, so shell moved into an action previously had no shellcheck coverage.

  • Shell: each non-empty run: body of a bash, sh, or unset-shell step goes to shellcheck from the koalaman/shellcheck:stable Docker image, at warning severity without SC2154. That is weaker than linting a .sh file. Each ${{ }} expression is replaced by ${GHA_EXPR} first, and findings name the action file, step, and run line.
  • Schema: uvx check-jsonschema@latest --builtin-schema vendor.github-actions over every action file, with a pipx run fallback. This replaces the inline schema step in validate-task.yml.
  • A tree with no action file is skipped with a note. Each half reports its own missing tool, and the other half still runs.
  • Downstream repos get this check at their next pin bump.

Known limit: a \ at the end of a line inside a single-quoted string is treated as a continuation, which can shift a later finding by one line. It produces no false finding.

Addresses #2335

🤖 Generated with Claude Code

ptr727 and others added 6 commits October 4, 2026 07:53
Merge origin/develop and rework the composite-actions check: shellcheck
runs from the fleet's Docker image, each half reports its own missing
tool, YAML and tool failures become findings, placeholders keep line
numbers, and the docs describe the check as it runs.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Merge origin/develop. Expressions become a variable with continued
newlines, bodies run at warning severity as bytes, the Docker daemon is
probed once, and an empty or non-mapping action file is a finding.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Return a collapsed expression's newlines after its physical line so a
comment is not continued into code, and state the warning-severity
limits and the uvx float policy accurately.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 4, 2026 15:44
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7582ed2a-02cd-409f-9ef7-a3f3c2df0776
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved critical parsing, network-isolation, and governance issues remain.

Review effort: Lite
Findings: 3 High severity · 1 Low severity

Open (4)
What changed in this PR

Adds centralized ShellCheck and schema validation for composite actions in the repository gate.

Changes:

  • Adds Docker-based ShellCheck and schema validation with fallbacks.
  • Replaces the duplicated workflow schema step.
  • Adds tests and updates documentation, contracts, and generated skills.
File Reviewed change Findings
tests/​test_repo_gate.py Adds composite-action test coverage. Nit (1 vote): explain or replace the mock type suppression at line 950.
scripts/​README.md Documents the new gate behavior. Nit (2 votes): clarify local Docker, uvx, and pipx requirements.
OPERATIONS.md Removes the duplicated schema invocation. No findings.
GOVERNANCE.md Updates the CI linting contract. Critical (1 vote): remove the tracker reference from the modified instruction line.
docs/​reusable-workflows.md Documents downstream adoption. No findings.
.github/​workflows/​validate-task.yml Routes validation through the repository gate. No findings.
.github/​skills/​workflow-ci-contract/​SKILL.md Updates workflow guidance. No findings.
.github/​actions/​repo-gate/​repo_gate.py Implements composite-action shell and schema checks. Critical (2 votes): use expression-aware parsing before ShellCheck. Critical (1 vote): disable networking for the lint container. Nit (1 vote): explain the optional-import suppression.
.github/​actions/​repo-gate/​action.yml Updates the gate description. No findings.
.claude-plugin/​fleet-skills/​skills/​workflow-ci-contract/​SKILL.md Updates generated guidance. No findings.
.claude-plugin/​fleet-skills/​.source-digests/​workflow-ci-contract Refreshes the source digest. No findings.
.agents/​skills/​workflow-ci-contract/​SKILL.md Updates canonical workflow guidance. No findings.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/actions/repo-gate/repo_gate.py Resolved
Comment thread .github/actions/repo-gate/repo_gate.py Resolved
Comment thread GOVERNANCE.md Resolved
Comment thread scripts/README.md Resolved
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@f9f1deb). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2347   +/-   ##
==========================================
  Coverage           ?   57.70%           
==========================================
  Files              ?       16           
  Lines              ?     7919           
  Branches           ?        0           
==========================================
  Hits               ?     4570           
  Misses             ?     3349           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 57.70% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved critical, moderate, and nit findings remain in the gate implementation and documentation.

Review effort: Lite
Findings: 2 High severity

Open (2)
Resolved since last review (4)

Comment thread .github/actions/repo-gate/repo_gate.py Resolved
Comment thread .github/actions/repo-gate/repo_gate.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Five unresolved moderate findings remain in the repository gate implementation.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread .github/actions/repo-gate/repo_gate.py Resolved
@ptr727
ptr727 merged commit f63c3fb into develop Oct 4, 2026
12 checks passed
ptr727 added a commit that referenced this pull request Oct 4, 2026
…er Concurrency, and Review Digest Fixes (#2349)

## Summary

Promotes `develop` to `main` with twelve pull requests, each already
reviewed and merged into `develop`:

- [#2329](#2329) drops the
KiCadLibrary merge-bot failure note now that its secrets exist.
- [#2330](#2330) retires
the stale blog gitattributes entry and corrects the blog's hooks row.
- [#2331](#2331) scopes
the publisher concurrency group to the ref and settles the D4.7 window.
- [#2332](#2332) refuses
history reads in a shallow hub clone.
- [#2333](#2333) names the
fetched commit in `hub-fetch-run.py` and tests its unborn-HEAD and probe
paths.
- [#2337](#2337) counts
only the newest check suite per check in the review digest.
- [#2340](#2340) deletes
merge-bot heads from the closed event and splits the stub concurrency
sentence.
- [#2343](#2343) drops the
branch ref from the version example and documents the file-target
release variant.
- [#2344](#2344) measures
a wrapped Markdown sentence whole in the sentence-length check.
- [#2345](#2345) makes the
dispatcher own the strict-review pass for seats that cannot dispatch.
- [#2346](#2346) adds a
dependency-version `test-matrix` axis to the validate task.
- [#2347](#2347) lints
composite actions with shellcheck and the schema in the repo gate.

Closes #2302
Closes #2325
Closes #2320
Closes #2300
Closes #2312
Closes #2323
Closes #2296
Closes #2294
Closes #2292
Closes #2311
Closes #2327
Closes #1421
Closes #2321
Closes #2334
Closes #2335
Closes #2318
Closes #2293
Closes #2297
Closes #2301

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@ptr727
ptr727 deleted the feature/composite-action-lint branch October 4, 2026 17:35
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