Repository navigation
ci: gate PRs on scripts/quality.sh - #8
Merged
Merged
Conversation
The kit ships a pre-commit hook, a quality script, and a 56-case test suite for its own hooks — and none of it ran on a pull request. A gate that only fires on the machine of whoever happens to be committing is a convention, not a gate. CI calls scripts/quality.sh rather than re-listing the checks, so there is one definition of "quality" shared by the hook, a local run, and the runner. A check that exists only in CI is a check that surprises you on a PR. Pinned to PHP 8.2 because that is what the plugin template's header declares. Same reasoning playground-verifier applies when it boots at the declared minimum instead of at latest: gate on the version you claim to support, not on whatever the runner happens to ship. No composer.lock is committed, so the install resolves fresh. That is deliberate — it catches an upstream release breaking the scaffold before a user hits it on `composer install` after `npm create wp-ai-plugin`. Verified by simulating the run locally: `git archive HEAD` into a clean tree with no vendor/, then composer install + quality.sh. Green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Replaces #5, which GitHub auto-closed when its base branch (
fix/hook-portability, now merged) was deleted. Same commit, retargeted atmain. Content and reasoning unchanged.Why
The kit ships a pre-commit hook, a quality script, and a test suite for its own hooks — and none of it ran on a pull request.
scripts/quality.sheven claims CI as a caller in its header comment:There was no GitHub Actions. A gate that only fires on the machine of whoever happens to be committing is a convention, not a gate — and the difference between those two things is this repo's entire pitch.
This is not hypothetical: on its very first run this workflow found that all three planning hooks had never worked on Linux (fixed in #6, now on
main).What
One workflow, on
push: mainand everypull_request. It calls./scripts/quality.shrather than re-listing the checks, so there is a single definition of "quality" shared by the hook, a local run, and the runner. A check that exists only in CI is a check that surprises you on a PR.composer.lockis committed, so the install resolves fresh. Deliberate: it catches an upstream release breaking the scaffold before a user hits it afternpm create wp-ai-plugin. The tradeoff is non-hermetic builds.permissions; concurrency cancels superseded runs.What this deliberately cannot do
Boot WordPress.
playground-verifier(#3) is the runtime gate and needs an agent harness plus the wp-playground MCP server, neither of which exists in a runner. The workflow says so in a comment, because the failure mode is someone seeing green and assuming the plugin runs. v1.0.2 shipped a scaffold that fataled on activation through checks exactly this green.Verification
Simulated the runner locally rather than pushing and hoping:
git archive HEADinto a clean tree with novendor/, thencomposer install, then./scripts/quality.sh. Green. The identical commit also passed as #5 before its base branch was deleted.🤖 Generated with Claude Code