Repository navigation
fix(cli): fall back when systemd scope launch fails - #715
Conversation
Treat nonzero systemd-run exits as unavailable scope launches instead of exiting the original foreground command with the same failure code. In auto mode this lets the process-local nice/ionice fallback run; in explicit scope mode the user gets a structured unavailable report with the systemd-run diagnostic. Ref #708
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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. Review rate limit: 0/1 reviews remaining, refill in 30 minutes and 4 seconds.Comment |
Polylogue Proof PackRefs: Affected Domains
Focused Gates
Required PR Gates
Optional Confidence Gates
Known Gaps
Oracle / Cost
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c949744f6c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Summary Handle `systemd-run --user --scope` launch failures as unavailable resource isolation rather than exiting the original command with the `systemd-run` status. ## Problem The resource boundary work from #711 made `auto` mode prefer transient systemd scopes for heavy foreground maintenance. A nonzero `systemd-run` exit is not the same as successful re-exec inside a scope: in `auto` mode it should fall through to process-local demotion, and in explicit `scope` mode it should report an unavailable scope with the diagnostic. ## Solution - Capture `systemd-run` output and treat nonzero return codes as `ScopeLaunchUnavailableError`. - Preserve the existing `SystemExit(0)` path when scope launch succeeds. - Add a focused test for explicit scope-mode launch failure and diagnostic propagation. ## Verification - `ruff check polylogue/maintenance/resources.py tests/unit/maintenance/test_resources.py` - `ruff format --check polylogue/maintenance/resources.py tests/unit/maintenance/test_resources.py` - `mypy tests/unit/maintenance/test_resources.py` - `pytest -q tests/unit/maintenance/test_resources.py` - `devtools verify --quick` - pre-push hook: `devtools verify --quick` Ref #708
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Handle
systemd-run --user --scopelaunch failures as unavailable resource isolation rather than exiting the original command with thesystemd-runstatus.Problem
The resource boundary work from #711 made
automode prefer transient systemd scopes for heavy foreground maintenance. A nonzerosystemd-runexit is not the same as successful re-exec inside a scope: inautomode it should fall through to process-local demotion, and in explicitscopemode it should report an unavailable scope with the diagnostic.Solution
systemd-runoutput and treat nonzero return codes asScopeLaunchUnavailableError.SystemExit(0)path when scope launch succeeds.Verification
ruff check polylogue/maintenance/resources.py tests/unit/maintenance/test_resources.pyruff format --check polylogue/maintenance/resources.py tests/unit/maintenance/test_resources.pymypy tests/unit/maintenance/test_resources.pypytest -q tests/unit/maintenance/test_resources.pydevtools verify --quickdevtools verify --quickRef #708