Repository navigation
Review check shows every trigger; verdicts rest on a fingerprint and name what holds the merge - #486
Merged
Merged
Conversation
…name what holds the merge
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.
Summary
Three live failures on one pull request, one root: the reviewer treated "same commit" as "nothing changed", and only some triggers showed anything on the commit.
"Nothing changed" now means a stored fingerprint of everything the verdict rests on is identical, and changes are requested only with at least one named thing holding the merge.
Changes
One way to send a review job (gateway).
send_review_jobsends the message and queues the check. A source test fails if anything else builds aWorkerMessage::Review. The thread reply paths, quote reply, conversation reply, re-review comment, review body, Re-request button, description edit, dashboard re-review, auto-merge re-arm and pull_request events all use it.What each path did on main before this:
The worker's
start_checkreturned early for any job with a question or an empty head, so a reply showed nothing unless it reached verdict mode.What the check shows.
sha7sha7sha7sha7with the edited descriptionAn answer-only reply can't leave a meaningless result: a job that ends without a new verdict opens a new run of the same name while it works (GitHub shows the newest run of a name, and main already opened one this way for an ask on a finished commit) and completes it with the conclusion and title of the run before it, adding what it did to the summary. I chose a new run over patching the finished one back to in progress because the earlier run stays readable, so the worker, the stuck-check sweep and a failed send can all restore it with no extra state. The listing now asks for
filter=all. Refusals for checks:write behave as before, and the sweep restores the verdict on a stale reply check.What a verdict rests on (
review_fingerprint). A record stores the commit, the description's normalised text, its own threads and whether each is resolved, CI and plan results plus failures on the base, and what people wrote (a bare re-review aside). An unreadable part, or a record without a fingerprint, counts as changed.Requesting changes needs a name (
review_verdict::Verdict). A verdict is only built from what holds the merge: findings, open holding threads, blocking unconfirmed facts, a failed verification, CoderHelm's own open findings, or items held from the earlier review. Nothing named is an approval, whatever came before. The "something holds the merge" fallback is gone, the review body lists each item, andpostrefusesREQUEST_CHANGESwith nothing named. An earlier verdict is held only on an identical fingerprint, and a block held that way must still name its item.Clearing. When the last item settles the same review approves, and a later APPROVE from the same reviewer replaces its request for changes on GitHub.
Auto-merge. The gate is not loosened. Its panel names what holds the merge, line by line, from the record, and refreshes when a review still blocks. The gate now needs a person's approval of the current commit. Before, the latest approval on any commit counted.
Posted text. A model's reason is shown only as one whole sentence in its own paragraph, or not at all, with a test on that shape.
common::proseadds sentence-aware cuts. The overview no longer treats the dot in a path as a sentence end, which is what cut it. An answer that hits its token limit ends on its last whole sentence, the body-only fold cuts on a boundary and says so, and open-finding titles are no longer capped.Description rules. One new
SHAPE_RULESline: deploy claims come only from CI workflows and module wiring, and a manual deploy step is named only if one of those shows it.Verification
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test -p common -p gateway -p workerpass.run_onceuses: description edited and both threads settled clears; a settled thread with another still open blocks and names it; identical fingerprint keeps a real block named against model noise; a re-review ask with nothing changed stays as it was; a comment naming a blocker gets one answer, no formal review and keeps the check's verdict; an old record without a fingerprint is reviewed afresh; thread, description and push still review.infra/lib/stack.. The original review's text wasn't available to compare.Not verified against real GitHub or a deployed install: that a new run replaces the finished one in the PR's checks, that a later APPROVE clears the earlier request for changes, and the order of calls in
run_once, which is checked from its source because it needs GitHub and the database to run.