Repository navigation
feat(review): name the review check and its summary comment per automation - #310
Open
eric-factory wants to merge 4 commits into
Open
eric-factory wants to merge 4 commits into
eric-factory wants to merge 4 commits into
Conversation
Every run named its check "Droid Review" (or "Droid Security Review") and adopted the first Droid summary comment on the PR, so when several automations reviewed one repository the last run to start took the comment over and the others ended as superseded without posting. The new review_check_name input, read as REVIEW_CHECK_NAME (the hosted backend sets the variable directly), names the check as given, for security-only runs too. The summary marker then carries the name, percent-encoded so it cannot end the HTML comment (<!-- droid-review-summary:v1 name=Droid%20Review%20(ab12cd34) -->), and a run adopts, owns and reads review state only from the comment whose marker has its name. Description mode's start and end markers carry the name too. Without a name the marker and lookup are unchanged, except that an unnamed run no longer adopts a named run's comment. Refs AUT-3177 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Refs AUT-3177 The validator steps never read REVIEW_CHECK_NAME, so they no longer get it. Summary markers compare names in their encoded form, which drops a silent catch around decoding, and the check summary keeps its old fallback text. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Refs AUT-3177 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
eric-factory
commented
Dec 4, 2026
eric-factory
left a comment
Contributor
Author
There was a problem hiding this comment.
Deep review of the per-automation check name: one Non-Blocking finding (passing the default name "Droid Review" makes a named marker, so the first hosted run starts a second summary comment and drops the stored review state, including @droid pause) and six nits on error messages, tests and docs. The per-name summary marker, the rule that a check never adopts another check's summary, and the three-name lifecycle test are well done.
Contributor
|
No description provided. |
Contributor
Author
|
@droid resume |
Contributor
|
Automatic reviews are enabled again for this PR. |
… passed - Treat REVIEW_CHECK_NAME "Droid Review" or "Droid Security Review" as unset, so a run that passes a default name keeps the PR's unnamed summary comment and its review state instead of creating a second summary. - Add DEFAULT_REVIEW_CHECK_NAME and DEFAULT_SECURITY_REVIEW_CHECK_NAME and use them for the default check name and the blocking banner. - Split the summary ownership and check binding guards in loadBoundReviewLifecycle into one error per condition, each naming the comment or check, the values that disagree, and the REVIEW_CHECK_NAME hint. - Remove an orphaned doc comment in the markers module. - Test default names, a before/after name mismatch, pausing under a named check, and the named blocking banner. The createInitialComment tests restore REVIEW_CHECK_NAME instead of deleting it. - Document review_check_name as a GitHub workflow input in the Review Configuration table, say a default name equals an empty input, and say which check to require in branch protection. Refs AUT-3177 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.
Factory Code Review: Web · Desktop
Part of AUT-3177 (one automation per type per repository, with distinct review check names)
Description
Two Factory review automations on one repository both post a check named "Droid Review" today, and the second run adopts the first run's summary comment. GitHub then shows one check and one summary for two different reviews, and a ruleset that requires "Droid Review" can pass on either run. This affects repositories that more than one Factory review automation covers, for example two Factory organizations connected to one GitHub installation.
A new optional input,
review_check_name, names the check and keys the summary comment, so each automation keeps its own:review_check_name(today's behavior)review_check_name: "Droid Review (ab12cd34)"<!-- droid-review-summary:v1 --><!-- droid-review-summary:v1 name=Droid%20Review%20(ab12cd34) -->review_summary: descriptionblockWithout the input, check names, markers and comment adoption stay as they are, with one exception: an unnamed run no longer adopts a summary comment that carries a named marker. A name equal to a default check name ("Droid Review", or "Droid Security Review") counts as unset, so a run that passes the default keeps the pull request's unnamed summary.
Factory's hosted review sets
REVIEW_CHECK_NAMEdirectly forgithub/run-review.sh(the backend change is in the factory-mono PR linked in the ticket). The check'sexternal_id(<run id>:<attempt>) does not change, and Factory finds its checks by that id.Decisions made for this PR:
hasOtherReviewCheckstill counts each other, as today.@droidresolve, and the#droid-review-summaryanchor stay shared between checks.Potential Risk & Impact
hasSummaryMarker), so a missed caller would fall back to today's unnamed behavior rather than mix names.mainby default), hosted runs ignore the name.How Has This Been Tested?
bun testin CI at70cc11d: 2,810 pass, 1 fail. The failure,test/github/data/review-artifacts.test.ts("returns original selected paths without exposing them in prompt artifacts"), fails the same way ondevwithout this change: on everydevpush sincec52bf57(fix(review): explain disabled auto-trigger skips in plain English #287), including the latest,74950f0. Thetestcheck is not required.bun run typecheckandbun run format:check: clean.70cc11don the same pull request (workflow run47430012858). Jobdefault-namepassedreview_check_name: "Droid Review", and jobnamedpassed"Droid Review (live3177)".default-nameupdated the unnamed one in place (its review state moved to the new head), andnamedupdated the one markedname=Droid%20Review%20(live3177). No third summary was created.