Skip to content

ci(workflows): remind authors not to force-push active PRs - #6035

Merged
yiliang114 merged 7 commits into
QwenLM:mainfrom
wenshao:ci/pr-force-push-reminder
Jun 30, 2026
Merged

ci(workflows): remind authors not to force-push active PRs#6035
yiliang114 merged 7 commits into
QwenLM:mainfrom
wenshao:ci/pr-force-push-reminder

Conversation

@wenshao

@wenshao wenshao commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Adds a lightweight GitHub Actions workflow that watches open pull requests and, when a contributor rebases or force-pushes the PR branch, posts a one-time reminder comment asking them not to force-push (because it invalidates existing inline review comments) and noting that the integration bots squash all changes into a single commit automatically on merge. The reminder is bilingual — English with a collapsed Chinese translation.

It distinguishes a force-push from a normal push by comparing the before and after SHAs carried on the pull_request_target synchronize event: a behind or diverged compare status means history was rewritten (force-push), while ahead/identical is a normal push and is ignored. The comment is posted at most once per PR (guarded by a hidden HTML marker and full comment-list pagination), pushes initiated by bots are skipped, and a failed comparison is treated conservatively (no comment) so the bot never makes a false accusation.

Why it's needed

Contributors frequently rebase or force-push their PR branches, which silently invalidates existing inline review comments and makes re-review harder. Since the integration bots squash everything into a single commit on merge anyway, force-pushing to "clean up" history is unnecessary. An automatic, friendly, once-per-PR reminder reduces this churn without a maintainer having to leave the same comment by hand each time.

Reviewer Test Plan

How to verify

This is a CI-only change (a single new workflow file). It cannot execute until it lands on the base branch, because pull_request_target always runs the workflow definition from the target branch — so a reviewer confirms it via static validation plus a post-merge smoke test. Static validation performed locally (macOS):

  • actionlint .github/workflows/pr-force-push-reminder.yml → passes.
  • yamllint --format github with the repo's .yamllint config → passes (same result as the existing workflows).
  • The embedded github-script body, wrapped in an async function exactly as github-script runs it, passes node --check.

After merge, behavior can be confirmed on a throwaway PR: pushing additional commits produces no comment (compare status ahead); git commit --amend && git push --force or a rebase produces exactly one reminder comment; a second force-push produces no duplicate (the marker is detected).

Evidence (Before & After)

N/A — non–user-visible CI workflow; its only output is a PR comment posted after the workflow is on the base branch.

Tested on

OS Status
🍏 macOS ✅ (actionlint + yamllint + node --check)
🪟 Windows N/A
🐧 Linux N/A (workflow executes only on GitHub-hosted ubuntu-latest)

Environment (optional)

N/A — static lint validation only; the workflow itself has no local runtime.

Risk & Scope

  • Main risk or tradeoff: it posts a comment on force-push. Mitigated by the once-per-PR marker, skipping bot senders, and the conservative skip-on-compare-failure. It uses pull_request_target but never checks out or executes PR code (it only calls the GitHub REST API), so there is no pwn-request exposure. Permissions are minimal: contents: read, pull-requests: write.
  • Not validated / out of scope: end-to-end behavior on a live PR (cannot run until the workflow is on the base branch).
  • Breaking changes / migration notes: none. Additive workflow only.

Linked Issues

N/A

中文说明

这个 PR 做了什么

新增一个轻量的 GitHub Actions workflow,监听处于打开状态的 PR;当贡献者对 PR 分支执行 rebase 或 force-push 时,自动发一条一次性提醒评论,请其不要 force-push(因为会使已有的行内评审评论失效),并说明集成机器人在合并时本就会自动把所有改动压缩(squash)成单个提交。提醒为双语——英文正文 + 折叠的中文翻译。

它通过比较 pull_request_targetsynchronize 事件所携带的 beforeafter 两个 SHA 来区分 force-push 与普通推送:compare 状态为 behinddiverged 表示历史被改写(force-push),而 ahead/identical 是普通推送、直接忽略。评论每个 PR 最多发一次(用隐藏 HTML 标记 + 全量评论分页去重)、跳过由机器人发起的推送、比较失败时保守处理(不发评论),以确保不会误伤。

为什么需要

贡献者经常 rebase 或 force-push 自己的 PR 分支,这会悄无声息地使已有的行内评审评论失效、增加重新评审的成本。既然集成机器人在合并时本就会把所有改动 squash 成单个提交,为"整理"历史而 force-push 是没必要的。一条自动、友好、每个 PR 仅一次的提醒可以减少这类来回,而不需要维护者每次手动留同样的评论。

评审验证计划

如何验证

这是一个纯 CI 改动(仅新增一个 workflow 文件)。在它进入基准分支之前无法运行,因为 pull_request_target 始终使用目标分支上的 workflow 定义——因此评审者通过静态校验 + 合并后冒烟测试来确认。本地(macOS)已做的静态校验:

  • actionlint .github/workflows/pr-force-push-reminder.yml → 通过。
  • 用仓库 .yamllint 配置跑 yamllint --format github → 通过(与现有 workflow 结果一致)。
  • 将内嵌的 github-script 脚本体按 github-script 实际运行方式用 async 函数包裹后,node --check → 通过。

合并后可在一个临时 PR 上确认:追加普通提交不会产生评论(compare 状态 ahead);执行 git commit --amend && git push --force 或 rebase 会产生恰好一条提醒评论;再次 force-push 不会重复发(标记被检测到)。

证据(前/后对比)

N/A — 非用户可见的 CI workflow;其唯一输出是在 workflow 进入基准分支后于 PR 上发的评论。

测试平台

见上方表格:macOS 已做静态 lint 校验;workflow 本身只在 GitHub 托管的 ubuntu-latest 上运行。

运行环境(可选)

N/A — 仅静态 lint 校验,workflow 本身没有本地运行时。

风险与范围

  • 主要风险/权衡:会在 force-push 时发评论。已通过"每 PR 一次"标记、跳过机器人发起者、比较失败保守跳过来缓解。使用了 pull_request_target,但从不 checkout 或执行 PR 代码(只调用 GitHub REST API),因此不存在 pwn-request 风险。权限最小化:contents: readpull-requests: write
  • 未验证 / 范围外:在真实 PR 上的端到端行为(在 workflow 进入基准分支前无法运行)。
  • 破坏性变更 / 迁移说明:无。仅新增 workflow。

关联 Issue

N/A

Add a workflow that detects force-pushes (rebase/amend/reset) to open PRs
via the pull_request_target synchronize event and posts a one-time,
bilingual reminder that force-pushing invalidates existing review comments
and that the integration bots squash all changes into a single commit
automatically. A normal push (compare status "ahead") is ignored; the
reminder is posted at most once per PR, bot-initiated pushes are skipped,
and a failed compare is treated conservatively (no comment).
@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR — and thanks for pushing the Round 3 follow-up with the test file and addressing all the inline threads!

Template looks good ✓

On direction: this solves a real maintainer pain point — force-pushing silently invalidates inline review comments, and since we squash on merge anyway, there's no reason contributors should need to rewrite history. Lightweight CI automation like this is squarely within scope.

On approach: scope is tight — one workflow file, one test file, does exactly what it says. The Round 3 additions are well-targeted: 12 structural assertions lock in all the critical design decisions (3-dot compare, marker author check, KNOWN_AUTOMATION sync), and the core.error + rethrow wrapping on listComments closes the last unhandled API call. The concurrency-group removal is a deliberate trade-off (idempotency from the marker, not serialization) and the test asserts it. Moving on to code review. 🔍

中文说明

感谢贡献——也感谢后续补上的第三轮跟进,测试文件和对 inline 讨论的处理都已到位!

模板完整 ✓

方向:解决了维护者的真实痛点——force-push 会使行内评审评论静默失效,而既然合并时本就会 squash,贡献者没有必要重写历史。这类轻量 CI 自动化完全在项目范围内。

方案:范围精准——一个 workflow 文件、一个测试文件,只做描述中的事。第三轮的补充针对性很强:12 条结构断言锁定了所有关键设计决策(3-dot 比较、标记作者校验、KNOWN_AUTOMATION 同步),listComments 上的 core.error + rethrow 包装补上了最后一个未处理的 API 调用。取消并发组是有意为之的取舍(幂等性靠标记而非串行化),测试也对此做了断言。进入代码审查 🔍

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Code Review

Re-reviewed both files against the latest Round 3 commits (through be9e2db). All prior threads addressed.

Workflow (.github/workflows/pr-force-push-reminder.yml, 162 lines):

  • pull_request_target safety: no PR code checkout — only REST API calls via github-script. No pwn-request exposure. ✓
  • Force-push detection: 3-dot compare (${before}...${after}) on the base repo. 2-dot would 404; the test guards against regression. ✓
  • Dedup: marker <!-- pr-force-push-reminder --> checked only on github-actions[bot]'s own comments — prevents third-party suppression. Full pagination via github.paginate. ✓
  • Error handling: all three API calls (compare, listComments, createComment) wrapped with core.error + rethrow. 404 on compare skips conservatively; other errors fail the run loudly. ✓
  • KNOWN_AUTOMATION sync: verified against live qwen-autofix.yml on main — the set ["qwen-code-ci-bot", "qwen-code-dev-bot", "github-actions", "github-actions[bot]", "gemini-cli-robot"] matches exactly. KEEP-IN-SYNC note and mechanical test assertion both in place. ✓
  • No concurrency group: intentional — documented in a clear comment explaining the trade-off (marker-based idempotency vs. serialization). Test asserts absence. ✓
  • Permissions: contents: read, issues: write, pull-requests: write. The issues: write is needed because PR comments go through the Issues API. Minimal for the endpoints used. ✓
  • Repo guard: github.repository == 'QwenLM/qwen-code' prevents fork self-runs. ✓

Test (scripts/tests/pr-force-push-reminder-workflow.test.js, 130 lines):

12 assertions covering trigger, repo guard, permissions, concurrency absence, SHA pin, zero-SHA guard, bot skip, 3-dot compare, 404 handling, marker author check, error logging, and bilingual body. Wired into CI via test:scriptstest:ci. Each assertion has a comment explaining why it matters, not just what it checks.

No critical blockers. No AGENTS.md violations. Follows project YAML conventions (single-quoted strings, 2-space indent, matches style of existing workflows).

Static Validation

This is a CI-only workflow that cannot execute until it lands on the base branch (pull_request_target always runs from the target branch). tmux real-scenario testing is N/A — there's no local CLI output; the only artifact is a PR comment posted by the GitHub API.

$ yamllint -c .yamllint.yml .github/workflows/pr-force-push-reminder.yml
(no output — all checks pass)

$ node --check (wrapped github-script body)
(no output — syntax valid)

$ vitest run scripts/tests/pr-force-push-reminder-workflow.test.js
 ✓ scripts/tests/pr-force-push-reminder-workflow.test.js (12 tests) 6ms
 Test Files  1 passed (1)
      Tests  12 passed (12)
   Duration  357ms

KNOWN_AUTOMATION sync verified against live qwen-autofix.yml on main:

KNOWN_BOTS: '["qwen-code-ci-bot", "qwen-code-dev-bot", "github-actions", "github-actions[bot]", "gemini-cli-robot"]'

Matches the PR's KNOWN_AUTOMATION set exactly. ✓

tmux Real-Scenario Testing

N/A — This workflow produces no local CLI output. Its only artifact is a PR comment posted by the GitHub API after a force-push event. Behavior can only be validated post-merge on a throwaway PR (as described in the Reviewer Test Plan).

中文说明

代码审查

基于最新的第三轮提交(至 be9e2db)重新审查了两个文件。所有之前的 inline 讨论均已处理。

Workflow(162 行):pull_request_target 安全性 ✓、3-dot 比较 force-push 检测 ✓、仅信任自身 bot 标记的去重 ✓、三个 API 调用均有 core.error + rethrow 的错误处理 ✓、KNOWN_AUTOMATION 与线上 qwen-autofix.yml 完全匹配 ✓、无并发组(有意为之)✓、权限最小化 ✓、仓库守卫 ✓。

测试(130 行):12 条断言覆盖触发器、仓库守卫、权限、并发缺失、SHA 锁定、零 SHA 守卫、机器人跳过、3-dot 比较、404 处理、标记作者校验、错误日志、双语正文。通过 test:scriptstest:ci 接入 CI。

无关键阻塞项。无 AGENTS.md 违规。

静态验证

纯 CI workflow,在进入基准分支前无法执行。tmux 真实场景测试不适用。yamllint、JS 语法校验均通过,12 条结构测试全部通过。KNOWN_AUTOMATION 同步已对照线上 qwen-autofix.yml 验证。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

This PR has come a long way through the review cycles. The Round 3 follow-up (7 commits, through be9e2db) addressed every outstanding thread: the test file locks in all the critical design decisions, the listComments error handling is now consistent with the other two API calls, and the KNOWN_AUTOMATION sync note + mechanical test assertion prevents future drift.

Stepping back: the motivation is genuine, the implementation is correct, and the test coverage is thorough for a workflow file (12 structural assertions is more than most CI changes get). The no-concurrency-group decision is well-reasoned and documented. The security model is sound — pull_request_target without checkout, only REST API calls, no pwn-request exposure. If I had to maintain this in six months, the test file alone would tell me everything I need to know about why each design choice was made.

Approving. ✅

中文说明

这个 PR 经过多轮评审已经非常完善。第三轮跟进(7 个提交,至 be9e2db)处理了所有未解决的 inline 讨论:测试文件锁定了所有关键设计决策,listComments 的错误处理与其他两个 API 调用一致,KNOWN_AUTOMATION 同步注释加机械化测试断言防止未来的偏移。

回顾:动机真实、实现正确、测试覆盖对于一个 workflow 文件来说很充分(12 条结构断言比大多数 CI 改动都要多)。无并发组的决策经过充分论证并有文档说明。安全模型健全——pull_request_target 不 checkout 代码、只调用 REST API、无 pwn-request 风险。如果六个月后需要维护,测试文件本身就能告诉我每个设计选择的原因。

批准。✅

Qwen Code · qwen3.7-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
Comment thread .github/workflows/pr-force-push-reminder.yml
…ancel

- Add `issues: write`: the listComments/createComment calls go through the
  Issues API; declaring it matches the repo's other PR-commenting workflows
  and avoids any risk of a 403 making the workflow inert.
- Set `cancel-in-progress: false`: an in-flight run that already detected a
  force-push must finish and post. The concurrency group still serializes
  runs per PR, and the once-per-PR marker prevents duplicates, so later
  pushes queue and then no-op instead of cancelling (and silently dropping)
  a pending reminder.
Comment thread .github/workflows/pr-force-push-reminder.yml
Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
Comment thread .github/workflows/pr-force-push-reminder.yml
Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
Comment thread .github/workflows/pr-force-push-reminder.yml
Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
- Marker dedup now requires the comment to be from github-actions[bot], so a
  user pasting the marker string into a comment can't suppress reminders.
- Skip known automation logins (qwen-code-dev-bot et al.) that push via PAT as
  sender.type 'User', not just GitHub App bots (mirrors qwen-autofix KNOWN_BOTS).
- Narrow the compare catch to 404 (orphaned old tip -> skip); rethrow other
  errors so auth/rate failures go red instead of silently no-op'ing.
- Wrap createComment with structured error logging + rethrow.

Kept 3-dot compare and base-repo owner: verified that 3-dot returns
diverged/behind for force-pushes and that the base repo resolves fork-PR
commits, while the suggested 2-dot syntax 404s in the REST API.

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Downgraded from Request changes to Comment: self-PR.

— qwen3.7-max via Qwen Code /review

Comment thread .github/workflows/pr-force-push-reminder.yml

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Downgraded from Approve to Comment: CI still running.

[Suggestion] No test file found at scripts/tests/pr-force-push-reminder-workflow.test.js. The repo has established precedent (qwen-autofix-workflow.test.js, qwen-triage-workflow.test.js, qwen-resolve-workflow.test.js) — all use structural YAML assertions against workflow files. Consider adding a test that asserts the concurrency group, repo guard, KNOWN_AUTOMATION sync with qwen-autofix.yml, zero-SHA guard, 404-vs-rethrow branching, marker idempotency check, and timeout-minutes.

— qwen3.7-max via Qwen Code /review

Comment thread .github/workflows/pr-force-push-reminder.yml
Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
- Add scripts/tests/pr-force-push-reminder-workflow.test.js (runs under
  test:scripts, which CI chains into test:ci). It asserts the trigger, repo
  guard, permissions, serialized concurrency, KNOWN_AUTOMATION sync with
  qwen-autofix, the 3-dot compare on the base repo, 404-vs-rethrow, the marker
  author check, and the bilingual body — locking in the reviewed behaviors.
- Wrap the listComments paginate call in the same core.error + rethrow the
  other two API calls already use.
- Note that KNOWN_AUTOMATION must stay in sync with qwen-autofix.yml KNOWN_BOTS.
@wenshao

wenshao commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

Round 3 follow-up — pushed 48b6c46:

  • Added scripts/tests/pr-force-push-reminder-workflow.test.js (12 structural assertions; runs under test:scripts, which CI chains into test:ci). It locks in the trigger, repo guard, permissions, serialized concurrency, KNOWN_AUTOMATION sync, the 3-dot compare on the base repo, 404-vs-rethrow, the marker author check, and the bilingual body.
  • Wrapped the listComments call in core.error + rethrow for consistency with the other two API calls.
  • Added the KEEP-IN-SYNC note on KNOWN_AUTOMATION.

The re-raised 3-dot [Critical] is a false positive, verified against the live API (3-dot returns diverged/behind; the suggested 2-dot .. 404s in the REST API). The new test now guards against a regression to 2-dot. Other inline threads addressed individually.

中文

第三轮跟进 —— 已推 48b6c46

  • 新增 scripts/tests/pr-force-push-reminder-workflow.test.js(12 条结构断言;由 test:scripts 运行,CI 在 test:ci 中串联它)。固化了触发器、仓库守卫、权限、串行并发、KNOWN_AUTOMATION 同步、base 仓库上的 3-dot compare、404-vs-rethrow、标记作者校验、双语正文。
  • listComments 调用包进 core.error + rethrow,与另两个 API 调用保持一致。
  • KNOWN_AUTOMATION 加了 KEEP-IN-SYNC 注释。

被重新提出的 3-dot [Critical] 是误报,已对线上 API 验证(3-dot 返回 diverged/behind;建议的 2-dot .. 在 REST API 会 404)。新测试现在防止有人退回 2-dot。其余 inline 线程已逐条处理。

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Downgraded from Request changes to Comment: self-PR.

— gpt-5 via Qwen Code /review

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Downgraded from Request changes to Comment: self-PR; CI still running.

— gpt-5 via Qwen Code /review

Comment thread .github/workflows/pr-force-push-reminder.yml Outdated
A concurrency group keeps at most one pending run per group, so a burst of
pushes can cancel a still-pending force-push run before it reaches the script,
dropping the reminder this workflow exists to post. Remove the group entirely:
every synchronize event now runs independently and is always evaluated, and the
once-per-PR marker provides idempotency. A rare double-post on two
near-simultaneous first force-pushes is the acceptable cost of never silently
missing one. Update the structural test to assert there is no concurrency block.

The reviewer's suggested `queue: max` is not a valid GitHub Actions concurrency
key (only `group`/`cancel-in-progress` are allowed) and fails actionlint.
DragonnZhang
DragonnZhang previously approved these changes Jun 30, 2026

@DragonnZhang DragonnZhang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review pass (round 4): All previously raised findings (cancel-in-progress race, marker author verification, bot sender coverage, error swallowing, paginate/createComment error handling, missing issues: write, fork compare, 3-dot syntax) have been addressed in commits through 48b6c46. The workflow and test file are structurally sound. No new high-confidence findings. LGTM.

@wenshao

wenshao commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

Comment thread scripts/tests/pr-force-push-reminder-workflow.test.js Outdated
Comment thread scripts/tests/pr-force-push-reminder-workflow.test.js

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

Comment thread scripts/tests/pr-force-push-reminder-workflow.test.js Outdated
- Switch the copyright header to the prevailing `Qwen Team` (14 of 17 sibling
  test files use it; this file had copied an older Google LLC header).
- Assert the idempotency skip log line so removing the marker guard fails a test.
@wenshao
wenshao dismissed stale reviews from qwen-code-ci-bot and DragonnZhang via 3ba3169 June 30, 2026 13:38
Read qwen-autofix.yml's KNOWN_BOTS and assert each login is also skipped here,
so adding a bot there without updating this workflow fails the test instead of
silently drifting. Replaces the hardcoded login list whose comment overclaimed
that the sync was verified.
@wenshao

wenshao commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from code review. I re-checked the latest head (be9e2db) and found no remaining blockers.

Targeted validation passed: actionlint, yamllint, embedded github-script syntax parsing, and the new structural workflow test (12/12). CI still has pending jobs, but the workflow/test changes look ready from code review.

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

@wenshao
wenshao enabled auto-merge June 30, 2026 14:03
@wenshao
wenshao added this pull request to the merge queue Jun 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 30, 2026
@yiliang114
yiliang114 added this pull request to the merge queue Jun 30, 2026
Comment thread .github/workflows/pr-force-push-reminder.yml
Comment thread scripts/tests/pr-force-push-reminder-workflow.test.js

it('only trusts the dedup marker on its own bot comment', () => {
// Otherwise any user could suppress all future reminders by pasting the
// marker string into a comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The dedup-marker test asserts the marker string, bot identity checks, and the skip message, but never asserts that comment listing uses github.paginate() rather than a single-page listComments call. The workflow deliberately chose paginate to handle PRs with >100 comments — if someone "simplifies" the call to a single-page fetch, the dedup check would silently miss the marker on busy PRs and post duplicate reminders.

    expect(workflow).toContain('github.paginate(');

— qwen3.7-max via Qwen Code /review

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e9fcc31 — added expect(workflow).toContain('github.paginate(') to the dedup test, so simplifying the listing to a single-page fetch (which would miss a marker buried past comment 100 and post a duplicate) now fails the test.

中文

已在 e9fcc31 修复——给去重测试加了 expect(workflow).toContain('github.paginate('),这样把列举简化成单页拉取(会漏掉第 100 条之后被淹没的标记并重复发帖)现在会让测试失败。

Merged via the queue into QwenLM:main with commit 52f875a Jun 30, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants