Narrow review scope on events that skip narrowing today (ready_for_review, reopened, moved head)

未关闭
#19,251 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, shell
领域
ci-cd

调研方向

Start by reading #19232 and its measurement, then inspect scope.cjs and the two named hosted review workflows. Re-run the measurement with event actions and head-moved log lines, and classify the 14 runs with links. Done means each cause has a merged fix or a documented reason to keep current behavior, any changed review scope cites an owner decision, and a comparable re-measure shows fewer whole reviews.

由索引模型根据 Issue 内容生成。

描述

needs-owner-decision needs-triage
Context

Of 34 review model runs on heads whose last commit merged main with an empty remerge diff (2026-11-25 12:00Z to 2026-11-26 03:30Z, 1010 hosted review runs; #19232 measurement), 14 got a whole review because resolve-review-scope attempted no narrowing at all. That is the largest share of the 34, and fixing it loosens no check.

scope.cjs narrows only when INCREMENTAL is on, EVENT_ACTION === "synchronize" and the live head equals the run's head (melodic-software/ci-workflows .github/actions/resolve-review-scope/scope.cjs:333; head check :318-322). The review callers trigger on opened, synchronize, ready_for_review, reopened (.github/workflows/pr-review-hosted.yml:50), and the non-synchronize events always review the whole pull request (pr-review-hosted.yml:44-46). So each of the 14 is either a ready_for_review/reopened event on a pull request the lane had already reviewed, or a synchronize run whose head moved before scoping. Which of the two dominates is UNVERIFIED: the measurement did not record the event action per run.

The owner chose this route on 2026-11-25 (Q1 option (c) on #19232, verbatim: "go w/ recommendations, bake it into the handoff"): base-merge-only heads keep a whole review; the 14 runs get a separate look.

Cost of leaving it: up to 14 whole re-reviews per 15 busy hours, each a whole-pull-request model run on the code or security lane, plus their GITHUB_TOKEN calls (#19233).

Proposed work
  • Re-run the #19232 measurement with each run's event action and the "head moved" log line (The pull request's head moved to) recorded, and split the 14 by cause.
  • For ready_for_review and reopened on a pull request with a recorded lane review: decide whether the same since-last-review narrowing applies. If narrowing these events changes what a lane reviews (it does: they review the whole PR today), that is a loosened check and needs an owner-decisions row before it merges.
  • For a synchronize run whose head moved: the newer head's own run reviews it; check whether the stale run can skip instead of reviewing the whole pull request (it would review a head that is no longer the PR's).
Acceptance criteria
  • The 14 runs are classified by cause (event action, head moved), with run links.
  • Each cause has a fix merged, or a comment here stating why it stays.
  • Any change to what a lane reviews cites an owner-decisions row.
  • A re-measure over a comparable window shows fewer whole reviews on heads with a recorded lane review.
References
  • #19232 (measurement, owner answer), #19233 (GITHUB_TOKEN spend), #19247
  • melodic-software/ci-workflows .github/actions/resolve-review-scope/scope.cjs
  • .github/workflows/pr-review-hosted.yml, .github/workflows/pr-review-security-hosted.yml
主要语言
Shell
星标
22
派生
2
平均合并
2 小时
30 天内合并 PR
960

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。