You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes three defects in the hand-written callModel approval flow in src/lib. Persistent edits are enabled, so these changes survive regeneration.
Approval predicate runs against raw model arguments before the input schema is applied #520: toolRequiresApproval passed the raw model arguments to a tool's requireApproval(args) predicate. A model could leave out a field whose schema default is sensitive, the predicate would see undefined and skip approval, and the tool would then execute with the default. The predicate now receives z4.safeParse(inputSchema, args).data and falls back to the raw args only when parsing fails. In that case execution fails validation anyway.
inputSchema: z.object({recursive: z.boolean().default(true)}),requireApproval: (args)=>args.recursive,// was: undefined -> no approval
Resuming an awaiting_approval conversation with no decision advances it without recording an approval #517: Resuming a conversation in the awaiting_approval state with no decisions used to fall through to normal initialization and move the conversation to in_progress. It now returns early with isResumingFromApproval = true. This is the same path a partial-decision resume already takes, so getToolExecution exits while the conversation stays paused.
Added a unit test for #520. The test fails without the change. Full unit suite: 211 tests pass.
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Disable automatic comment, CI, and merge conflict monitoring
Original prompt from Luke
SYSTEM:
<latest_message>
Luke Parke (U0BF2BKT52N) [ts=1791235775.813579]: @Devin audit all open issues on our public Typescript, Python, and Go SDKs, and the terraform Provider repo, and list out the unique problems, and vet them to determine validity and severity
</latest_message>
=== BEGIN THREAD HISTORY (in #agents) ===
Luke Parke (U0BF2BKT52N) [ts=1791235775.813579]: @Devin audit all open issues on our public Typescript, Python, and Go SDKs, and the terraform Provider repo, and list out the unique problems, and vet them to determine validity and severity
=== END THREAD HISTORY ===
Channel ID: C07UF9XLTFF
Thread URL: https://openrouter.slack.com/archives/C07UF9XLTFF/p1791235775813579?thread_ts=1791235775.813579&cid=C07UF9XLTFF
The <latest_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.
A [ts=...] marker on a Slack message is that message's timestamp. To act on a specific message with the slack tool (e.g. adding an emoji reaction via the reaction command), pass that value as timestamp along with the Channel ID — no extra lookup call is needed.
This branch has not been deployed
No deployments
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
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.
Summary
This PR fixes three defects in the hand-written
callModelapproval flow insrc/lib. Persistent edits are enabled, so these changes survive regeneration.toolRequiresApprovalpassed the raw model arguments to a tool'srequireApproval(args)predicate. A model could leave out a field whose schema default is sensitive, the predicate would seeundefinedand skip approval, and the tool would then execute with the default. The predicate now receivesz4.safeParse(inputSchema, args).dataand falls back to the raw args only when parsing fails. In that case execution fails validation anyway.approveToolCallsandrejectToolCallsare now de-duplicated, so an ID listed twice no longer executes a side-effecting tool twice. TheModelResultconstructor now throws when an ID appears in both lists, instead of executing the tool and also recording a rejection.awaiting_approvalconversation with no decision advances it without recording an approval #517: Resuming a conversation in theawaiting_approvalstate with no decisions used to fall through to normal initialization and move the conversation toin_progress. It now returns early withisResumingFromApproval = true. This is the same path a partial-decision resume already takes, sogetToolExecutionexits while the conversation stays paused.Added a unit test for #520. The test fails without the change. Full unit suite: 211 tests pass.
Searched existing PRs; none matched.
Link to Devin session: https://openrouter.devinenterprise.com/sessions/78072f08dc274fda9d8309045b1ab806
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/78072f08dc274fda9d8309045b1ab806?variant=devin
Requested by: @LukasParke