Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new ChangesImplement dela deny command
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@src/commands/deny.rs`:
- Around line 52-85: TestEnvGuard currently doesn't restore the process CWD, so
capture the original current working directory when creating a TestEnvGuard
(e.g., add a field original_cwd: PathBuf set in new()/new_uninitialized()) and
then in the Drop implementation call
std::env::set_current_dir(&self.original_cwd) before calling
reset_to_real_environment() to ensure the process CWD is restored and no temp
dirs remain as the current working directory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 91d41f27-32bb-454b-b7e3-fee80170f0c8
📒 Files selected for processing (6)
cargo_crap_baseline.jsondev_docs/project_plan.mdsrc/commands/deny.rssrc/commands/mod.rssrc/main.rstests/docker_noinit/test_noinit.sh
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@src/commands/allow.rs`:
- Line 60: The fallback for capturing the working directory uses "." which is
relative and can leak CWD across tests; replace the unwrap_or_else fallback for
original_cwd (and the similar capture at line 70) with a deterministic absolute
path (for example PathBuf::from("/") or std::env::temp_dir()) so that when
env::current_dir() fails you store a known absolute location instead of ".";
update both the original_cwd assignment and the other capture at line 70 to use
that deterministic absolute fallback.
In `@src/commands/deny.rs`:
- Line 60: The code captures original_cwd with
env::current_dir().unwrap_or_else(|_| PathBuf::from(".")), which uses a relative
"." fallback that can be resolved later and leak the process CWD; replace that
relative fallback with a deterministic absolute fallback (e.g.,
PathBuf::from("/") ) or preferably propagate the error instead of silently
falling back; update the two occurrences (the original_cwd binding and the
similar call at the other occurrence) to use an absolute PathBuf fallback or
return Err so the captured cwd is never a relative ".".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1c00cc66-736d-46bc-ba49-eb131b702aaa
📒 Files selected for processing (3)
cargo_crap_baseline.jsonsrc/commands/allow.rssrc/commands/deny.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@tests/docker_noinit/test_noinit.sh`:
- Around line 915-933: The test currently masks command failures with "|| true"
and only greps output; remove "|| true" from both dela allow-command invocations
(the ones assigning output and output_other) and assert their exit statuses
explicitly: for "dela allow-command another-task" verify it exited non-zero AND
its combined output contains "was denied by the allowlist"; for "dela
allow-command print-args" verify it exited zero AND its output does NOT contain
that denial message. Use the exit code from the command (or "$?") after each
invocation and fail the test if the exit code/message expectations are not met.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 12846d15-e3b7-44c5-b189-620dad762185
📒 Files selected for processing (4)
cargo_crap_baseline.jsonsrc/allowlist.rssrc/commands/deny.rstests/docker_noinit/test_noinit.sh
Summary by CodeRabbit
New Features
Tests
Documentation
Chores