chore(push-runner): quality_gate clippy を --all-targets --all-features 化 (順位259) - #251
Conversation
…s 化 (順位259) 現行 `cargo clippy --workspace -- -D warnings` は lib/bin ターゲットのみを検査し、 #[cfg(test)] ユニットテスト・integration test のコードが lint されない gap があった。 PR #247 で useless_format が cargo test 段階まで顕在化して手戻りが発生したことを受け、 rust-lint-test group の clippy を --all-targets --all-features 化する。 - push-runner-config.toml + templates/push-runner-config.toml を同スコープに更新 - 既存違反 1 件 (cli-merge-pipeline takt.rs の ORPHAN_THRESHOLD_SECS 不変条件 runtime test の clippy::assertions_on_constants) を const _: () = assert!(...) のコンパイル時 検証へ移行 (定数条件は test 実行時 assert より compile-time assert の方が強い保証) - cargo clippy --workspace --all-targets --all-features -- -D warnings が workspace 全体 PASS - ADR-015 § clippy の lint スコープ を amendment。todo 順位259 を消化。
📝 WalkthroughWalkthroughquality_gate の clippy 実行コマンドに Changesquality_gate clippy スコープ拡張と関連整理
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/cli-merge-pipeline/src/feedback/takt.rs (1)
33-40: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value現状の定義では両アサーションは自明(トートロジー)です。
ORPHAN_THRESHOLD_SECSは Line 31 でTAKT_TIMEOUT_SECS + 300として定義されているため、両方のconst assert!は現状のコードでは常に真になります。将来どちらかの定数がハードコード値に変更された際の回帰防止としては有用なので問題視はしませんが、その意図であればコメントで明記しておくとレビュー時の混乱を防げます。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cli-merge-pipeline/src/feedback/takt.rs` around lines 33 - 40, The two compile-time assertions in takt.rs are currently tautological because ORPHAN_THRESHOLD_SECS is defined directly from TAKT_TIMEOUT_SECS, so the intent needs to be made explicit. Update the nearby definition/comments around ORPHAN_THRESHOLD_SECS and the const assert! checks in takt.rs to state that these assertions are deliberate regression guards against future hardcoded changes to TAKT_TIMEOUT_SECS or the orphan threshold, using the symbols ORPHAN_THRESHOLD_SECS and TAKT_TIMEOUT_SECS to make that purpose clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/cli-merge-pipeline/src/feedback/takt.rs`:
- Around line 33-40: The two compile-time assertions in takt.rs are currently
tautological because ORPHAN_THRESHOLD_SECS is defined directly from
TAKT_TIMEOUT_SECS, so the intent needs to be made explicit. Update the nearby
definition/comments around ORPHAN_THRESHOLD_SECS and the const assert! checks in
takt.rs to state that these assertions are deliberate regression guards against
future hardcoded changes to TAKT_TIMEOUT_SECS or the orphan threshold, using the
symbols ORPHAN_THRESHOLD_SECS and TAKT_TIMEOUT_SECS to make that purpose clear.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f42af638-0776-49a8-981d-99a6ffdc0932
📒 Files selected for processing (6)
docs/adr/adr-015-push-runner-takt-migration.mddocs/todo-summary.mddocs/todo13.mdpush-runner-config.tomlsrc/cli-merge-pipeline/src/feedback/takt.rstemplates/push-runner-config.toml
💤 Files with no reviewable changes (2)
- docs/todo-summary.md
- docs/todo13.md
概要
push pipeline の quality_gate clippy を
cargo clippy --workspace -- -D warningsから--all-targets --all-features化し、#[cfg(test)]ユニットテスト・integration test のコードも lint 対象に含める。順位259(PR #247 post-merge-feedback T2-1 採用)。動機
現行 clippy は lib/bin ターゲットのみを検査し、テストコードが lint されない gap があった。PR #247 で
useless_formatが clippy を素通りしてcargo test段階まで顕在化し手戻りが発生した。--all-targets(=--lib --bins --tests --benches --examples)でテストコードも clippy 対象になる。変更
push-runner-config.toml+templates/push-runner-config.tomlのrust-lint-testgroup clippy を--all-targets --all-features化cli-merge-pipelineのfeedback/takt.rsのORPHAN_THRESHOLD_SECS不変条件を検証する runtime test のclippy::assertions_on_constants)をconst _: () = assert!(...)のコンパイル時検証へ移行(定数条件は test 実行時 assert より compile-time assert の方が強い保証。runtime test は除去)検証
cargo clippy --workspace --all-targets --all-features -- -D warningsが workspace 全体 PASS(PR feat(pre-push-review): WP-06 反証(refute) facet 追加 — reviewers→verify(haiku)→fix (ADR-047 試験運用) #250 = WP-06 refute facet マージ後の統合状態でも clean)cli-merge-pipeline58 tests green備考
--all-featuresは現時点で全 crate に[features]定義がなく no-op(将来の feature-gated コード用の保険)rust-lint-testgroup はcargo test -- --ignored(~80s)支配で誤差、4 group 並列のため総時間影響なしSummary by CodeRabbit
Documentation
Bug Fixes