Repository navigation
[Fix] Approvals no longer check parallel calls with another call's arguments - #3347
Merged
Merged
Conversation
Contributor
|
No new code issues found. See task
Reviewed 0557e46 |
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.
Related issue
Internal follow-up to #3185; no separate issue is linked.
Why this PR exists
What changed
In a session, integration tools run inside one code-mode
executescript. When a script calls the same tool several times at once (for examplePromise.allover three deletes), OpenCode raises one approval ask per call. Every ask carries the same outer call id and no arguments. The bridge picked the most recent child call's arguments for every ask, so the approval card, the audit row and Auto's assessment could all describe a different call from the one that would run. Locally, three parallel deletes were all recorded and assessed asdraft-3.The bridge now uses the status OpenCode records for each child call:
Tasks are unaffected: they don't use code mode, so every call has its own id.
How it was tested
pnpm lint, uncachedpnpm check-types, and the Judgement check pass (Judgement reports incomplete coverage with no violations).list_filesreads with different folders were auto-approved and ran.This PR and #3335 both change the assessment block in
fast-agent-tool-approvals.ts. Whichever lands second needs a small rebase: keep this PR's shared assessment around #3335's session-context lookup.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset