babysit-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Babysit a PR

值守PR

Keep one PR merge-ready until it is green and approved, without letting it grow. Requires an existing PR (
file-pr
creates it).
持续维护一个PR使其保持可合并状态,直到它测试通过并获得批准,避免PR内容不断膨胀。需要已有PR(
file-pr
用于创建PR)。

Loop

循环流程

Poll with
gh pr view
,
gh pr checks
, and the review threads. Act only on checks and comments newer than the latest push — do not re-litigate old threads.
  1. CI red? Distinguish a real repo failure from an infrastructure flake. Fix real failures; for flakes, re-run and say why.
  2. New review comment (human or bot)? Verify the finding against the source before changing code. Bots are often wrong.
    • Real issue → fix it.
    • Not worth addressing → reply with a short written reason and resolve the thread. Never ignore silently.
  3. main
    moved? Rebase or merge main so the PR stays current.
  4. Repeat until: checks green, reviews resolved, approvals in.
通过
gh pr view
gh pr checks
以及评审线程进行轮询。仅对最新推送之后的检查结果和评论采取行动——不要重新处理旧的线程。
  1. CI失败?区分是仓库代码的真实错误还是基础设施的偶发故障。修复真实错误;对于偶发故障,重新运行并说明原因。
  2. 新的评审评论(人工或机器人)?在修改代码前先对照源代码验证问题是否存在。机器人的判断常常有误。
    • 真实问题 → 修复它。
    • 不值得处理 → 简短回复原因并关闭该线程。绝不默默忽略。
  3. main
    分支更新了?变基或合并main分支以保持PR内容最新。
  4. 重复上述步骤直到:检查全部通过、评审线程已解决、获得批准。

Comment etiquette

评论规范

Comments left on Dustin's behalf are marked as such:
`<model slug>` responding on behalf of Dustin:
<reply>
代表Dustin留下的评论需标记如下:
`<model slug>` responding on behalf of Dustin:
<reply>

Hard rules

硬性规则

  • The most important line: do not let review feedback expand the PR beyond the user's original goal. Address real shortcomings, avoid scope creep. If a reviewer asks for more, note it as a follow-up instead of building it.
  • If an overlapping PR makes this one obsolete: stop, report, and ask before closing — unless closing was explicitly authorized.
  • Never force-push over someone else's commits on the branch.
  • No reviewers, no bots, no CI configured? Say that the babysit loop has nothing to watch and stop, instead of polling forever.
  • 最重要的原则: 不要让评审反馈使PR超出用户的初始目标。解决真正的问题,避免范围蔓延。如果评审者要求增加内容,将其记录为后续任务而非直接在当前PR中实现。
  • 如果有重叠的PR导致当前PR过时:停止操作,报告情况,并在关闭前询问——除非明确授权关闭。
  • 绝不要强制推送覆盖分支上其他人的提交。
  • 没有评审者、没有机器人、未配置CI?说明值守循环没有可监控的内容并停止,而非持续轮询。

Reporting

汇报

When done (or blocked), report in one short block: final check status, what was fixed, which comments were dismissed and why.
完成(或受阻)时,用一段简短内容汇报:最终检查状态、修复了哪些问题、哪些评论被驳回及原因。