Repository navigation
fix(devin): tell edit delegates that confirmation-needing commands end the run - #38
Open
danikdanik wants to merge 1 commit into
Open
danikdanik wants to merge 1 commit into
danikdanik wants to merge 1 commit into
Conversation
…d the run In accept-edits, devin -p refuses any exec it wants confirmed and ends the session, which usually lands on the delegate's own test/build step. Add a note to the edit prompt: edits first, no test/build commands, end with the verification commands. OSRC_DEVIN_EDIT_NOTE=0 turns it off.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey Alex, a small companion to #37.
What
On the devin lane, the
editverb (accept-edits) now adds a short note to the prompt: commands that need confirmation end the run, so make all file edits first, don't run tests or builds, and end with the verification commands to run.OSRC_DEVIN_EDIT_NOTE=0turns it off.run/explore(auto) prompts are unchanged.Why
On 0.13.4 a
bg edit -m swe-2job made its edits correctly, then tried to run the tests and got:Devin ends the session there. In
-pmode,accept-editsauto-approves edits and simple read-only commands (cat,python3 -cboth ran fine for me), but anything it wants confirmed is refused. Test runners, package managers, deletes andcd ... &&chains are the usual ones. The delegate doesn't know this in advance, so its last step, verification, is exactly the one that gets cut.jobs-and-safety.mdalready tells the orchestrator to "restructure the prompt so the delegate ENDS on a file write"; this tells the delegate the same thing.How
About ten lines in
delegate(): whenpermisaccept-editsandOSRC_DEVIN_EDIT_NOTEisn't0, the note goes after the task. It adds one sentence tojobs-and-safety.md, which also points tosessionfor when the delegate itself must run tests.How to reproduce
The run ends on the reject warning without doing the step. On a real edit task, the edits land and the test run is what gets refused.
Tests
test_devin_edit_note.sh(7/7, registered inconformance.sh). A fakedevinrecords the-pprompt. The tests check that the edit prompt keeps the task and gets the note, that the auto prompt doesn't get it, that the opt-out works, and that theeditverb still routes throughaccept-edits.conformance.sh: the only failures are the ones main already has on my machine (test_autodetach,test_cline_lane,test_devin_plan_quota,test_lane_plan_limit,test_failover_pick).If you'd rather not change delegate prompts at all, I'm fine closing this and keeping it as a doc note only.