Commit 0f9cd87
ci(rust): add build/test/clippy gate; make crates clippy-clean (#300)
Items #2 (clippy sweep) and #1 (close the CI gap) from the follow-up
list, as one PR — the lint fixes and the gate that enforces them belong
together so CI is self-consistent.
## Why
The only Rust CI was CodeQL in build-mode `none` (**buildless**) —
nothing compiled or tested `robot-repo-automaton` / `shared-context` /
`dashboard`. That's exactly how the non-compiling content-match path
reached `main` before #299 fixed it. This closes that gap.
## The gate — `.github/workflows/rust.yml`
Per-crate matrix (modeled on `e2e.yml`: SHA-pinned checkout,
`permissions: contents: read`, SPDX header):
- `cargo build --all-targets`
- `cargo test`
- `cargo clippy --all-targets -- -D warnings` *(blocking)*
- `cargo fmt --check` *(informational, `continue-on-error`)* — there's
~180 hunks of **pre-existing** formatting drift; gating it would mean a
giant reformat that buries this change, so it's surfaced but not yet
enforced. A dedicated `cargo fmt` pass can flip it to blocking later.
## Clippy fixes (to make the gate green)
| File | Finding | Fix |
|---|---|---|
| `fixer.rs` | `.replace("hyperpolymath", "hyperpolymath")` | no-op —
removed |
| `registry_guard.rs` | manual `splitn(2, '/')` | `split_once('/')` |
| `exclusion_registry.rs` | `from_str` shadows `FromStr` | rename
inherent `from_str` → `parse` (matches `Catalog::parse`; 2 internal call
sites) |
| `exclusion_registry.rs` | `.ok()` + `if let Some` | `if let Ok(..)` |
| `hypatia.rs`, `main.rs` | `&PathBuf` arg | `&Path` |
| `Cargo.toml` ×2 | `toml = "1.1.2+spec-1.1.0"` | drop ignored `+spec`
build-metadata (resolution-neutral; silences cargo warning) |
| `benches/fleet_benchmarks.rs` | deprecated `criterion::black_box` |
import `std::hint::black_box` (one import swap covers all call sites) |
## Verification
All three crates: **clippy `-D warnings` clean**, build clean. Tests:
**101** (robot-repo-automaton) + **84** (shared-context) pass. Locally
simulated the full matrix (build + test + clippy) green per crate;
`rust.yml` parses as valid YAML.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01RozeeLxpJsd3WWFngaZWz3
---
_Generated by [Claude
Code](https://claude.ai/code/session_01RozeeLxpJsd3WWFngaZWz3)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent e6f9b26 commit 0f9cd87
9 files changed
Lines changed: 59 additions & 14 deletions
File tree
- .github/workflows
- robot-repo-automaton
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
622 | 621 | | |
623 | 622 | | |
624 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 155 | + | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments