Repository navigation
ci(ci): add pull request checks - #2
Merged
Merged
Conversation
DmitriyG1
marked this pull request as draft
November 17, 2026 11:39
DmitriyG1
commented
Nov 17, 2026
DmitriyG1
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review of this PR (/code-review medium, Claude Code). Findings are inline:
- 🔴 a required check can pass while the thing it checks is broken; fix before merging
- 🟠 wrong behavior in a narrower case; fix in this PR
- 🟢 minor or already decided/tracked; no change needed now
Summary: 1 🔴, 2 🟠, 5 🟢.
DmitriyG1
commented
Nov 17, 2026
DmitriyG1
commented
Nov 17, 2026
DmitriyG1
commented
Nov 17, 2026
DmitriyG1
commented
Nov 17, 2026
DmitriyG1
commented
Nov 17, 2026
DmitriyG1
commented
Nov 17, 2026
Python 3.13+ reports a trailing comma on its own line, older versions on the next one, so the test failed on Python 3.12 in CI. It now breaks the JSON with a missing comma, which every version reports at the same place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The init script test looked for gradlew at the root of the Gradle build that holds the skill. In this repository there is none, so the test stopped with "cannot find the project root". It now takes $GRADLE, then gradle on PATH, then that gradlew, and fails instead of skipping when RUN_GRADLE_TESTS=1 is set and no Gradle is found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four jobs on every pull request to main: the unit tests, claude plugin validate (fails on what the plugin directory refuses, not on warnings), commitlint on every commit with the rules of AGENTS.md plus a check for merge and unsquashed fixup commits, and the Gradle test when the init script changes. Actions are pinned to commit SHAs, packages to exact versions, and the token can only read contents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python 3.9 is the python3 of macOS (Command Line Tools), and the tests pass on it. State it in both READMEs and in AGENTS.md, so code does not start to need a newer Python by accident; CI tests 3.9 and the newest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code and commitlint were installed by version, but their own dependencies were ranges (commitlint asks for ^21.2.3 and so on), so a new or compromised dependency release reached CI without review. Each tool now has a package.json and package-lock.json under .github/tools/, installed with npm ci; setup-node caches the downloads. Two folders, so the commit message job does not download Claude Code (about 300 MB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DmitriyG1
force-pushed
the
ci/add-checks
branch
from
November 17, 2026 17:10
482320c to
3ee7a0e
Compare
DmitriyG1
marked this pull request as ready for review
November 17, 2026 17:17
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.
What changed
Six commits:
fix(scripts): make the broken json test pass on every python— the test onmainfails on Python 3.12 and older: a trailing comma is reported on line 2 by Python 3.13+ and on line 3 by older ones. The test now uses a missing comma, which every version reports the same way. First, so every later commit passes the tests on Python 3.9.fix(scripts): run the gradle test outside a gradle build— the test looked forgradlewat the root of the Gradle build that holds the skill. There is none in this repository, so withRUN_GRADLE_TESTS=1it stopped with "cannot find the project root". It now takes$GRADLE(a path, made absolute, or a command name onPATH), then thegradlewof the Gradle build that holds the skill, thengradleonPATH, and fails instead of skipping when no Gradle is found. Test-only, so no release.ci(ci): add pull request checks—.github/workflows/ci.ymland.github/commitlint.config.mjs, four jobs on every pull request tomain:unittest discoveron Python 3.9 (the oldest supported, thepython3of macOS) and on the newest stable Python (3.x), in one job so the check keeps its name.claude plugin validate . --profile directory(Claude Code 2.1.317, no API key). Fails on ✘ problems, including what the plugin directory refuses; warnings (⚠CLAUDE.mdat the root, no icon) pass..github/commitlint.config.mjs(types and scopes from AGENTS.md, scope required, header ≤ 72, lowercase summary, no trailing period); then merge commits and unsquashedfixup!/squash!/amend!commits fail, reported even when commitlint failed.RUN_GRADLE_TESTS=1only when a file the Gradle test depends on changes:audit-facts.init.gradle,facts.py,common.py,tests/test_facts.py,tests/fixtures.pyor the workflow itself.permissions: contents: readandpersist-credentials: false.docs(repo): describe the ci checks in agents.md—.github/in the layout, Python 3.9 + newest in Scripts, Gradle onPATHor inGRADLEin Tests, the four checks under Pull requests.docs(docs): require python 3.9 or later— both READMEs, Requirements.ci(ci): pin the npm tools with lock files and cache them—.github/tools/claude-code/and.github/tools/commitlint/, each withpackage.jsonandpackage-lock.json(every dependency pinned, with integrity hashes), installed withnpm ci;setup-nodecaches the downloads for later runs of the same PR. Two folders, so Commit messages does not download Claude Code (about 300 MB).Why
PRs are rebase-merged, so every commit reaches
mainand has to be checked one by one. The rulesetmainnow requires the four job names as status checks (added after this PR's first run; nothing else in the ruleset changed).How it was tested
RUN_GRADLE_TESTS=1and Gradle 9.7.1: 87 run, 0 skipped, also with a relativeGRADLE=./gradle. With no Gradle: fails with "no Gradle"; with aGRADLEthat does not exist: fails withGRADLE=<value>: no such file or command.claude plugin validate . --profile directory(2.1.317), run locally with an empty HOME and no credentials: exit 0 with 2 warnings. On a copy withoutREADME.md: exit 1 (without--profile directoryit was exit 0).mainand on this branch pass. Wrong type, missing or unknown scope, capitalized summary, trailing period, header over 72,fixup!and merge messages all fail.Review history
The review fixes were made as
fixup!commits and folded into the commits above before merging. The branch as it was before folding is kept asarchive/pr-2-review(482320c):fixup!commit separately, linked from its review thread ("fixed ").TODO (not in this PR)
python3of macOS), stated in both READMEs andAGENTS.md; Tests runs on 3.9 and the newest Python.ci.ymlare pinned to commit SHAs (with the tag in a comment), so they never update by themselves. Add.github/dependabot.ymlwith thegithub-actionsecosystem (e.g. monthly): it opens PRs that bump the SHA and the comment together. Its commit messages must pass theCommit messagescheck (commit-message: prefix: "ci",include: scopegivesci(deps), so add a scope it can use, e.g.ci(ci), or allowdepsin.github/commitlint.config.mjsandAGENTS.md). Also add thenpmecosystem fordirectories: ["/.github/tools/claude-code", "/.github/tools/commitlint"], so the npm tools and their lock files are bumped too.🤖 Generated with Claude Code