sigker: fix both clippy findings and arm the lint in CI - #1172
Merged
Conversation
Closes TD-SIGKER-CLIPPY-RED-ON-BASE-1. sigker now passes `cargo clippy --manifest-path crates/sigker/Cargo.toml --all-targets -D warnings`. TWO findings, not the one the tech-debt entry claimed: 1. signature.rs — `segment_signature`'s level-fill loop used its loop variable only to index `level` (needs_range_loop). Rewritten as `level.iter_mut().enumerate()`; behaviour-identical, same traversal, same arithmetic. 2. examples/depth_scaling.rs — `doc list item overindented` on a wrapped list continuation. THIS WAS INVISIBLE until (1) was fixed: `-D warnings` makes clippy abort at the first error, so the entry's "single site" claim was a lower bound read off a run that never got past the first failure, not a total. Recorded in the entry rather than quietly corrected. Also armed the lint in CI. The sigker step added earlier was deliberately tests-only because the crate was red on arrival; with both findings fixed that reason is gone, and a lint fix with no gate decays straight back — this crate was unlinted precisely because no CI step reached it (workspace-excluded, so root clippy never sees it). Tests + clippy now both run. The tech-debt entry needed re-anchoring, for a reason worth stating: it cited `signature.rs:133` anchored on `for flat in 0..len`, and DELETING that line is the fix — so applying it made the entry's own citation decay, and citation_decay.py fired on it. An entry that cites the code it wants removed is self-invalidating by construction. Re-anchored on the enclosing function name, `segment_signature`, which survives its own body being rewritten. That is the property a citation into mutable source actually needs, and it is the second time this session the gate has corrected a citation of mine. While rewriting the overindented line, also qualified its "7-13x smaller" claim as asymptotic (N>=8, ~2x at shallow depth) with a pointer to the crate's own falsifier test — the same misquote E-A-SKETCH-THAT-MISSED-TWICE-WILL-MISS- A-THIRD-TIME-1 flagged in the consumer contract, propagated here too. Verified locally, all gates green against origin/main: - cargo clippy --all-targets -D warnings: 0 errors - cargo test: 62 passed, 0 failed - cargo fmt --check: clean - citation_decay.py --since origin/main: 0 new decays (148 backlog unchanged) - append_only_gate.py origin/main: no protected file shrank, 9 checked - supersession_index.py: current, byte-identical - plan_dids.py: no added plans Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_2ba1d64b-2728-4bc9-92b4-1575c50f5922) |
AdaWorldAPI
marked this pull request as ready for review
September 4, 2026 04:29
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
Closes
TD-SIGKER-CLIPPY-RED-ON-BASE-1. sigker now passescargo clippy --manifest-path crates/sigker/Cargo.toml --all-targets -- -D warnings, and the lint is gated in CI so it stays that way.Two findings, not the one the tech-debt entry claimed
signature.rs—segment_signature's level-fill loopneeds_range_loopexamples/depth_scaling.rs— wrapped doc list continuationdoc list item overindentedFinding 2 was invisible until finding 1 was fixed.
-D warningsmakes clippy abort at the first error, so the entry's "single site" was a lower bound read off a run that never got past the first failure — not a total. That's recorded in the entry rather than quietly corrected, because the general lesson is worth keeping: a findings count from an aborted run is a floor.Finding 1's fix is behaviour-identical —
level.iter_mut().enumerate(), same traversal, same arithmetic:The lint is now gated, not just fixed
The sigker CI step added in #1166 was deliberately tests-only, because the crate was clippy-red on arrival and gating it would have failed that PR for a defect it didn't introduce. That reason is gone, so the clippy half is armed here.
This matters more than the fix itself: sigker was unlinted precisely because no CI step reached it — it's workspace-excluded, so root-level
cargo clippynever sees it. A lint fix with no gate decays straight back to where it started.The entry cited the line whose deletion is the fix
Worth flagging as a pattern.
TD-SIGKER-CLIPPY-RED-ON-BASE-1citedsignature.rs:133anchored onfor flat in 0..len— and deleting that line is the fix, so applying it made the entry's own citation decay andcitation_decay.pyfired on it.An entry that cites the code it wants removed is self-invalidating by construction. Re-anchored on the enclosing function name,
segment_signature, which survives its own body being rewritten — the property a citation into mutable source actually needs. That's the second time this session the citation gate has corrected a citation of mine, both times correctly.One incidental accuracy fix
While rewriting the overindented line, its "7-13× smaller" claim is now qualified as asymptotic (N≥8, ~2× at shallow depth) with a pointer to the crate's own falsifier test
compression_at_shallow_depth_is_far_below_the_headline. Same misquoteE-A-SKETCH-THAT-MISSED-TWICE-WILL-MISS-A-THIRD-TIME-1flagged in the ndarray consumer contract — it had propagated here too. Called out because it's a content change on a line I was already editing for the lint, not a silent extra.Test plan
cargo clippy --manifest-path crates/sigker/Cargo.toml --all-targets -- -D warnings— 0 errorscargo test --manifest-path crates/sigker/Cargo.toml— 62 passed, 0 failedcargo fmt --check— cleancitation_decay.py --since origin/main— 0 new decays (148 pre-existing backlog unchanged)append_only_gate.py origin/main— no protected file shrank, 9 checkedsupersession_index.py— current, byte-identicalplan_dids.py— no added plansrust-test.ymlparses as valid YAMLStill open
The other workspace-excluded crates (
bgz17,lance-graph-codec-research) were never checked for the same blind spot. Noted in the entry; not swept here.🤖 Generated with Claude Code
https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
Generated by Claude Code