fix(triage): diff the flake-gate file list against the pinned base OID - #9464
Conversation
The "Record changed test files for the flakiness gate" step runs its `git diff 'HEAD^1' HEAD` inside the env -i scrubbed child. On the persistent pool, resolving the `^1` parent there intermittently fails with "Could not access 'HEAD^1'" — the shallow merge-ref object store is left unreadable by prior `--depth=2` fetches — which takes down the whole verify lane. The "Pin agent inputs" step already captures the base OID to $RUNNER_TEMP/verify-base-oid while .git is still root-owned. Diff against that content-addressed OID instead of re-resolving the parent: it needs no parent walk and is the same value the workflow already trusts for its post-build re-pin. Add a pin asserting the record step reads the recorded OID rather than re-deriving HEAD^1.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Thanks @yiliang114 — the underlying problem is real and verified: both linked Qwen Triage runs on #9432 (32222732873 and 32222952508) failed in their verify job with error: Could not access 'HEAD^1' (confirmed in the job log — the record step dies right after the env -i scrub re-exec, exactly as described). Diffing against the already-pinned base OID instead of re-resolving the parent is a sensible direction. Before this moves to code review, one housekeeping item: the PR body doesn't use the repository's pull request template.
Merged PRs here follow that template consistently, and reviewers rely on the fixed sections to find what they need. ## What this PR does is there, but the rest of the required headings are missing:
## Why it's needed— the body carries## WhyHEAD^1is fragile hereinstead## Reviewer Test Plan(with### How to verify,### Evidence (Before & After), and the### Tested onOS table) — the body carries## Verificationinstead## Risk & Scope## Linked Issues— the body carries## Referencesinstead- the Chinese translation inside
<details>— the template asks for the full body to be mirrored in Chinese
Nearly everything is already written in the current body — the what/why prose, the failure links, the node --test verification — so this should be a reformat rather than a rewrite. Please restructure it into the template sections: https://github.com/QwenLM/qwen-code/blob/main/.github/pull_request_template.md
One note while you're at it: the Tested on table wants ✅ /
Once the body follows the template, a re-run (@qwen-code /triage) will pick it up and continue the review. 🙏
中文说明
感谢 @yiliang114 —— 底层问题真实存在且已核实:#9432 上链接的两次 Qwen Triage 运行(32222732873 和 32222952508)均在 verify job 中以 error: Could not access 'HEAD^1' 失败(已在 job 日志中确认——record 步骤恰好在 env -i scrub 重新 exec 之后挂掉,与 PR 描述完全一致)。用已经固定下来的 base OID 做 diff、而不是重新解析父提交,方向是合理的。在进入代码审查之前,有一个流程问题:这个 PR 的正文没有使用本仓库的 pull request 模板。
本仓库已合并的 PR 都遵循该模板,reviewer 依赖这些固定章节来快速定位所需信息。## What this PR does 已有,但其余必需章节缺失:
## Why it's needed—— 正文目前用的是## WhyHEAD^1is fragile here## Reviewer Test Plan(含### How to verify、### Evidence (Before & After)以及### Tested on操作系统表格)—— 正文目前用的是## Verification## Risk & Scope## Linked Issues—— 正文目前用的是## References<details>中的中文翻译 —— 模板要求将正文完整翻译为中文
其实所需内容在现有正文里都已经写到了——改动与动机描述、失败链接、node --test 验证——所以只需重新排版,不必重写。请按模板章节重新组织:https://github.com/QwenLM/qwen-code/blob/main/.github/pull_request_template.md
另外提醒一点:Tested on 表格需要按操作系统标注 ✅ /
正文符合模板后,重新触发(@qwen-code /triage)即可继续审查。🙏
— Qwen Code · qwen3.8-max
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Released in v0.21.15. |
What this PR does
The "Record changed test files for the flakiness gate" step runs
git diff 'HEAD^1' HEADinside theenv -iscrubbed child. On the persistent pool, resolving the^1parent there intermittently fails witherror: Could not access 'HEAD^1', which takes down the whole verify lane (observed on #9432: runs 32222732873 and 32222952508).The "Pin agent inputs" step already captures the base OID to
$RUNNER_TEMP/verify-base-oidwhile.gitis still root-owned. This PR diffs against that content-addressed OID instead of re-resolvingHEAD^1— no parent walk, and it's the exact value the workflow already trusts for its post-build re-pin. The OID is guarded by a hex-shape check (mirroring the existing post-build re-pin), and the test pins are updated to match.Why it's needed
The step runs after the one-shot
env -ire-exec (the startup-channel scrub). ResolvingHEAD^1requires re-reading the merge commit's parents off the shallow object store; prior--depth=2fetches on the persistent pool leave that store intermittently unreadable, so the parent walk fails. The OID needs no walk.Reviewer Test Plan
How to verify
Run
node --test .github/scripts/qwen-triage-workflow.test.mjs. The structural suiteqwen-triage: flakiness gate (#9125)should pass, includingrecords the changed-test list BEFORE the workspace is handed to the build user(the test containing both pins).Evidence (Before & After)
Non-user-visible CI/workflow change.
git diff 'HEAD^1' HEADand intermittently failed witherror: Could not access 'HEAD^1'(see fix(core): clarify list_agents excludes Agent Team teammates #9432 runs 32222732873 and 32222952508)."$BASE_OID" HEAD; the structural suite passes.Tested on
Environment (optional)
N/A — unit tests only.
Risk & Scope
HEAD^1unreadable. This PR only stops re-resolving the parent; it does not fix the pool.verify-base-oidvalue it already captured for the post-build re-pin.Linked Issues
No dedicated tracking issue. Fixes the flakiness-gate failure observed on #9432 (runs 32222732873, 32222952508).
中文说明
这个 PR 做了什么
"Record changed test files for the flakiness gate" 步骤在
env -i清理过的子进程里执行git diff 'HEAD^1' HEAD。在持久化 pool 上,在那里解析^1父提交会间歇性失败并报error: Could not access 'HEAD^1',进而拖垮整个 verify lane(在 #9432 上观察到:运行 32222732873 和 32222952508)。"Pin agent inputs" 步骤在
.git仍由 root 拥有时就已经把 base OID 捕获到$RUNNER_TEMP/verify-base-oid。本 PR 改为对这个内容寻址的 OID 做 diff,而不是重新解析HEAD^1—— 不需要父提交遍历,而且用的正是 workflow 在 post-build re-pin 时已经信任的那个值。OID 增加了一个十六进制形状的校验(对齐现有的 post-build re-pin),测试的精确匹配也同步更新。为什么需要
该步骤在一次性
env -i重新 exec(startup-channel scrub)之后运行。解析HEAD^1需要从 shallow object store 重新读取 merge commit 的父提交;持久化 pool 上先前的--depth=2fetch 会让那个 store 间歇性地不可读,于是父提交遍历失败。而 OID 不需要遍历。Reviewer 测试计划
如何验证
运行
node --test .github/scripts/qwen-triage-workflow.test.mjs。结构化套件qwen-triage: flakiness gate (#9125)应通过,包括records the changed-test list BEFORE the workspace is handed to the build user(包含两个 pin 的那个测试)。证据(前后对比)
非用户可见的 CI/workflow 改动。
git diff 'HEAD^1' HEAD,间歇性失败并报error: Could not access 'HEAD^1'(见 fix(core): clarify list_agents excludes Agent Team teammates #9432 的运行 32222732873 和 32222952508)。"$BASE_OID" HEAD做 diff;结构化套件通过。测试环境
环境(可选)
N/A —— 仅单元测试。
风险与范围
HEAD^1不可读的持久化 pool 底层 shallow object store 损坏问题。本 PR 只是不再重新解析父提交,并没有修复 pool。verify-base-oid值。关联 Issue
没有专门的追踪 issue。修复了在 #9432 上观察到的 flakiness-gate 失败(运行 32222732873、32222952508)。