fix: prevent duplicate [aw] No-Op Runs issues on transient search failure#19613
Merged
fix: prevent duplicate [aw] No-Op Runs issues on transient search failure#19613
[aw] No-Op Runs issues on transient search failure#19613Conversation
…te no-op issues Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix transient search failure in handle_noop_message
fix: prevent duplicate Mar 4, 2026
[aw] No-Op Runs issues on transient search failure
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents duplicate [aw] No-Op Runs issues by aborting issue creation when the “search for existing issue” call fails (e.g., transient API/rate-limit/network errors), instead of silently falling through to the create path.
Changes:
- Update
ensureAgentRunsIssue()to throw on search failures rather than warning and continuing to create. - Add a regression test ensuring a rejected search does not call
issues.createorissues.createComment.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/setup/js/handle_noop_message.cjs | Propagates search failures so the caller can abort before creating a potentially-duplicate tracking issue. |
| actions/setup/js/handle_noop_message.test.cjs | Adds test coverage for “search throws” behavior to ensure no issue/comment is created. |
Comments suppressed due to low confidence (1)
actions/setup/js/handle_noop_message.cjs:40
- When rethrowing the search failure, this wraps the original exception and loses its stack/metadata. Since this repo runs on modern Node versions, consider using the
Errorcauseoption (or otherwise preserving the original error) so logs/debugging retain the underlying error details.
throw new Error(`Failed to search for existing no-op runs issue: ${getErrorMessage(error)}`);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
A transient API error (rate limit, network blip) during the issue search in
ensureAgentRunsIssue()was silently swallowed, causing execution to fall through toissues.create— potentially producing duplicate[aw] No-Op Runstracking issues when one already existed.Changes
handle_noop_message.cjs— replacecore.warning+ fall-through in the searchcatchblock with athrow, so a failed search aborts rather than creates:The
main()caller already wrapsensureAgentRunsIssue()in a try/catch that logs a warning and returns early, so this change slots cleanly into existing error handling with no behavior change for the happy path.handle_noop_message.test.cjs— adds a test asserting that a search API rejection does not triggerissues.createorissues.createComment.Original prompt
handle_noop_message: transient search failure falls through to create and can produce duplicate[aw] No-Op Runsissues #19606💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.