Skip to content

Fix CI: gate exercises, fix pattern self-match, drop paid gitleaks#7

Merged
hartsock merged 1 commit into
mainfrom
fix/gate-exercise-tests
Apr 13, 2026
Merged

Fix CI: gate exercises, fix pattern self-match, drop paid gitleaks#7
hartsock merged 1 commit into
mainfrom
fix/gate-exercise-tests

Conversation

@hartsock

Copy link
Copy Markdown
Member

Summary

  • Exercise tests gated: cargo test --workspace --exclude ch01-exercises in CI so todo!() stubs don't fail the pipeline. Students run cargo test -p ch01-exercises locally. Clippy and fmt still lint exercises.
  • Forbidden-pattern self-match fixed: CLAUDE.md and .pre-commit-config.yaml excluded from the grep scan (they document the patterns, not violate them).
  • gitleaks action replaced: gitleaks/gitleaks-action@v2 requires a paid license. Switched to installing the open-source CLI directly.

Fixes all 3 failures from run #24315610528.

Test plan

  • cargo test --workspace --exclude ch01-exercises passes locally (7/7 chapter tests)
  • cargo clippy --workspace --all-targets -- -D warnings still covers exercises (zero warnings)
  • cargo fmt --all -- --check passes
  • CI run on this PR should go green

🤖 Generated with Claude Code

… gitleaks paid action

Three safety-gate failures fixed:

1. Exercise tests (todo!() stubs) excluded from CI via --exclude ch01-exercises.
   Students run exercises locally; CI only validates chapter examples pass.

2. Forbidden-pattern scanner was matching CLAUDE.md and .pre-commit-config.yaml
   which legitimately list the patterns as documentation. Both files now excluded
   from the grep pipeline (matching safety-gate.yml's existing self-exclusion).

3. gitleaks/gitleaks-action@v2 now requires a paid license. Replaced with direct
   gitleaks CLI install (open-source, no license key needed).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hartsock
hartsock merged commit c23e8d9 into main Apr 13, 2026
3 checks passed
@hartsock
hartsock deleted the fix/gate-exercise-tests branch April 13, 2026 23:51
hartsock added a commit that referenced this pull request Jun 5, 2026
…onflict)

WHAT: merge origin/main (ch02 via PR #1 + CI exercise-gating via PR #7)
into this branch; conflict was only in [workspace] members — kept the
ch03/ch04 entries this branch adds.
WHY: PR #8 was CONFLICTING; this makes it mergeable. Verified locally
with CI-parity checks: tests (excl. exercise crates), clippy -D warnings,
fmt --check — all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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