Fix CI: gate exercises, fix pattern self-match, drop paid gitleaks#7
Merged
Conversation
… 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
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>
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.
Summary
cargo test --workspace --exclude ch01-exercisesin CI sotodo!()stubs don't fail the pipeline. Students runcargo test -p ch01-exerciseslocally. Clippy and fmt still lint exercises.gitleaks/gitleaks-action@v2requires 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-exercisespasses locally (7/7 chapter tests)cargo clippy --workspace --all-targets -- -D warningsstill covers exercises (zero warnings)cargo fmt --all -- --checkpasses🤖 Generated with Claude Code