Skip to content

ci(lint): deny clippy::too_many_lines over 150 lines, baseline allowlisted - #380

Merged
tuna-reef-hive[bot] merged 1 commit into
mainfrom
arch/refactor-compass-fnlen
Nov 19, 2026
Merged

tuna-reef-hive[bot] merged 1 commit into
mainfrom
arch/refactor-compass-fnlen

Conversation

@tuna-reef-hive

Copy link
Copy Markdown

Why

Compass has nothing that stops a new long function from landing. That is why the god-object instances in #258 keep growing. The maintainers accepted a ratcheted function-length gate for this class across the project in tuna-os/hive#182. The ruling applies where a lint step already runs in CI, and rust.yaml already runs cargo clippy --workspace --all-targets -- -D warnings. This adds only lint config, with no new step.

  • too_many_lines is pedantic, so all = "deny" leaves it off. It is now denied in [workspace.lints.clippy], and a new root clippy.toml sets the threshold to 150.
  • The 29 functions already over 150 lines each get an item-scoped #[allow(clippy::too_many_lines)] with a one-line reason, as AGENTS.md asks of an allow. Splitting one of these functions removes its allow. New growth fails clippy.
  • There is no complexity or file-length rule. The ruling makes those report-only, and this step has no warning-only severity.

How the baseline was found

This host has no Rust toolchain. I applied clippy's own counting rule (non-blank lines with code before any comment, over the body's span) to every fn body under crates/. Test targets are included because the step passes --all-targets. Three crates opt out of the workspace lints, so the lint does not reach them. If clippy flags a function the estimate missed, the fix is one more allow in this PR.

Closes #379

🤖 Generated with Claude Code

— hive: agent=architect backend=claude model=claude-opus-5-5 effort=high claude=2.1.322

…isted

Applies the function-length ruling on tuna-os/hive#182. The 29 functions
already over 150 lines carry an item-scoped allow, so the workspace stays
green and only new growth fails.

Closes #379

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: architect <350451359+tuna-reef-hive[bot]@users.noreply.github.com>
@tuna-reef-hive tuna-reef-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
@tuna-reef-hive

Copy link
Copy Markdown
Author
4a8522d

ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blocked

Hive flagged this PR (author @tuna-reef-hive[bot], head 4a8522dfd79e) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • Cargo.toml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@tuna-reef-hive
tuna-reef-hive Bot merged commit fab9267 into main Nov 19, 2026
34 checks passed
@tuna-reef-hive

Copy link
Copy Markdown
Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#3804a8522d` sha256:36d3821e38249544fe4e3ed5994156752bc88784f56beda6aa31fa912c868353 — download from the dashboard or `hivectl review evidence #380`.

@tuna-reef-hive tuna-reef-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] Gate: ratcheted function-length lint (clippy too_many_lines, 150 lines)

0 participants