infra(cargo): Cargo workspace 化 + rust-test push pipeline 統合 (ADR-026) - #46
Conversation
## 背景 PR #44 で push pipeline に rust-test group を追加したが、本プロジェクトが Cargo workspace ではないため cargo test --manifest-path の個別指定が必要だった。 また各 package に target/ が独立し、compile cache が共有されない問題もあった。 ## 変更内容 ### workspace 化 - ルート Cargo.toml 新規作成 ([workspace] + 10 members + [profile.release]) - 各 member Cargo.toml から重複していた [profile.release] を削除 (workspace 化で ignore される警告の解消) - .gitignore: /target/ (workspace 共有) を追加、src/*/target/ も legacy 互換で維持 ### build スクリプト統一 - package.json の build:* を "cargo build --release -p <name>" 形式に統一 - target path を workspace root (target/release/) 基準に変更 - cd 不要に、cache 共有で再ビルド時間短縮 ### push pipeline 簡素化 - push-runner-config.toml の rust-test command を "cargo test" / "cargo test -- --ignored --test-threads=1" に簡素化 - templates/push-runner-config.toml にコメントアウト済みの rust-test group テンプレート追加 (派生プロジェクトで有効化可能) ### ドキュメント - ADR-026: Cargo workspace による Rust パッケージ統合 (新規) - CLAUDE.md: ADR index 更新 - docs/todo.md: task #4 を実装済みに更新 ## 回帰テスト - cargo test: 10 packages 合計 318 tests passed + 1 integration (ignored) - cargo test -- --ignored --test-threads=1: 1 integration test passed - pnpm build:all: 全 8 exe 警告なしで成功
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (10)
📒 Files selected for processing (17)
📝 WalkthroughWalkthroughリポジトリのRustパッケージ群をルート Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as 開発者 / CI設定
participant NPM as npm scripts
participant Cargo as Cargo Workspace (repo-root)
participant Art as .claude / target/
participant CI as Push-Runner / テスト実行
Dev->>NPM: npm run build:<crate>
NPM->>Cargo: cargo build --release -p <crate>
Cargo-->>Art: target/release/<binary>.exe を出力
Cargo->>Art: cp target/release/<binary>.exe .claude/<binary>.exe
CI->>Cargo: cargo test (workspace)
Cargo-->>CI: 単体/ignored テスト結果
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/cli-push-runner/Cargo.toml (1)
10-10: LGTM!他 member crate と同一パターンで
[profile.release]を root に集約できています。なお任意の改善として、今後
editionや共通依存バージョンが増えるようであれば、rootCargo.toml側に[workspace.package]/[workspace.dependencies]を定義し、各 member でedition.workspace = trueやserde.workspace = trueのように継承する形も検討余地があります(本 PR のスコープ外)。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/cli-push-runner/Cargo.toml` at line 10, This is fine as-is (you've centralized [profile.release] at the workspace root); optional improvement: if shared settings (edition or dependency versions) increase, define [workspace.package] and/or [workspace.dependencies] in the root Cargo.toml and in member crates switch to inheriting those values (e.g., set edition.workspace = true and serde.workspace = true in the member Cargo.toml files) so common edition and dependency versions are managed centrally; update member manifests to remove duplicated keys once the workspace entries are added.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/cli-push-runner/Cargo.toml`:
- Line 10: This is fine as-is (you've centralized [profile.release] at the
workspace root); optional improvement: if shared settings (edition or dependency
versions) increase, define [workspace.package] and/or [workspace.dependencies]
in the root Cargo.toml and in member crates switch to inheriting those values
(e.g., set edition.workspace = true and serde.workspace = true in the member
Cargo.toml files) so common edition and dependency versions are managed
centrally; update member manifests to remove duplicated keys once the workspace
entries are added.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a76fcce8-105a-4a01-9cae-c869f8859e42
⛔ Files ignored due to path filters (10)
Cargo.lockis excluded by!**/*.locksrc/check-ci-coderabbit/Cargo.lockis excluded by!**/*.locksrc/cli-merge-pipeline/Cargo.lockis excluded by!**/*.locksrc/cli-pr-monitor/Cargo.lockis excluded by!**/*.locksrc/cli-push-pipeline/Cargo.lockis excluded by!**/*.locksrc/cli-push-runner/Cargo.lockis excluded by!**/*.locksrc/hooks-pre-tool-validate/Cargo.lockis excluded by!**/*.locksrc/hooks-session-start/Cargo.lockis excluded by!**/*.locksrc/hooks-stop-quality/Cargo.lockis excluded by!**/*.locksrc/lib-report-formatter/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (17)
.gitignoreCLAUDE.mdCargo.tomldocs/adr/adr-026-cargo-workspace.mddocs/todo.mdpackage.jsonpush-runner-config.tomlsrc/check-ci-coderabbit/Cargo.tomlsrc/cli-merge-pipeline/Cargo.tomlsrc/cli-pr-monitor/Cargo.tomlsrc/cli-push-pipeline/Cargo.tomlsrc/cli-push-runner/Cargo.tomlsrc/hooks-post-tool-linter/Cargo.tomlsrc/hooks-pre-tool-validate/Cargo.tomlsrc/hooks-session-start/Cargo.tomlsrc/hooks-stop-quality/Cargo.tomltemplates/push-runner-config.toml
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary
Summary by CodeRabbit
リリースノート