Repository navigation
feat: add a label when the review is ready for a human - #97
Merged
Merged
Conversation
🤖 AI code reviewDecision: Ready for human review Overall PR risk: Medium. This change modifies existing report functions to add label syncing after comment operations. Label ownership depends on issue event history; incorrect login resolution could leave stale labels or skip removals. Previously saved review artifacts fail the fingerprint check when the new option is configured. The feature is off by default, label failures only log, and removing the config key disables the feature. 🔎 Reviewer summaries (3)
No findings. This review is advisory — it never blocks a merge and never auto-approves. |
tsapeta
marked this pull request as ready for review
October 26, 2026 18:38
…al coverage - GitHub label names are unique regardless of case. A config spelled differently from the repo's label never saw it as present, so it was never removed, and a person's removal was not matched. The presence check, the event match and the config check now ignore case, and DELETE uses the PR's spelling. - The aggregate was labelled ready with changed files no scope matched, or on a --scopes run with no result for the other scopes. reportAggregate now takes coverageComplete from ci.ts and checks unmatched files. - README, LLP 0008 and the template describe what a GitHub App token actually does, and that /skip-review removes the label only under ecr ci.
- An explicit agent subset (`--agents`, `/review <agents>`), a `--scopes` run, and a review saved with `--agents` and posted by `ecr post-review` never add the label; they can still remove the bot's own. This replaces the coverageComplete check, which only a --scopes run could fail. - A review where no agent's paths matched approves without a coverage note; it is now not ready. A noise-only review stays ready. - When the event history reaches the page cap, the label is left alone, since the newest event may not have been read. - The README holds the contract, including the login caveats, instead of "a person's add or removal always wins"; the schema and template point to it.
This was referenced Oct 27, 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.
Why
Maintainers want to see at a glance which PRs the AI review has cleared for a human, without opening each review comment. A label is filterable in PR lists and searches.
Change
review.readyForHumanLabel(off by default), names the label. The config check rejects a label that is also, in any case,review.label,review.skipLabelor a<label>:<agent>trigger.syncReadyLabeladds the label when the review covers the whole PR and the worst decision is "Ready for human review", with or without comments. A review doesn't cover the whole PR when a pass didn't finish, no agent'spathsmatched the changed files, a changed file matched no scope, or the run was partial: an explicit agent subset (--agents,/review <agents>), a--scopesrun, or a review saved with--agentsand posted byecr post-review. A noise-only review stays ready./skip-reviewthatecr ciacts on, or a run that deletes the review comment removes the label. A partial run can remove it but never adds it.labeled, and it isn't added again when the newest event is another account'sunlabeled. No new state is stored in the comment. "Our account" is the token's login, so with a personal token that person's own removals count as ours, under the defaultGITHUB_TOKENother workflows' label changes do too, and local and CI runs can't remove each other's labels. When the history is longer than the 30-page cap, the label is left alone.ecr ci,ecr post-reviewandecr review --pr --postpass the option, and the deferred-review config fingerprint includes it. Per-scope comment mode has no single decision for the PR, so it sets no label and logs that./dismisskeeps the stored decision, so it doesn't change the label. Label failures only log, since the comment is already posted.templates/config.jsonc, the schema comment and LLP 0008 point to it.Test Plan
bun test(900 pass), typecheck, lint,fmt:checkandllp:checkpass.src/__tests__/ready-label.test.tscovers the readiness rule (partial coverage, no reviewer applied, noise-only) and the config check (including case variants), and drives the reporter through a fakegh:clear()andpostSkipNote()remove the bot's labelsrc/__tests__/deferred-review.test.tscovers the artifact'spartialReviewfield and that an artifact without it still parses.