Fix bugs, clean up code, and restore fire-and-forget reactions#837
Merged
Fix bugs, clean up code, and restore fire-and-forget reactions#837
Conversation
Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Clean up code and find potential bugs
Fix bugs and clean up code
Mar 18, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…catch Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com>
Copilot
AI
changed the title
Fix bugs and clean up code
Fix bugs, clean up code, and restore fire-and-forget reactions
Mar 18, 2026
skjnldsv
approved these changes
Mar 18, 2026
skjnldsv
approved these changes
Mar 18, 2026
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.
Several real bugs found and fixed across the codebase, plus a design clarification: reactions should be non-blocking background operations, not part of the critical path.
Bugs fixed
pushBranchrace condition —git.remote(['set-url', ...])was not awaited; the authenticated URL could be set after the push already rancherryPickCommits) — onlybodywas used when reconstructing the amended message, dropping the subject line entirely; commits with no body silently skipped adding[skip ci]getBackportBody) — pushedSTEP_REVIEW_CONFLICTSeven when there were no conflicts, only a diff; addedSTEP_REVIEW_CHANGESconstant for this caseerror(task, e)type mismatch inqueue.ts— passed anErrorobject to astring-typed parameterconsole.trace()in production failure handler${commentAuthor}}had an extra}"\n\n Warning,"→"\n\nWarning,")hasEmptyCommitsvariable inside thehasEmptyCommitsfunctionReactions: fire-and-forget via
.catch()Reactions were originally unawaited (intentionally non-blocking), but that made surrounding
try/catchblocks dead code. Addingawaitfixed the error handling but made reactions block the backport process — wrong trade-off.The correct pattern: fire-and-forget with
.catch()for error logging.All
addReactioncall sites inindex.tsandbackport.tsupdated. Standalonetry/catchblocks that existed solely for a single reaction, and a now-deadtry/catcharound the synchronousisFriendly()call, are removed. In the failure handler, the THUMBS_DOWN reaction is fire-and-forget whilecommentOnPRremains awaited.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.