fix(devin-cli): stop sending a permission mode the CLI rejects - #4332
Conversation
Every turn on the default configuration failed. The adapter set DEVIN_PERMISSION_MODE=ask when tools are not allowed, and Devin CLI 3000.10.21 exits 2 before answering: invalid value 'ask' for '--permission-mode <PERMISSION_MODE>': Invalid permission mode: ask. Valid options: normal (auto), accept-edits, dangerous (yolo, bypass), autonomous (requires --sandbox) "normal" is the CLI's own refuse-by-default mode, so the intent is unchanged. Found by running a real turn against an installed, signed-in CLI; the unit tests inject the spawn and their fake child accepts any value, so no test could see it.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Devin CLI adapter now passes ChangesDevin CLI permission mode
Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c6c2dc1db
ℹ️ 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".
| // one path most operators are on. Found by running a real turn | ||
| // against an installed, signed-in CLI; no unit test could see it, | ||
| // because the spawn is injected and the fake child accepts anything. | ||
| DEVIN_PERMISSION_MODE: toolsAllowed ? (process.env.DEVIN_PERMISSION_MODE ?? "bypass") : "normal", |
There was a problem hiding this comment.
Add regression coverage for the permission-mode mapping
The default-mode fix remains untested: the injected spawn in tests/providers/devin-cli-adapter.test.ts currently ignores its options, but it can capture options.env.DEVIN_PERMISSION_MODE without requiring the real CLI. As written, restoring ask or introducing another rejected value would leave all focused tests green while breaking every default-configured live turn again. Add assertions that the default path passes normal and that the tools-enabled path preserves its intended bypass/override behavior.
AGENTS.md reference: src/AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
리뷰 · 우선순위 74 / 80이 PR은 지금 왜 단위 테스트가 못 잡았는지도 분명합니다. 현재 머지는 이미 끝났고, 남은 건 테스트 구멍과 라벨( 라인 133 - tools 미허용일 때 메인테이너의 판단이 필요한 지점
너의 추천
이 댓글은 grok-bot이 작성했습니다 |
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
Summary
The
devin-cliprovider could not complete a single turn in its default configuration. The adapter passedDEVIN_PERMISSION_MODE=askwheneverOPENCODEX_DEVIN_CLI_ALLOW_TOOLSwas unset — the default, and the path most operators are on — and the CLI rejects that value outright:normalis the CLI's own refuse-by-default mode, so the intent theaskvalue was reaching for is preserved exactly. The tools-allowed branch (bypass) is untouched.Why no test caught it
tests/providers/devin-cli-adapter.test.tsdrives the adapter through an injectedspawn, and the fake child accepts any environment. The value is only validated by the real binary, so this is reachable only from a live run.Verification
Devin CLI 3000.10.21 installed and signed in (
devin auth statusreports logged in), provider configured against the running proxy:Before — five retries, every one
exited (code 2).After:
GET /v1/modelslists all 11devin-cli/*rows.Repository-wide
bun run testandbun run typecheck: NOT RUN locally, per the operator constraint for this session. CI covers them on this head.Checklist
devSummary by CodeRabbit