Skip to content

feat(c1): GitHub Action + pre-commit hook — doctor gate for consumer repos - #23

Merged
SollanSystems merged 4 commits into
mainfrom
feat/c1-ci-action
Jul 4, 2026
Merged

SollanSystems merged 4 commits into
mainfrom
feat/c1-ci-action

Conversation

@SollanSystems

Copy link
Copy Markdown
Owner

PR4 (C1) of the adoption-slices plan (docs/superpowers/plans/2026-07-03-adoption-slices.md).

What

  • action.yml (composite, repo root) — pip-installs loop-engineer from github.action_path by default (source mode: CI gates the working tree) or from PyPI via a version input; runs loop doctor as a hard gate; renders a loop inspect scorecard to $GITHUB_STEP_SUMMARY with a fail-under-score threshold; optional PR comment via github-token. All user inputs reach bash via env-indirection (env: + quoted "$VAR"), not raw ${{ }} interpolation — no script-injection surface for downstream consumers.
  • .pre-commit-hooks.yaml — hook id loop-doctor (language: python, always_run), so consumers gate commits on their own contract.
  • Dogfood — new action-dogfood CI job gates this repo's own contract (fail-under-score: 90; current inspect score 100/strong, so the gate is non-vacuous and fails loudly on any broken-action path) + a live pre-commit try-repo consumer fixture.
  • Consumer fixture tests (env-guarded skip when pre-commit absent) + C1 CHANGELOG entry.

Review trail

Per-task reviews: both Approved. Whole-branch review: Ready to merge — Yes (verified the inspect JSON ↔ scorecard contract, wheel force-include completeness for bare action checkouts, and every fail-loudly branch); its input-injection hardening landed as 2aa7bd9, re-review approved.

Tests

Canonical suite: 246 passed / 9 skipped (baseline 244/8 at branch; +2 tests, +1 env-guarded skip). This PR's CI run is the first hosted-runner proof of the action's install path — the action-dogfood job is the acceptance gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01As92NaD7jMDbnQTqXDzBVa

SollanSystems and others added 3 commits July 4, 2026 15:53
…ard, dogfooded in CI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ships `.pre-commit-hooks.yaml` (hook id loop-doctor -> `loop doctor .`, a
language:python hook usable from any consumer .pre-commit-config.yaml on PR1's
self-contained wheel) plus `scripts/test_precommit_hook.py`, which asserts the
hook definition is sound and the entry matches a declared console script, and an
env-guarded consumer fixture that runs the hook through `pre-commit try-repo`
end-to-end. The action-dogfood CI job installs pre-commit and runs that fixture
for real on the PR checkout. CHANGELOG gains the C1 entry covering both the
composite action and the pre-commit gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Env-indirect inputs.version/path/fail-under-score in action.yml's run:
steps (install, doctor, inspect+scorecard heredoc argv) to close the
GitHub Actions script-injection footgun for a published reusable action.
Behavior unchanged for legitimate inputs (verified via a real inspect.json
run through both pass/fail branches). Also documents in ci.yml why bare
`python` is on PATH in the dogfood job's pre-commit fixture step (the
preceding `uses: ./` composite step ran setup-python).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01As92NaD7jMDbnQTqXDzBVa
Copilot AI review requested due to automatic review settings July 4, 2026 20:16
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…gitignored, absent in CI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01As92NaD7jMDbnQTqXDzBVa
@SollanSystems
SollanSystems merged commit 3171bb2 into main Jul 4, 2026
6 checks passed
@SollanSystems
SollanSystems deleted the feat/c1-ci-action branch July 8, 2026 14:12
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