fix(cli): remove duplicate Evidence import that broke the workspace build - #78
Conversation
…uild `crates/squabble-cli/src/fight.rs` has imported `Evidence` twice since 327fb24 ("Apply rustfmt across Rust sources", #73, merged 2026-09-09), which re-added a `use squabble_core::polarity::{Applicability, Evidence, RepoDeclaration};` line alongside the existing single-name import on the line above it. error[E0252]: the name `Evidence` is defined multiple times --> crates/squabble-cli/src/fight.rs:18:46 The workspace has not compiled on main for five days. rustc reports all three names on the removed line as unused, and `Applicability` and `RepoDeclaration` appear nowhere else in the file, so the whole line goes rather than just the duplicated name -- leaving an `unused_imports` warning would break `clippy -D warnings`. CI did not catch this: `Rust CI` reported `conclusion: failure` on the breaking commit itself (run 2026-09-09T16:00:56Z), but from 2026-09-10T22:06 onward every run on this repo is a startup failure with `jobs.total_count == 0`, so the gate stopped reporting at all. That is a separate, repo-level Actions allow-list problem and is not addressed here. Verified on this change: cargo check --workspace --all-features -> clean cargo test --workspace --all-features -> 128 passed, 0 failed cargo clippy --workspace --all-features --all-targets -- -D warnings -> clean Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB
|
Warning Review limit reachedNext included review available in 47 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details
|
| Layer / File(s) | Summary |
|---|---|
Remove unused polarity imports crates/squabble-cli/src/fight.rs |
The module removes unused Applicability and RepoDeclaration imports. It retains Evidence and reorders the Outcome import. |
Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Bug fix
Suggested reviewers: claude
Merge Risk: ⚪ Minimal · up to 1cdad
No current-head merge-blocking risk is identified.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly identifies the main change: removing the duplicate Evidence import that broke the workspace build. |
| Description check | ✅ Passed | The description clearly explains the build failure, the import change, the separate CI issue, and local verification results. It does not use the template headings or include the checklist, but it pro… |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1… |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🛠️ Fix failing CI checks
❌ Error running CI fixer.
- Create stacked PR
- Commit on current branch
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.
Comment @coderabbitai help to get the list of available commands.
Removing the duplicate `polarity::{Applicability, Evidence, RepoDeclaration}`
line left `polarity::Evidence` sitting above `outcome::Outcome`, which rustfmt
sorts the other way. Swapping them makes fight.rs fmt-clean.
`cargo fmt --all --check` still exits 1 on this branch AND on origin/main, for
an unrelated diff at crates/squabble-core/src/polarity.rs:183. That predates
this branch and is deliberately left alone here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB
…er (#79) ## What is wrong `parse_signatures` splits the directive on the bare literal: ```rust for chunk in raw.split(SIGNATURE_TABLE).skip(1) { ``` `SIGNATURE_TABLE` is `[[gate-triage.detection.signatures]]`. The split matches that text **anywhere** — in prose, and inside a `#` comment. The directive this parser reads documents its own table name in a comment: `.machine_readable/bot_directives/gate_triage.a2ml:174`, inside the `[gate-triage.detection]` section that opens at line 171 — well above the three real headers at 258 / 265 / 272. ## Two failures, both now covered by tests that are RED against the old parser Grafting the two new tests onto the current parser, unchanged: ``` test gate_triage::tests::a_prose_mention_of_the_table_name_does_not_open_a_scanner ... FAILED left: 2 right: 1 test gate_triage::tests::a_commented_out_header_neither_opens_nor_closes_a_table ... FAILED left: 0 right: 1 test result: FAILED. 43 passed; 2 failed ``` 1. **A prose or commented mention opens a phantom scanner** — `left: 2, right: 1`. 2. **A commented-out header deletes a real scanner** — `left: 0, right: 1`. This is the serious one. The stray match *closes* the live table above it and opens a body which the section-header scan then discards, so **both halves are dropped** and the scanner vanishes. It does not add noise; it silently removes enforcement. ## The fix Line-oriented. `signature_bodies` walks `split_inclusive('\n')`, strips each line's trailing comment via `code_of`, and treats a line as a header only when the **code** part is exactly the table name. A comment can then neither open nor close a table. `until_next_header` is retained — `section_of` still calls it, so removing it would trip `unused_imports`/dead-code under `-D warnings`. Two pre-existing `assert_eq!` calls in this file are reflowed by `rustfmt`; that is the only churn outside the new code. ### Not fixed here, but adjacent `extract_array` in `crates/squabble-fight/src/context.rs:152` has the same comment-blindness: once `collecting`, it pushes quoted strings from every subsequent line, comments included, until `]`. Out of scope for this PR; worth a follow-up. ## Verification ``` cargo test --workspace --all-features 130 passed, 0 failed cargo clippy --workspace --all-features --all-targets -- -D warnings rc=0 cargo fmt --all --check gate_triage.rs clean ``` `cargo fmt --all --check` still exits 1 for three diffs in `crates/squabble-core/src/polarity.rs` — those are **pre-existing on `main`**, unrelated to this change, and deliberately untouched. ## Two things a reviewer should know - **Stacked on #78.** `main` does not compile (duplicate `Evidence` import), so this branch is based on the build repair. Base retargets to `main` automatically when #78 merges. - **CI will not produce a green Rust check.** The `Rust CI` workflow in this repo is startup-dead — runs are created with `jobs.total_count == 0` and emit no check run at all, so the required context never reports. The evidence above is local. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
|
ℹ️ Nothing to fix from this PR. All 2 failing check(s) are already failing on ⏭️ 2 check(s) skipped — already failing on `main` (not caused by this PR)
These need to be addressed on |
Rate Limit Exceeded
|



main has not compiled for five days
crates/squabble-cli/src/fight.rsimportsEvidencetwice:Line 18 was re-added by 327fb24 ("Apply rustfmt across Rust sources", #73, merged
2026-09-09 17:00 +0100). Every commit on
mainsince then fails to build.Why the whole line goes, not just the duplicate name
rustc reports all three names on that line as unused, and
ApplicabilityandRepoDeclarationappear nowhere else in the file. Removing only the duplicatedEvidencewould leave anunused_importswarning, which failsclippy -D warnings.Why CI did not stop this
Worth recording, because the obvious reading is wrong.
Rust CIdid reportconclusion: failureon the breaking commit itself — run at 2026-09-09T16:00:56Z onmain. The gate was working and the failure was visible; it simply was not acted on.From 2026-09-10T22:06 onward, every
Rust CIrun on this repo is a startup failurewith
jobs.total_count == 0— the run exists, no job is created, no check run isemitted, and so the gate stops reporting entirely. An unrepaired repo therefore looks
greener than a working one.
That is a repo-level GitHub Actions allow-list problem
(
allowed_actions: "selected"with an emptypatterns_allowed, which refuses thethird-party actions reached transitively through
standards/rust-ci-reusable.yml), itis not a problem with any file in this repository, and it is not addressed by
this PR. It needs a settings change, which is the owner's call.
Verification
All three run on this branch, unfiltered:
cargo check --workspace --all-featurescargo test --workspace --all-featurescargo clippy --workspace --all-features --all-targets -- -D warningsConfirmed red before the change (E0252) and green after — one line deleted, nothing else
touched.
🤖 Generated with Claude Code
https://claude.ai/code/session_0178nN4Nm3neFRy5K9StZKnB