fix(lint): the last two errors between the native lane and green #370

Merged
toasterson merged 1 commit from claude/fix-clippy-native-ci-green into main 2026-07-25 19:22:04 +00:00
Owner

Context

With #369 merged, the native rust lane produced its first honest verdict since 2026-07-11. It is no longer failing on protoc. It fails on lint.

The good news from that run (fd7237f6): cargo test passed — 144 tests, 0 failures. That was the last unproven step of the rust lane, and it is now proven end to end: VM boot → https clone → CARGO_HOME redirect → toolchain → dep resolution → build → test → fmt → clippy.

The two errors

Only one was visible. Clippy aborts the workspace at the first crate that fails, so while anima-db was broken anima-server was never linted at all. Fixing #1 alone would have produced another red run.

# Crate Lint Site
1 anima-db too_many_arguments (8/7) ThreadRepo::insert_message
2 anima-server result_large_err (176 B) check_status_phase_pair

Both are the existing convention in this codebase, not new suppression:

  • Ten sibling repo insert helpers in anima-db already carry #[allow(clippy::too_many_arguments)] (workitem.rs, plan.rs, project.rs, document.rs, session.rs, companion.rs, …). insert_message was simply missing it.
  • Ten functions across anima-server/src/services/ already carry #[allow(clippy::result_large_err)], and mailbox.rs applies it crate-file-wide. tonic::Status is 176 bytes and every gRPC handler returns it; boxing it is not an option tonic offers. check_status_phase_pair is the new ADR 0024 guard and missed the convention.

Verified locally: cargo clippy --workspace --exclude anima-desktop -- -D warnings is clean.

One thing deliberately not fixed

cargo fmt --check reports a diff at thread.rs:569 on clean main — I confirmed it by stashing. It is a rustfmt version difference: 1.97 wants to wrap that call, 1.96 does not.

The workspace pins no rust-toolchain.toml, so a -D warnings gate floats with whatever rustc the CI image happens to ship. Reformatting to satisfy one version breaks the other, and CI can go red from an image rebuild with no code change at all. That deserves a pin, not a reformat — filed separately rather than smuggled in here.

Verification status

Same caveat as #369: this cannot be proven by the Actions lane on this PR, which was already passing. It is proven by the first native rust job after merge.

🤖 Generated with Claude Code

## Context With #369 merged, the native `rust` lane produced its **first honest verdict since 2026-07-11**. It is no longer failing on protoc. It fails on lint. The good news from that run (`fd7237f6`): **`cargo test` passed — 144 tests, 0 failures.** That was the last unproven step of the rust lane, and it is now proven end to end: VM boot → https clone → CARGO_HOME redirect → toolchain → dep resolution → build → test → fmt → clippy. ## The two errors **Only one was visible.** Clippy aborts the workspace at the first crate that fails, so while `anima-db` was broken `anima-server` was never linted at all. Fixing #1 alone would have produced another red run. | # | Crate | Lint | Site | |---|---|---|---| | 1 | `anima-db` | `too_many_arguments` (8/7) | `ThreadRepo::insert_message` | | 2 | `anima-server` | `result_large_err` (176 B) | `check_status_phase_pair` | Both are **the existing convention in this codebase, not new suppression**: - Ten sibling repo insert helpers in `anima-db` already carry `#[allow(clippy::too_many_arguments)]` (`workitem.rs`, `plan.rs`, `project.rs`, `document.rs`, `session.rs`, `companion.rs`, …). `insert_message` was simply missing it. - Ten functions across `anima-server/src/services/` already carry `#[allow(clippy::result_large_err)]`, and `mailbox.rs` applies it crate-file-wide. `tonic::Status` is 176 bytes and every gRPC handler returns it; boxing it is not an option tonic offers. `check_status_phase_pair` is the new ADR 0024 guard and missed the convention. Verified locally: `cargo clippy --workspace --exclude anima-desktop -- -D warnings` is clean. ## One thing deliberately not fixed `cargo fmt --check` reports a diff at `thread.rs:569` **on clean `main`** — I confirmed it by stashing. It is a rustfmt version difference: 1.97 wants to wrap that call, 1.96 does not. The workspace pins **no `rust-toolchain.toml`**, so a `-D warnings` gate floats with whatever rustc the CI image happens to ship. Reformatting to satisfy one version breaks the other, and CI can go red from an image rebuild with no code change at all. That deserves a pin, not a reformat — filed separately rather than smuggled in here. ## Verification status Same caveat as #369: this cannot be proven by the Actions lane on this PR, which was already passing. It is proven by the first **native** `rust` job after merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(lint): add the two missing clippy allows blocking native CI
All checks were successful
CI / conflict-check (push) Successful in 52s
CI / docker (push) Successful in 10m44s
dd1e2af4f3
With the protoc fix in (#369), the native `rust` lane got far enough to
produce its first honest verdict since 2026-07-11 — and failed on lint,
not on code. `cargo test` passed: 144 tests, 0 failures.

Two errors, and the second was invisible until the first was fixed:
clippy aborts the whole workspace at the first crate that fails, so
`anima-server` was never linted while `anima-db` was broken.

1. `anima-db` `ThreadRepo::insert_message` — too many arguments (8/7).
   Ten sibling repo insert helpers in this crate already carry
   `#[allow(clippy::too_many_arguments)]`; this one was simply missing it.

2. `anima-server` `check_status_phase_pair` — large `Err` variant.
   `tonic::Status` is 176 bytes and every gRPC handler returns it; ten
   other functions in `services/` already carry
   `#[allow(clippy::result_large_err)]`. This ADR 0024 guard is new and
   missed the convention.

Both are the established pattern in this codebase, not new suppression.

Not fixed here, deliberately: `cargo fmt --check` reports a diff at
thread.rs:569 on clean `main` under rustfmt 1.97 that 1.96 does not
produce. The workspace pins no toolchain, so a `-D warnings` gate floats
with whatever rustc the CI image ships — reformatting to satisfy one
version would just break the other. Filed separately.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
toasterson deleted branch claude/fix-clippy-native-ci-green 2026-07-25 19:22:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/Anima!370
No description provided.