Repository navigation
feat(review): adopt pre-created hosted review check and eyes reaction - #311
Open
factory-andrew-yang wants to merge 1 commit into
Open
factory-andrew-yang wants to merge 1 commit into
factory-andrew-yang wants to merge 1 commit into
Conversation
When running in a hosted automation (FACTORY_AUTOMATION=true), adopt an existing open check matching the run's external_id and accept an HTTP 200 eyes reaction so the backend can post an immediate queued ack before the review environment finishes cold-starting without leaving duplicate checks or orphaned reactions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.
Problem
Hosted code review automations experience cold-start dead air while a fresh Droid Computer is provisioned and
droid-actionboots. Posting an immediatequeuedCheck Run and👀reaction from the backend webhook handler would otherwise create duplicate Check Runs (and leave👀orphaned whencreateForIssuereturns HTTP 200 instead of 201 or when a hosted run skips early).Fix
src/github/operations/review-checks.ts: AddadoptReviewCheck(gated onFACTORY_AUTOMATION=true) to find and update an existing open check run matchingcheck_nameandexternal_id(${GITHUB_RUN_ID}:${GITHUB_RUN_ATTEMPT}) in place instead of creating a second Check Run.src/github/operations/review-lifecycle.ts:run.skipReasonso skipped hosted runs settle any pre-createdqueuedcheck rather than leaving it stuck.createEyeswhenFACTORY_AUTOMATION=truesodroid-actiontakes ownership of a pre-created👀reaction and cleans it up infinishReviewLifecycle.Verification
bun test test/github/review-lifecycle.test.ts(120 pass, 0 fail)bun run typecheck(pass)bun run format:check(pass)