fix(sandbox): omit --user when os.getuid is unavailable - #585
Conversation
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. 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, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughChangesSandbox Docker argv
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 `@tests/test_sandbox.py`:
- Around line 57-61: Update the test around the sandbox user-argument assertions
to use callable(getattr(...)) for both os.getuid and os.getgid, matching the
implementation’s availability check. Parameterize the regression cases so getuid
and getgid are removed or made unavailable independently, covering each
partial-availability combination instead of only removing both together.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 99446498-5cb8-431c-a2e0-532b5a260b2a
📒 Files selected for processing (3)
CHANGELOG.mdsrc/vouch/sandbox.pytests/test_sandbox.py
874651c to
bf09eaf
Compare
|
rewrote commit history to remove the |
address coderabbit on vouchdev#585: assert with callable(getattr(...)) like _docker_argv, and parameterize missing/non-callable getuid and getgid independently.
|
addressed coderabbit: tests now use |
windows has no getuid/getgid; building sandboxed docker argv raised AttributeError before docker ran. Fixes vouchdev#582
address coderabbit on vouchdev#585: assert with callable(getattr(...)) like _docker_argv, and parameterize missing/non-callable getuid and getgid independently.
cdd4e8a to
59d5562
Compare
rebase conflict resolution corrupted escape sequences in CHANGELOG; rebuild from upstream/test and re-add the sandbox bullet.
the degraded-when-absent case called handle_request with no discoverable .vouch root, so _store raised KBNotFoundError and CI failed on py3.13. chdir into a fixture KB and empty the Claude/Codex search roots instead.
what changed
sandbox docker argv only adds
--user uid:gidwhenos.getuid/os.getgidexist. on windows the flag is omitted so argv construction no longer raises.why
sandboxed dual-solve crashed with
AttributeErroron windows before docker ever ran (#582).validation
Fixes #582
Summary by CodeRabbit
--user UID:GIDmapping when both values can be retrieved, avoiding command-building errors.