feat(cli): add --with-policy flag#101
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Warning Review limit reached
More reviews will be available in 33 minutes and 48 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughA new Changes--with-policy flag for optional sandbox policy inclusion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
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/containerfile.rs`:
- Around line 278-282: The COPY instruction in the policy_section variable is
missing the --chown flag to set proper file ownership. When the COPY command
executes before the USER directive, the file is owned by root:root, but the
integration test policy_yaml_owned_by_sandbox expects it to be owned by
sandbox:sandbox. Add --chown=sandbox:sandbox to the COPY instruction in the
policy_section string to ensure the policy.yaml file has the correct ownership
set during the container build.
In `@tests/integration_test.rs`:
- Around line 2575-2583: The test function policy_yaml_owned_by_sandbox is
asserting that the policy.yaml file is owned by "sandbox", but the containerfile
copy command does not specify --chown, so the file is actually owned by "root"
by default. Update the assertion in policy_yaml_owned_by_sandbox to expect
"root" as the owner instead of "sandbox" to match the current containerfile
behavior, or alternatively update the containerfile.rs copy command to include
--chown=sandbox to make the test assertion correct.
🪄 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: CHILL
Plan: Pro
Run ID: ec7d6769-1bdb-4fc7-9673-633261cf4c40
📒 Files selected for processing (4)
README.mdsrc/containerfile.rssrc/main.rstests/integration_test.rs
policy.yaml is now opt-in: the file is built and copied into the image only when --with-policy is passed. Without the flag no policy file is staged and the COPY instruction is omitted from the Containerfile. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
policy.yaml is now opt-in: the file is built and copied into the image only when --with-policy is passed. Without the flag no policy file is staged and the COPY instruction is omitted from the Containerfile.