-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(cli): don't crash startup when the output-language file is unwritable (#10453) #10455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
60c3e7b
ad6be96
9e7ee5f
71a8a44
b43c7ed
1938350
1b26a76
c3ea344
dd8a8c5
0544a11
467a4ca
edcdc23
861523b
34d61eb
d52201b
1a38d19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -517,6 +517,15 @@ Always use formal tone. | |
| expect(() => initializeLlmOutputLanguage('auto')).not.toThrow(); | ||
| }); | ||
|
|
||
| it('should not throw when the rule file cannot be created', () => { | ||
| vi.mocked(fs.existsSync).mockReturnValue(false); | ||
| vi.mocked(fs.mkdirSync).mockImplementation(() => { | ||
|
Comment on lines
+520
to
+522
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-2: The new test pins the creation-path catch only via a In the exact environment this PR targets where it('should not throw when the rule file cannot be created (write failure)', () => {
vi.mocked(fs.existsSync).mockReturnValue(false);
vi.mocked(fs.writeFileSync).mockImplementation(() => {
throw new Error('EROFS: read-only file system');
});
expect(() => initializeLlmOutputLanguage()).not.toThrow();
});Witness: The added test is its own acceptance criterion: removing the creation-path catch (or narrowing the try so 中文说明R1-2:新测试只通过 在本 PR 针对的确切环境中—— 见证: 新增测试本身就是验收标准:移除创建路径的 catch(或收窄 try 使 — qwen3.8-max via Qwen Code /review (v0.22.3) |
||
| throw new Error('EACCES: permission denied'); | ||
| }); | ||
|
|
||
| expect(() => initializeLlmOutputLanguage()).not.toThrow(); | ||
| }); | ||
|
|
||
| it('should normalize Chinese locale and create Chinese rule file', () => { | ||
| vi.mocked(fs.existsSync).mockReturnValue(false); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -319,5 +319,10 @@ export function initializeLlmOutputLanguage(outputLanguage?: string): void { | |
|
|
||
| // File doesn't exist or has invalid content, create it with configured language behavior | ||
| const resolved = resolveOutputLanguageOrPreserveAuto(outputLanguage); | ||
| writeOutputLanguageFile(resolved); | ||
| try { | ||
| writeOutputLanguageFile(resolved); | ||
| } catch { | ||
|
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Witness: The fix rests on the autofix claim protocol's own premise: "If the attempt fails, this claim will be withdrawn so a human can take over." (claim comment on issue #10453) — closing the issue via a PR that does not reach the tracked failure silently drops that human handover. 中文说明R1-1: 见证: 该修复依赖 autofix 认领协议自身的前提:"如果尝试失败,该认领将被撤回,以便人类接管。"(issue #10453 上的认领评论)——通过一个并未触及被跟踪失败的 PR 来关闭该 issue,会悄悄丢弃这一人类接管机制。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Witness: The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot): "If the attempt fails, this claim will be withdrawn so a human can take over." — the resolution must preserve a documented human handover; the issue's close carries no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] 见证: 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——处理方式必须保留书面的人类交接;该 issue 的关闭没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400, which failed on Witness: Suggested resolution: remove the closing keyword and reference the issue non-closing (e.g. "Part of the investigation of #10453"), or obtain an explicit maintainer ruling and document the non-attribution in the Linked Issues section (the concession already exists in Risk & Scope and currently contradicts the The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover for the unexplained run; the existing close carries no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支的一次 CI 运行(运行 33228441400)在任何测试结果上报之前失败。用变更后的工作流回放该次运行:其失败的测试前步骤(docker 通道、npm、构建、打包)均未被本 diff 触及——diff 只有启动期语言文件守卫及其测试——且在 HOME 可写的主机上新加的 try/catch 根本不会触发,因此被跟踪运行的每一个环节都与之前完全相同。合并后,项目历史会把本 PR 记录为运行 33228441400 的解决方式,而其原因仍未诊断。失败家族被证明仍在持续:后续跟踪 issue #10473 显示完全相同的"没有任何测试结果上报"特征再次出现,且该处的 autofix 认领已被撤回。认领协议承诺的人类交接——"如果尝试失败,该认领将被撤回,以便人类接管"——在 #10453 上始终没有兑现:该 issue 被人工关闭(yiliang114,2026-08-29T06:43:14Z),没有任何撤回评论、没有理由, (见证见上方英文部分 Witness 代码块。) 建议处理方式:移除关闭关键字(改为非关闭引用,例如"属于 #10453 调查的一部分"),或取得维护者的明确裁决并在 Linked Issues 部分记录非归因(该让步已存在于 Risk & Scope,目前与同一描述中的 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须为这次无法解释的运行保留书面的人类交接;现有关闭没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Witness: The fix rests on a premise it must not violate: the autofix claim on issue #10453 (qwen-code-dev-bot, 2026-08-29): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover for the unexplained run. 中文说明R1-1:[certifies-falsely] [new-surface] 见证: 该修复依赖一个不得违反的前提:issue #10453 上的 autofix 认领评论(qwen-code-dev-bot,2026-08-29):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须为这次无法解释的运行保留书面的人类交接。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400. This round the run's job data was retrievable: its only failing job was Remove the closing keyword in both language sections and reference the issue non-closing (e.g. "Part of the investigation of #10453"), moving the non-attribution concession already present in Risk & Scope into Linked Issues so the body no longer contradicts itself — or obtain an explicit maintainer ruling and document the non-attribution there. Reopen #10453 or record why it was closed without a claim withdrawal; optionally promote the escalated The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — the resolution must preserve a documented human handover for the undiagnosed run; the issue's manual close carries no recorded rationale. Witness: 中文说明[Critical] R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支 CI 运行 33228441400。本轮成功取回了该运行的任务数据:其唯一失败的任务是 请在两个语言部分移除关闭关键字,改为非关闭引用(例如"属于 #10453 调查的一部分"),把已存在于 Risk & Scope 的非归因让步移到 Linked Issues 部分,使描述不再自相矛盾——或取得维护者的明确裁决并在该处记录非归因。重新打开 #10453,或记录其在没有撤回认领的情况下被关闭的原因;可选地将升级上报的 处理方式不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——处理方式必须为这次未诊断的运行保留书面的人类交接;该 issue 的人工关闭没有任何已记录的理由。 见证: — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400, which failed on Suggested resolution: remove the closing keyword and reference the issue non-closing (e.g. "Part of the investigation of #10453") in both body sections, or obtain an explicit maintainer ruling and document the non-attribution in Linked Issues (the concession already exists in Risk & Scope). Reopen #10453 or record why it was closed with the Witness: The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover for the unexplained run; the existing close carries no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支的一次 CI 运行(运行 33228441400)在任何测试结果上报之前失败。用变更后的工作流回放该次运行:本 diff 只触及启动期语言文件写入及其单元测试;该运行的测试前步骤(docker 通道、npm、构建、打包)均未改动,且在 HOME 可写的主机上新加的 try/catch 根本不会触发——因此被跟踪失败的任何一个环节的结果都不会改变。即使在作者那台 HOME 不可写的复现主机上,本 PR 自己的测试计划也承认该通道仍会停在扩展存储中第二个独立的不可写目录崩溃点。合并后,项目历史会把本 PR 记录为运行 33228441400 的解决方式,而其原因仍未诊断,且失败家族被证明仍在持续——后续跟踪 issue #10473 以完全相同的特征再次出现,并以 建议处理方式:移除关闭关键字(改为非关闭引用,例如"属于 #10453 调查的一部分",两个语言部分都要改),或取得维护者的明确裁决并在关联 Issue 部分记录非归因(该让步已存在于风险与范围部分)。重新打开 #10453,或记录其在 见证: 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须为这次无法解释的运行保留书面的人类交接;现有关闭没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400, which failed on What is NOT being asked: the guard and its test are correct and should stay exactly as they are — this finding is about the closing attribution only. Human review (comment 5482828147) verified the code clean and left this finding's disposition as a maintainer decision; previous rounds' Suggested resolution: drop the closing keyword in both language sections and reference the issue non-closing (e.g. "Part of the investigation of #10453"), or obtain an explicit maintainer ruling and document the non-attribution in Linked Issues. The escalated second crash site is tracked in #10511. Witness: The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover; the existing close carries no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支 CI 运行 33228441400,在任何测试结果上报之前失败。该次运行的任务日志显示其唯一失败是 需要明确没有要求什么:守卫本身及其测试是正确的,应原样保留——本发现只针对关闭归因。人类评审(评论 5482828147)已确认代码无 Critical,并把本发现的处置留给维护者决定;前几轮的 建议处理方式:在两个语言部分移除关闭关键字,改为非关闭引用(例如"属于 #10453 调查的一部分"),或取得维护者的明确裁决并在关联 Issue 部分记录非归因。升级上报的第二个崩溃点记录于 #10511。 (见证见上方英文部分 Witness 代码块。) 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须保留书面的人类交接;现有关闭没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover for the unexplained run; the existing close (2026-08-29T06:43:13Z, labels still Witness: 中文说明R1-1:[certifies-falsely] [new-surface] 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须为这次无法解释的运行保留书面的人类交接;现有关闭(2026-08-29T06:43:13Z,标签仍为 见证: — qwen3.8-max via Qwen Code /review (v0.23.0)
Comment on lines
+322
to
+324
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400, which failed on Witness: Suggested resolution: remove the closing keyword from both Linked Issues sections and reference the issue non-closing (e.g. "Part of the investigation of #10453"), moving the Risk & Scope concession into Linked Issues so the non-attribution is documented where the link is; alternatively obtain an explicit maintainer ruling and record it, including why the issue was closed without the claim withdrawal the protocol promises. Optionally file a follow-up issue owning the escalated The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover for the unexplained run; the existing close carries no recorded rationale and the 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支的一次 CI 运行(运行 33228441400)在任何测试结果上报之前失败。用变更后的工作流回放该次运行:其失败的测试前步骤均未改动;在 HOME 可写的主机上新加的 try/catch 根本不会触发;即使在作者的不可写 HOME 替代环境上,该通道仍会停在第二个崩溃点( (见证见上方英文部分 Witness 代码块。) 建议处理方式:移除两处 Linked Issues 中的关闭关键字,改为非关闭引用(例如"属于 #10453 调查的一部分"),并把 Risk & Scope 中的让步移入 Linked Issues,使非归因说明与链接同处;或取得维护者的明确裁决并记录下来,包括该 issue 为何在没有协议承诺的认领撤回的情况下被关闭。可选地为升级上报的 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须为这次无法解释的运行保留书面的人类交接;现有关闭没有任何已记录的理由, — qwen3.8-max via Qwen Code /review (v0.23.0) |
||
| // Creation is best-effort, like the migration above: the rule file is | ||
|
Comment on lines
+323
to
+325
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracks exactly one thing: "A main-branch CI run failed on Suggested resolution: remove the closing keyword (reference the issue non-closing, e.g. "Part of the investigation of #10453"), leave #10453 open or obtain an explicit maintainer ruling to close it with the non-attribution documented, and file a follow-up issue for the escalated Witness: The fix rests on the autofix claim protocol's own premise (claim comment on issue #10453): "If the attempt fails, this claim will be withdrawn so a human can take over." — the resolution must preserve that human handover, not close the issue out from under it. 中文说明R1-1: issue #10453 跟踪的恰好是一件事:"主分支的一次 CI 运行在任何测试结果上报之前失败,因此按提交跟踪此问题"(运行 33228441400)。本 diff 只触及启动期语言文件写入;该运行的测试前步骤(docker 通道、npm、构建、打包)均未改动,且在 HOME 可写的主机上新加的 try/catch 根本不会触发,运行结果与之前完全相同。本 PR 自己的 E2E 报告也承认:"两者都无法单独解释运行 33228441400 的'没有任何测试结果上报'特征。该次运行最可能的原因仍是测试前的步骤。"合并后,关闭关键字会把实际观察到的红色运行归档为"已修复",而其原因仍然未知,autofix 认领协议——"如果尝试失败,该认领将被撤回,以便人类接管"——被绕过:没有人接手这次无法解释的运行。此外也没有任何后续 issue 承接被升级上报的扩展存储崩溃点。守卫本身及其测试是正确的,应原样保留;缺陷在于关闭归因。 建议处理方式:移除关闭关键字(改为非关闭引用,例如"属于 #10453 调查的一部分"),让 #10453 保持打开,或取得维护者的明确裁决并在记录非归因的前提下关闭,同时为升级上报的 见证: 该修复依赖 autofix 认领协议自身的前提(issue #10453 上的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——处理方式必须保留这一人类接管机制,而不是在机制之下把 issue 关掉。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+324
to
+325
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: "A main-branch CI run failed on One development this round: issue #10453 is already CLOSED — closed by yiliang114 at 2026-08-29T06:43:14Z with no comment, no rationale, and no interaction with this PR. That pre-empts the merge-time auto-close the earlier rounds predicted, but it does not resolve the defect: the body still says Suggested resolution: remove the closing keyword (reference the issue non-closing, e.g. "Part of the investigation of #10453"), or obtain an explicit maintainer ruling and document the non-attribution in the Linked Issues section (the concession already exists in Risk & Scope; it currently contradicts the Witness: The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot): "If the attempt fails, this claim will be withdrawn so a human can take over." — the resolution must preserve a documented human handover; the existing human close (yiliang114, 2026-08-29T06:43:14Z) has no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:"主分支的一次 CI 运行在任何测试结果上报之前失败,因此按提交跟踪此问题"(运行 33228441400)。本 diff 只触及启动期语言文件写入;该运行的测试前步骤(docker 通道、npm、构建、打包)均未改动,且在 HOME 可写的主机上新加的 try/catch 根本不会触发,运行结果与之前完全相同。本 PR 自己的 Risk & Scope 也承认:"原始 CI 运行 33228441400 的确切原因无法从本环境确认……其'没有任何测试结果上报'的特征指向测试前/环境性失败,本 PR 不对 CI 机制做任何改动。"即便按本 PR 自己的假设,修复后该通道仍会失败:"在这类主机上运行仍会停在扩展存储中另一个独立的不可写目录崩溃点。" 本轮的一项进展:issue #10453 已被关闭——由 yiliang114 于 2026-08-29T06:43:14Z 关闭,没有任何评论、理由,也没有与本 PR 的任何互动。这抢先于早前几轮预测的合并时自动关闭,但并未解决缺陷本身:PR 描述仍写着 建议处理方式:移除关闭关键字(改为非关闭引用,例如"属于 #10453 调查的一部分"),或取得维护者的明确裁决并在 Linked Issues 部分记录非归因(该让步已存在于 Risk & Scope,目前与同一描述中的 见证: 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——处理方式必须保留书面的人类交接;现有的人工关闭(yiliang114,2026-08-29T06:43:14Z)没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+325
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400, which failed on On merge, project history records this PR as the resolution of run 33228441400 while the failure family provably continues (successor tracking issue #10473 is OPEN with the identical signature). The autofix claim protocol on issue #10453 — "If the attempt fails, this claim will be withdrawn so a human can take over" — was never honored: the issue was closed manually (yiliang114, 2026-08-29T06:43:14Z) with no withdrawal comment, no rationale, and the Suggested resolution: remove the closing keyword and reference the issue non-closing (e.g. "Part of the investigation of #10453"), moving the non-attribution concession already present in Risk & Scope into the Linked Issues section so the body no longer contradicts itself; or obtain an explicit maintainer ruling and document the non-attribution there. Optionally promote the escalated Witness: The resolution must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — it must preserve a documented human handover for the unexplained run; the existing manual close carries no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支的一次 CI 运行(运行 33228441400),在提交 合并后,项目历史会把本 PR 记录为运行 33228441400 的解决方式,而失败家族被证明仍在持续(后续跟踪 issue #10473 处于 OPEN 状态,特征完全相同)。issue #10453 上的 autofix 认领协议——"如果尝试失败,该认领将被撤回,以便人类接管"——始终没有兑现:该 issue 被人工关闭(yiliang114,2026-08-29T06:43:14Z),没有任何撤回评论、没有理由, 建议处理方式:移除关闭关键字(改为非关闭引用,例如"属于 #10453 调查的一部分"),把已存在于 Risk & Scope 的非归因让步移到 Linked Issues 部分,使描述不再自相矛盾;或取得维护者的明确裁决并在该处记录非归因。可选地将升级上报的 (见证见上方英文部分 Witness 代码块。) 处理方式不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——必须为这次无法解释的运行保留书面的人类交接;现有的人工关闭没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+324
to
+325
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Issue #10453 tracked exactly one thing: main-CI run 33228441400, which failed on The attribution also fails against the PR's own narrated incident. Driving the shipped build on a host whose On merge, the closing keyword archives an observed red run as resolved by a diff that the run's own log proves is unrelated, so the recorded cause stays wrong in project history and the commit that actually fixed it goes uncredited. To be explicit about what is not being asked: the guard and its test are correct and should stay exactly as they are. The pre-diff arm below crashes inside Suggested resolution: drop the closing keyword and reference the issue non-closing in both language sections of the PR body — for example "Part of the investigation of #10453: the startup crash was reproduced while surfacing it, but the tracked run 33228441400 failed on a Witness: The fix must not violate the autofix claim protocol on issue #10453 (claim comment by qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — any resolution must preserve a documented human handover for the unexplained run, and the existing close carries no withdrawal and no rationale with 中文说明R1-1:[certifies-falsely] [new-surface] issue #10453 跟踪的恰好是一件事:主分支 CI 运行 33228441400,在任何测试结果上报之前失败。该次运行唯一失败的任务是 该归因在 PR 自述的事件上同样不成立。在 合并后,关闭关键字会把一次实际观察到的红色运行归档为"由本 diff 解决",而该运行自身的日志证明两者无关——项目历史中的原因记录因此是错的,真正修复它的提交也得不到归属。 需要明确没有要求什么:守卫本身及其测试是正确的,应原样保留。下方的修改前分支在 建议处理方式:移除关闭关键字,在 PR 描述的两个语言部分改为非关闭引用——例如"属于 #10453 调查的一部分:启动崩溃是在追查该问题时复现的,但被跟踪的运行 33228441400 失败于一个由 #10456 修复的 (见证见上方英文部分 Witness 代码块。) 修复不得违反 issue #10453 上的 autofix 认领协议(qwen-code-dev-bot 于 2026-08-29T02:36:03Z 的认领评论):"如果尝试失败,该认领将被撤回,以便人类接管。"——任何处理方式都必须为这次无法解释的运行保留书面的人类交接;现有关闭既无撤回也无理由,且 — qwen3.8-max-2026-09-02 via Qwen Code /review (v0.22.3)
Comment on lines
+322
to
+325
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] R1-1: [certifies-falsely] [new-surface] Witness: Suggested resolution: drop the closing keyword in both language sections and reference the issue non-closing (e.g. "Part of the investigation of #10453"), or obtain an explicit maintainer ruling and document the non-attribution in the Linked Issues section; reopen #10453 or document why it was closed without the promised withdrawal. The fix must not violate the autofix claim comment on issue #10453 (qwen-code-dev-bot, 2026-08-29T02:36:03Z): "If the attempt fails, this claim will be withdrawn so a human can take over." — the resolution must preserve a documented human handover for the unexplained run; the existing close carries no recorded rationale. 中文说明R1-1:[certifies-falsely] [new-surface] 建议处理方式:在两个语言版本中移除关闭关键字(改为非关闭引用,例如"属于 #10453 调查的一部分"),或取得维护者的明确裁决并在 Linked Issues 部分记录非归因;重新打开 #10453,或记录其在没有承诺的撤回的情况下被关闭的原因。 修复不得违反 issue #10453 上的 autofix 认领评论(qwen-code-dev-bot,2026-08-29T02:36:03Z):"如果尝试失败,该认领将被撤回,以便人类接管。"——处理方式必须为这次无法解释的运行保留书面的人类交接;现有关闭没有任何已记录的理由。 — qwen3.8-max via Qwen Code /review (v0.22.3) |
||
| // advisory, so an unwritable global dir must not crash startup. | ||
|
Comment on lines
+324
to
+326
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-3: The swallowed creation failure leaves no diagnostic trace — when the global dir is unwritable, the user's configured output language silently never takes effect. Still stands this round — the catch is still empty, and three independent audit agents re-derived the same defect independently this round. A user with } catch (err) {
debugLogger.warn('Failed to create output-language rule file:', err);
}Keep it debug-only, since writing to stderr at startup would risk corrupting TUI/ACP output. Witness: The fix must not violate an existing fact: 中文说明R1-3:被吞掉的创建失败没有留下任何诊断痕迹——当全局目录不可写时,用户配置的输出语言会悄无声息地永远不生效。本轮仍然成立——catch 依然是空的,且本轮三个独立的审计视角各自重新得出了同一缺陷。 一个设置了 见证: 修复不得违反一个既有事实:packages/core/src/utils/debugLogger.ts:143-147 中的 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+324
to
+326
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-5: By letting unwritable- On a host where try {
updateOutputLanguageFile(normalizedValue);
} catch (err) {
debugLogger.warn('Failed to write output-language.md:', err);
}— or gate Witness: The fix must not violate an existing fact: the 中文说明R1-5:通过让 在一台 见证: 修复不得违反一个既有事实: — qwen3.8-max via Qwen Code /review (v0.22.3) |
||
| } | ||
|
Comment on lines
+324
to
+327
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-3: The swallowed creation failure leaves no diagnostic trace — when the global dir is unwritable, the user's configured output language silently never takes effect. A user with Witness: The fix must not violate an existing fact: 中文说明R1-3:被吞掉的创建失败没有留下任何诊断痕迹——当全局目录不可写时,用户配置的输出语言会悄无声息地永远不生效。一个设置了 见证: 修复不得违反一个既有事实:packages/core/src/utils/debugLogger.ts:143-147 中的 — qwen3.8-max via Qwen Code /review (v0.22.3)
Comment on lines
+324
to
+327
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-5: By letting unwritable- Witness: The fix must not violate an existing fact: the 中文说明R1-5:通过让 见证: 修复不得违反一个既有事实: — qwen3.8-max via Qwen Code /review (v0.22.3) |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] R1-2: The new test pins the creation-path catch only via a
mkdirSyncfailure; the creation-pathwriteFileSyncfailure shape has no test. In the exact environment this PR targets where~/.qwenalready exists (container/CI images often pre-create it),fs.mkdirSync(dir, { recursive: true })succeeds on the existing dir and it isfs.writeFileSyncthat throws (EROFS/EACCES). The new catch handles that today, but a later change that narrows or relocates the try (e.g. wrapping only the mkdir) re-introduces the startup crash for that failure shape with the whole suite staying green. Mirror the migration-failure test for the creation path:existsSync → false,mkdirSyncsucceeding,fs.writeFileSyncmocked to throw (e.g.new Error('EROFS: read-only file system')), then assertexpect(() => initializeLlmOutputLanguage()).not.toThrow().Witness:
The added test is its own acceptance criterion: removing the creation-path catch (or narrowing the try so
writeFileSyncsits outside it) must make it throw and fail the assertion — please confirm by deleting the guard and watching the new test go red.中文说明
R1-2:新测试只通过
mkdirSync失败来固定创建路径的 catch;创建路径上writeFileSync失败的形态没有测试覆盖。在本 PR 针对的确切环境中——~/.qwen已存在(容器/CI 镜像通常会预先创建它)——fs.mkdirSync(dir, { recursive: true })对已存在目录会成功,抛出异常(EROFS/EACCES)的是fs.writeFileSync。新加的 catch 目前能处理这种情况,但后续任何收窄或移动该 try 的改动(例如只包住 mkdir)都会让这种失败形态重新引发启动崩溃,而整个测试套件依然全绿。建议为创建路径补一个与迁移失败测试对称的用例:existsSync → false、mkdirSync成功、fs.writeFileSync被 mock 为抛异常(例如new Error('EROFS: read-only file system')),然后断言expect(() => initializeLlmOutputLanguage()).not.toThrow()。见证:
新增测试本身就是验收标准:移除创建路径的 catch(或收窄 try 使
writeFileSync位于其外)必须让它抛异常并使断言失败——请通过删除守卫并观察新测试变红来确认。— qwen3.8-max via Qwen Code /review (v0.22.3)