From a2ca4b80e85734f0a179337f549fc2a2a866a615 Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 30 Mar 2026 19:48:38 -0700 Subject: [PATCH 1/3] ci: add CodeRabbit.ai review configuration Add .coderabbit.yaml with path-specific review instructions for store (atomicity/crash safety), git.rs (command injection), and CLI (thin adapter pattern). Enables clippy and shellcheck tools. Refs #11 (item 10) Co-Authored-By: Claude Opus 4.6 (1M context) --- .coderabbit.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..31d52df --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,28 @@ +language: en +reviews: + profile: chill + auto_review: + enabled: true + drafts: false + path_instructions: + - path: "src/core/store/**" + instructions: > + Pay close attention to atomicity, error handling on I/O operations, + and state consistency. These files manage persistent state that must + survive crashes. + - path: "src/core/git.rs" + instructions: > + Review for command injection risks in git subprocess invocations. + Ensure all user-provided branch names are passed as separate args, + never interpolated into shell strings. + - path: "src/cli/**" + instructions: > + Verify CLI layer is a thin adapter. Business logic should live in + src/core/. Check that error messages are user-friendly. + tools: + clippy: + enabled: true + shellcheck: + enabled: true +chat: + auto_reply: true From cf56f58ffdeab4f27233a12328b80a285fdee9cd Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 30 Mar 2026 20:09:31 -0700 Subject: [PATCH 2/3] fix: align CodeRabbit config with petry-projects org standards Co-Authored-By: Claude Opus 4.6 (1M context) --- .coderabbit.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 31d52df..5439d5c 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -1,9 +1,14 @@ -language: en +# CodeRabbit configuration +# https://docs.coderabbit.ai/guides/configure-coderabbit +language: en-US reviews: - profile: chill auto_review: enabled: true drafts: false + base_branches: + - main + path_filters: + - "!.claude/**" path_instructions: - path: "src/core/store/**" instructions: > @@ -19,6 +24,18 @@ reviews: instructions: > Verify CLI layer is a thin adapter. Business logic should live in src/core/. Check that error messages are user-friendly. + - path: "**/*.rs" + instructions: > + Focus on Rust best practices, proper error handling, and security + considerations. Flag any potential issues with unsafe code or + subprocess command injection. + - path: "**/*.yml" + instructions: > + Focus on YAML best practices, correct indentation, valid syntax, + and consistent structure. Flag any schema issues or misconfigurations. + request_changes_workflow: false + high_level_summary: true + poem: false tools: clippy: enabled: true From 53140a8d5fc575a4d38b3655a07029044871ad5e Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 30 Mar 2026 20:12:58 -0700 Subject: [PATCH 3/3] fix: correct path typo in CodeRabbit config Co-Authored-By: Claude Opus 4.6 (1M context) --- .coderabbit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 5439d5c..77e457f 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -23,7 +23,7 @@ reviews: - path: "src/cli/**" instructions: > Verify CLI layer is a thin adapter. Business logic should live in - src/core/. Check that error messages are user-friendly. + src/core/ instead. Check that error messages are user-friendly. - path: "**/*.rs" instructions: > Focus on Rust best practices, proper error handling, and security