Skip to content

Add deterministic PR quality checks - #4

Merged
AnkitTheCoder merged 1 commit into
mainfrom
codex/pr-quality-checks
Oct 27, 2026
Merged

AnkitTheCoder merged 1 commit into
mainfrom
codex/pr-quality-checks

Conversation

@AnkitTheCoder

@AnkitTheCoder AnkitTheCoder commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Plugin packaging and skill-contract mistakes were only caught by local checks. This adds one fast, deterministic pull-request gate that uses no model access or model credentials.

What changed

Pull request
    |
    +--> validator unit tests
    +--> repository-owned quality validator
    +--> patch whitespace check
    +--> pinned plugin packaging validator
  • Adds scripts/validate_repository.py, which contributors and CI run through the same interface.
  • Validates JSON, synchronized manifests, semantic version increases, Agent Skills metadata, native skill references, relative Markdown links, and accidental workstation paths.
  • Adds seven focused unit tests for the validator.
  • Adds a read-only GitHub Actions workflow with disabled credential persistence, cancellation of superseded runs, and a ten-minute limit.
  • Pins the packaging validator to Claude Code 2.1.220.
  • Documents the local commands in the contributor guidance.

Behavioral evaluations remain outside this workflow. The job does not call a model.

Verification

Submitted revision: 602e5f4

  • The new PR quality / Validate plugin repository job passed on the submitted revision in 11 seconds.
  • 7 validator unit tests passed.
  • Repository validation passed for all 12 skills.
  • Workflow YAML parsed successfully.
  • git diff --check passed.
  • Plugin validation passed with the existing informational warnings about author metadata and root CLAUDE.md loading behavior.

Acceptance

  • R-001 supported: every pull request receives one deterministic quality job.
  • R-002 supported: CI and contributors use the same repository-owned validator.
  • Model-based behavioral evaluations remain outside CI as requested.
How to reproduce locally

From the repository root:

python3 -m unittest discover -s tests
python3 scripts/validate_repository.py --base-ref origin/main
claude plugin validate .
git diff --check origin/main...HEAD

The repository validator uses only the Python standard library. Plugin validation requires Claude Code on PATH but does not require a model session.

Add a read-only pull-request workflow backed by a repository-owned validator and focused unit tests. Check manifests, skill metadata, relative links, native skill references, version increases, workstation paths, patch whitespace, and plugin packaging without model access.

Verification: 7 validator tests passed; repository validation passed for all 12 skills; workflow YAML parsed; git diff checks passed; Claude Code 2.1.220 plugin validation passed with the existing author and root CLAUDE.md warnings. The GitHub workflow itself has not run yet.
@AnkitTheCoder
AnkitTheCoder marked this pull request as ready for review October 27, 2026 02:05
@AnkitTheCoder
AnkitTheCoder merged commit d9d74f2 into main Oct 27, 2026
1 check passed
@AnkitTheCoder
AnkitTheCoder deleted the codex/pr-quality-checks branch October 27, 2026 02:05
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.

1 participant