Skip to content

docs(ci): explain why the review-pr sweep needs a whole-workspace quarantine - #10493

Open
CanReader wants to merge 1 commit into
QwenLM:mainfrom
CanReader:fix/ci-review-pr-qwen-sweep
Open

docs(ci): explain why the review-pr sweep needs a whole-workspace quarantine#10493
CanReader wants to merge 1 commit into
QwenLM:mainfrom
CanReader:fix/ci-review-pr-qwen-sweep

Conversation

@CanReader

@CanReader CanReader commented Aug 29, 2026

Copy link
Copy Markdown

What this PR does

Rewrites the comment above the quarantine fallback in the review-pr job's
Clean stale .qwen before checkout step. Comment only, zero executable lines
change.

Why it's needed

I opened this against #10392 by mistake. The sweep that issue asks for is
already on main: #10214 (commit 379bef96) added it to this workflow along
with the cleanIdx < checkoutIdx pin in
scripts/tests/review-worktree-cleanup-workflow.test.js, even though its
description said it was scoped to ci.yml. Nothing here changes behaviour, so
the Fixes link is gone and #10392 should be closed against #10214 instead.

What's left is still worth keeping on its own. The old comment stated the
fallback but not the reason it exists:

# If a foreign-owned directory cannot move to a different parent,
# quarantine the runner-owned workspace and recreate the checkout
# root. Warm contents are lost only on this unrecoverable path.

Reading that, the fallback looks redundant, since the mv right above it
already targets a writable parent. The missing piece is that renaming a
directory across parents also needs write permission on the directory being
moved, because the kernel has to update its .. entry. For a root-owned
.qwen.root-orig the runner does not have that, and the preceding
chmod -R u+w cannot grant it either, so the individual mv fails with
EACCES even though the workspace parent is perfectly writable. That is the
case the whole-workspace quarantine exists to catch, and it was not obvious
from the code.

Reviewer Test Plan

How to verify

Read the diff. It touches # lines only. The comment-stripped run: body is
byte-identical to main:

git numstat main..HEAD -> 6 3 .github/workflows/qwen-code-pr-review.yml

Evidence (Before & After)

N/A (comment-only change)

Tested on

OS Status
🍏 macOS N/A
🪟 Windows N/A
🐧 Linux

Risk & Scope

  • Main risk or tradeoff: None. No executable line changes.
  • Not validated / out of scope: The sweep's runtime behaviour, unchanged here and covered by the existing structural test.
  • Breaking changes / migration notes: None

Linked Issues

None. The actual fix for #10392 shipped in #10214.

中文说明

仅改写 review-pr 任务中 Clean stale .qwen before checkout 步骤里 quarantine
兜底逻辑上方的注释,无任何可执行行变化。

本 PR 最初错误地关联了 #10392。该 issue 要求的清理逻辑其实已经在 main
#10214,commit 379bef96),因此已移除 Fixes 关联,#10392 应改为指向
#10214 关闭。

保留注释改写的理由:旧注释只说明了兜底行为,没有说明它为何存在。关键点在于,
跨父目录重命名目录还需要对被移动目录本身有写权限(内核需更新其 .. 项)。
对 root 所有的 .qwen.root-orig,runner 不具备该权限,前面的 chmod -R u+w
也无法赋予,因此即使工作区父目录可写,单独的 mv 仍会以 EACCES 失败。这正是
整体工作区 quarantine 所要处理的场景,而这一点从代码中并不显而易见。

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Qwen Triage finishedview run. See the stage comments in this thread for the result.

Qwen Triage 已完成 —— 查看运行。结果见本线程中的各阶段评论。

@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.

@CanReader thanks for the PR — but the gap it describes is already fixed on main, and the diff doesn't match the description.

  • The fix already landed. #10214 (merged today 10:33 UTC as commit 379bef96) added exactly this sweep to the review-pr job: the Clean stale .qwen before checkout step running the chmod → rm → sudo rm → quarantine loop over both .qwen and .qwen.root-orig, placed before Checkout base branch — plus the structural test pin asserting cleanIdx < checkoutIdx in scripts/tests/review-worktree-cleanup-workflow.test.js. #10214's description said its diff was scoped to the three ci.yml copies, but the merged PR also modified qwen-code-pr-review.yml (+47 lines). Everything #10392 asks for is already on the default branch; the issue is simply still open.
  • The actual diff here is comment-only. The entire change is a 3-line → 6-line rewording of the quarantine-fallback comment inside the sweep (+6/−3, zero functional change). The sweep and the test the description references are not added by this PR — they are already in the base.
  • Why request changes: merging as-is would auto-close #10392 via a PR that doesn't contain the fix, misattributing the history. Two reasonable paths forward:
    • Close this PR; a maintainer can then close #10392 pointing at #10214, since the fix is already live.
    • If you think the comment rewording is worth keeping on its own merits, re-purpose this PR with an accurate title/description and drop the Fixes #10392 link.
中文说明

@CanReader 感谢提交 —— 但这个 PR 描述的缺口已经在 main 上修复了,而且 diff 与描述不符。

  • 修复已经合入。 #10214(今天 10:33 UTC 合入,commit 379bef96)已经把这个清理逻辑加进了 review-pr 任务:Clean stale .qwen before checkout 步骤,对 .qwen.qwen.root-orig 两个名字执行 chmod → rm → sudo rm → quarantine 循环,位于 Checkout base branch 之前 —— 同时还在 scripts/tests/review-worktree-cleanup-workflow.test.js 中加了断言 cleanIdx < checkoutIdx 的结构测试。虽然 #10214 的描述说它只改了三份 ci.yml,但合入的版本实际也修改了 qwen-code-pr-review.yml(+47 行)。#10392 要求的内容已经全部在默认分支上,issue 只是还没被关闭。
  • 这里的实际 diff 只是注释改写。 全部改动是把 sweep 中 quarantine 兜底路径的 3 行注释改写成 6 行(+6/−3,零功能变化)。描述中提到的 sweep 和结构测试都不是这个 PR 加的 —— 它们已经在 base 里了。
  • 为什么 request changes: 按现状合入会通过一个不包含修复的 PR 自动关闭 #10392,造成历史归属错误。两个合理的处理方式:
    • 关闭本 PR,由维护者指向 #10214 关闭 #10392(修复已生效)。
    • 如果你认为这个注释改写本身值得保留,请把 PR 改成准确的标题/描述,并去掉 Fixes #10392 关联。

Qwen Code · qwen3.8-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.

Not explored to full depth (tool budget reached): "agent 6b": none — no check was cut short by the tool ceiling..

Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.

中文说明

未探索到全部深度(达到工具调用预算):"agent 6b"none — no check was cut short by the tool ceiling.

未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。

— qwen3.8-max via Qwen Code /review (v0.22.3)

Comment thread .github/workflows/qwen-code-pr-review.yml
@CanReader CanReader changed the title fix(ci): extend qwen leftover sweep to the review-pr job docs(ci): explain why the review-pr sweep needs a whole-workspace quarantine Aug 29, 2026
…rantine

The old comment stated the fallback but not the reason it exists, which makes
it read as redundant next to the mv right above it.

Renaming a directory across parents also needs write permission on the
directory being moved, because the kernel updates its .. entry. The runner
does not have that on a root-owned .qwen.root-orig and the preceding
chmod -R u+w cannot grant it, so the individual mv fails with EACCES even
though the workspace parent is writable. That is the case the whole-workspace
quarantine catches.

Comment only, no executable line changes.
@CanReader
CanReader force-pushed the fix/ci-review-pr-qwen-sweep branch from d0b25cf to 4fc011d Compare August 29, 2026 13:54
@github-actions

Copy link
Copy Markdown
Contributor

Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration.

中文

请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。

@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.

Partially reviewed — gaps disclosed.

Not reviewed: reverse audit — stopped before round 1 by the review time budget.

Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.

中文说明

仅完成部分审查,审查缺口已披露。

未审查:反向审计——评审时间预算不足,未能开始第 1 轮。

未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。

— qwen3.8-max via Qwen Code /review (v0.22.3)

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.

2 participants