Skip to content

fix(ci): regenerate VS Code companion notices after the fast-uri bump - #10867

Closed
qwen-code-dev-bot wants to merge 1 commit into
mainfrom
autofix/issue-10864
Closed

fix(ci): regenerate VS Code companion notices after the fast-uri bump#10867
qwen-code-dev-bot wants to merge 1 commit into
mainfrom
autofix/issue-10864

Conversation

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

What this PR does

Regenerates the third-party notices file that ships with the VS Code companion extension, so that it agrees with the dependency versions the lockfile now resolves. The only content change is the version pinned in the fast-uri entry, which moves from 3.1.5 to 3.1.7; the license text under that entry is byte-for-byte what it was, because the newer release carries the same MIT terms.

No source, configuration, CI, or workflow file is touched. This is a committed generated artifact being brought back in sync with its generator.

Why it's needed

main is currently red. The recent dependency bump that raised fast-uri to 3.1.7 changed the lockfile alone and did not regenerate the notices artifact, which pins the resolved version of every dependency bundled into the companion extension. Continuous integration regenerates that artifact and then fails the build on any difference, so the lint job aborted on this freshness guard before a single test result was reported — which is what issue #10864 tracks.

Because the generator is wired into the package's install lifecycle, the drift is not cosmetic: every clean install rewrites the file locally, and every full-profile CI run fails on it. The guard is deterministic, so main stays red until the artifact is regenerated.

Reviewer Test Plan

How to verify

  1. Check out main at 2a428054c4 (the commit the failing run built) with a clean npm ci install, then run the two CI steps in order:

    npm run generate:notices --workspace=qwen-code-vscode-ide-companion
    git status --porcelain packages/vscode-ide-companion/NOTICES.txt

    Expected on unpatched main: the status line is non-empty — the CI guard prints Error: NOTICES.txt is out of date. and exits 1. The diff is a single line, -fast-uri@3.1.5 / +fast-uri@3.1.7.

  2. Apply this PR (or just re-run the generator and keep the result) and repeat step 1. Expected: git status --porcelain packages/vscode-ide-companion/NOTICES.txt prints nothing, i.e. the CI guard reports NOTICES.txt is up-to-date and exits 0.

  3. Confirm the diff this PR introduces is only that version line: git show --stat HEAD reports one file changed, one insertion, one deletion, and git diff HEAD~1 -- packages/vscode-ide-companion/NOTICES.txt shows no change to any license text.

  4. Optional — confirm the generator is deterministic rather than incidentally matching: run it twice in a row and verify the second run leaves the tree clean, and that the output equals what the package's install lifecycle already produced during npm ci.

  5. Optional — confirm the sibling generated-artifact guard is not also stale: npm run generate:settings-schema followed by git status --porcelain packages/vscode-ide-companion/schemas/settings.schema.json should print nothing.

Evidence (Before & After)

N/A — non-UI change. The relevant before/after is the CI guard's exit status on the same tree, recorded in the autofix report:

before (stale artifact committed):  Error: NOTICES.txt is out of date.   CI_CHECK_EXIT=1
after  (regenerated artifact):      NOTICES.txt is up-to-date            CI_CHECK_EXIT=0

Tested on

OS Status
🍏 macOS ⚠️
🪟 Windows ⚠️
🐧 Linux

Linux-only is sufficient here: the notices guard runs solely in the Linux lint job, and the generator deliberately normalizes CRLF and resolves license files case-insensitively so its output does not depend on the host platform. The regenerated file matched the committed one byte-for-byte apart from the version string.

Environment (optional)

Clean npm ci install in the CI sandbox container, Node v22.23.2. No model calls, no CLI runtime, no network access beyond the install itself — the generator reads only package.json, package-lock.json, and license files already on disk.

Risk & Scope

  • Main risk or tradeoff: effectively none for runtime behavior. The artifact is a shipped license-attribution document; nothing in the CLI or the extension reads it at startup. The only way to get it wrong is to mis-transcribe a license, and this change does not touch license text — it corrects a version string that the generator derives from the lockfile.
  • Not validated / out of scope: the failing run's GitHub logs could not be read from this runner (no gh credentials), so the diagnosis rests on reproducing the guard locally at the exact commit the run built rather than on the run's own output; the workflow's independent CI is the final gate. Integration tests were not run — no runtime code path changes. Separately, running the repository's CI prettier step locally reformatted 38 unrelated tracked files, including README.md tables and files under .github/; those rewrites were restored and are deliberately excluded. That formatting drift does not fail CI (the step writes and never verifies), most of it lives in an area this change must not touch, and folding it in would bury a one-line repair — it deserves its own hygiene issue.
  • Breaking changes / migration notes: none.

Linked Issues

Fixes #10864

中文说明

这个 PR 做了什么

重新生成随 VS Code 伴生扩展一起发布的第三方声明文件,使其与 lockfile 当前解析出的依赖版本保持一致。唯一的内容变化是 fast-uri 条目中固定的版本号,从 3.1.5 变为 3.1.7;该条目下的许可证正文与之前逐字节相同,因为新版本沿用的是同样的 MIT 条款。

没有触碰任何源码、配置、CI 或 workflow 文件。这只是把一个已提交的生成产物重新与它的生成器同步。

为什么需要

main 目前是红的。最近那次把 fast-uri 提升到 3.1.7 的依赖升级只改了 lockfile,没有重新生成声明产物,而该产物会固定记录打进伴生扩展的每一个依赖的解析版本。持续集成会重新生成该产物,然后对任何差异直接判失败,因此 lint 作业在报告任何测试结果之前就中止在这个新鲜度守卫上——这正是 issue #10864 所跟踪的问题。

由于生成器挂在该包的安装生命周期上,这种漂移并不只是表面问题:每一次干净安装都会在本地改写该文件,而每一次 full profile 的 CI 运行都会因此失败。该守卫是确定性的,所以在产物被重新生成之前,main 会一直是红的。

审阅者测试计划

如何验证

  1. 在干净的 npm ci 安装下检出 main2a428054c4(失败运行所构建的提交),然后按顺序执行这两个 CI 步骤:

    npm run generate:notices --workspace=qwen-code-vscode-ide-companion
    git status --porcelain packages/vscode-ide-companion/NOTICES.txt

    在未打补丁的 main 上预期:该 status 行非空——CI 守卫会打印 Error: NOTICES.txt is out of date. 并以 exit 1 结束。差异只有一行,-fast-uri@3.1.5 / +fast-uri@3.1.7

  2. 应用本 PR(或者只是重新运行生成器并保留结果),重复第 1 步。预期:git status --porcelain packages/vscode-ide-companion/NOTICES.txt 不输出任何内容,即 CI 守卫报告 NOTICES.txt is up-to-date 并以 exit 0 结束。

  3. 确认本 PR 引入的差异只有那一行版本号:git show --stat HEAD 报告 1 file changed、1 insertion、1 deletion,且 git diff HEAD~1 -- packages/vscode-ide-companion/NOTICES.txt 显示任何许可证正文都没有变化。

  4. 可选——确认生成器是确定性的,而不是碰巧一致:连续运行两次,验证第二次运行后树仍然是干净的,并且其输出与 npm ci 期间该包安装生命周期已经产出的内容相同。

  5. 可选——确认同类的另一个生成产物守卫也没有过期:执行 npm run generate:settings-schema,随后 git status --porcelain packages/vscode-ide-companion/schemas/settings.schema.json 应当不输出任何内容。

证据(修改前与修改后)

N/A —— 非 UI 改动。相关的前后对比是同一棵树上 CI 守卫的退出状态,已记录在 autofix 报告中:

before (stale artifact committed):  Error: NOTICES.txt is out of date.   CI_CHECK_EXIT=1
after  (regenerated artifact):      NOTICES.txt is up-to-date            CI_CHECK_EXIT=0

测试平台

OS Status
🍏 macOS ⚠️
🪟 Windows ⚠️
🐧 Linux

这里只在 Linux 上验证是足够的:notices 守卫仅在 Linux 的 lint 作业中运行,而且生成器会有意规范化 CRLF、并以大小写不敏感方式解析许可证文件,正是为了让其输出不依赖宿主平台。重新生成的文件除版本字符串外与已提交文件逐字节一致。

环境(可选)

在 CI 沙箱容器中执行干净的 npm ci 安装,Node v22.23.2。没有模型调用、没有 CLI 运行时、除安装本身外没有网络访问——生成器只读取 package.jsonpackage-lock.json 以及磁盘上已有的许可证文件。

风险与范围

  • 主要风险或取舍:对运行时行为几乎没有风险。该产物是随包发布的许可证归属文档;CLI 和扩展在启动时都不会读取它。唯一可能出错的方式是错抄许可证,而本次改动没有触碰许可证正文——它修正的是由生成器从 lockfile 推导出的版本字符串。
  • 未验证 / 范围之外:本 runner 无法读取失败运行的 GitHub 日志(没有 gh 凭据),因此诊断依据是在该运行所构建的确切提交上本地复现该守卫,而不是该运行自身的输出;workflow 的独立 CI 是最终门禁。未运行集成测试——没有任何运行时代码路径发生变化。另外,在本地运行仓库的 CI prettier 步骤会重新格式化 38 个无关的受控文件,包括 README.md 的表格和 .github/ 下的文件;这些改写已被恢复并被有意排除。那种格式化漂移不会让 CI 失败(该步骤只写不校验),其中大部分位于本次改动不应触碰的区域,而且把它并进来会掩盖一个一行改动的修复——它应当单独立一个整洁性 issue。
  • 破坏性变更 / 迁移说明:无。

关联 Issue

Fixes #10864

)

The fast-uri bump in 2a42805 updated package-lock.json but not the
committed NOTICES.txt, which pins the resolved version of every bundled
transitive dependency. The "Check VS Code companion notices are
up-to-date" gate regenerates the file and fails on any drift, so main
has been red since that commit. Regenerating pins fast-uri@3.1.7; the
license text itself is unchanged.
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator Author

Autofix E2E report — issue #10864 (main CI failure on 2a428054c4)

Summary

main is red because a committed generated artifact went stale. Commit 2a428054c4 ("chore(deps): bump fast-uri to 3.1.7 to clear the high-severity audit gate (#10862)") changed package-lock.json only — fast-uri 3.1.53.1.7 — and did not regenerate packages/vscode-ide-companion/NOTICES.txt, which pins the resolved version of every dependency bundled into the VS Code companion. The Qwen Code CI lint job regenerates that file and then fails the build on any drift, so the job died on a freshness guard before any test result was reported — exactly what the issue describes.

The fix is the regenerated artifact: one line, fast-uri@3.1.5fast-uri@3.1.7. The license text itself is unchanged (3.1.7 ships the same MIT terms), so this is a version-string correction in a committed generated file, not a licensing change.

Root cause chain

  1. packages/vscode-ide-companion/NOTICES.txt is generated by scripts/generate-notices.js, which reads package.json, package-lock.json, and the on-disk license files, and emits a name@version header per dependency. It is wired into the package's prepare script, so any npm ci regenerates it.
  2. fast-uri reaches that artifact through @modelcontextprotocol/sdkajvfast-uri; the lockfile entry that moved is the hoisted node_modules/fast-uri.
  3. .github/workflows/ci.yml has a two-step guard: "Generate VS Code companion notices" then "Check VS Code companion notices are up-to-date", which exits 1 when git status --porcelain packages/vscode-ide-companion/NOTICES.txt is non-empty. Both steps are gated on the full CI profile, and a lockfile-only change classifies as full (.github/scripts/ci/classify-profile.mjs only downgrades docs-only and a fixed github_ci_only file set).
  4. Result: on main at 2a428054c4 the guard fails deterministically.

Reproduction (pre-fix, on the exact commit from the failing run)

The runner had no GitHub credentials (gh auth status → "You are not logged into any GitHub hosts"), so run 33703006312's logs could not be read. The diagnosis instead comes from reproducing the guard locally on the exact commit the run built (2a428054c4, which was HEAD at the start of this round):

--- pre-check (committed state) ---
(clean)
--- CI step: Generate VS Code companion notices ---
NOTICES.txt generated at .../packages/vscode-ide-companion/NOTICES.txt
Total dependencies: 656
--- CI step: Check notices are up-to-date ---
Error: NOTICES.txt is out of date.
Please run: npm run generate:notices --workspace=qwen-code-vscode-ide-companion
 packages/vscode-ide-companion/NOTICES.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CI_CHECK_EXIT=1

The drift is exactly the bumped dependency:

-fast-uri@3.1.5
+fast-uri@3.1.7
 (git+https://github.com/fastify/fast-uri.git)

Fix

One additive commit, fbc9851251, containing only the regenerated packages/vscode-ide-companion/NOTICES.txt (1 file changed, 1 insertion, 1 deletion). No source, config, CI, or workflow file was touched.

No new test was added on purpose: the behavior is already pinned by the CI freshness guard itself, and the generator has existing coverage (packages/vscode-ide-companion/scripts/generate-notices.test.js, 23 tests, all passing). A duplicate unit test asserting "the committed file matches the generator output" would only restate the guard and grow the diff.

Mutation probe (inverted, since the round adds no guard or branch)

This round adds no code path, so the witness is the CI guard itself, probed in both directions on the same tree:

State Command Result
Stale artifact committed (pre-fix) generate + CI check snippet exit 1 — "Error: NOTICES.txt is out of date."
Regenerated artifact committed (post-fix) generate + CI check snippet exit 0 — "NOTICES.txt is up-to-date", git status --porcelain --untracked-files=all empty

Determinism was also checked: the generator's output is byte-identical to the copy the package prepare hook produced during the runner's npm ci (diff -q → identical), and re-running the generator on the committed tree produces no change at all.

Other gates in the same job (so main is not left red behind this fix)

Because the failing job is the full-profile lint job and the trigger was a lockfile bump, every other gate in that job that a dependency change could plausibly affect was run locally, not assumed:

  • Settings-schema freshness guard (the sibling generated-artifact check, immediately before the notices check): settings.schema.json up-to-date. This is the only other dirty-tree guard in ci.ymlgrep for git status --porcelain / git diff --exit-code in that file returns just these two.
  • npm run check-i18n: "✅ All checks passed!".
  • npm run check:serve-fast-path-bundle: "Startup bundle closure checks passed." (a lockfile bump changes what lands in the bundle, so this was worth running rather than assuming).
  • The job's "Run Prettier" step is prettier --write . (see runPrettier() in scripts/lint.js), which exits 0 whether or not it rewrites anything and has no follow-up dirty-tree guard — so it cannot be the failing step.

Incidental observation, deliberately not fixed

Running that CI prettier step locally reformatted 38 unrelated tracked files (859 insertions / 690 deletions), including README.md markdown tables and files under .github/. Those rewrites were side effects of my verification command, not part of the fix, so every one of them was restored with git restore --source=HEAD --worktree -- <paths> (excluding the notices artifact), and the final tree was confirmed clean before committing. The formatting drift is real but out of scope here: it does not fail CI (the step is write-only), most of it sits in .github/ which this workflow may not modify, and folding 38 reformatted files into a one-line CI repair would bury the change. It is worth a separate hygiene issue.

Verification

Commands actually run in this round, with results:

  • git checkout -b autofix/issue-10864 — created from HEAD = 2a428054c4 (the commit the failing run built).
  • npm run generate:notices --workspace=qwen-code-vscode-ide-companion (pre-fix, on the clean committed tree) — produced a 1-line drift; reproduced the failure.
  • CI check snippet from .github/workflows/ci.yml "Check VS Code companion notices are up-to-date" (pre-fix) — exit 1, "Error: NOTICES.txt is out of date."
  • npm run generate:notices --workspace=qwen-code-vscode-ide-companion (the fix) — regenerated, Total dependencies: 656.
  • diff -q regenerated output vs. the prepare-hook output — identical (generator is deterministic).
  • cd packages/vscode-ide-companion && npx vitest run scripts/generate-notices.test.js23 passed (1 file).
  • npm run buildpassed (exit 0).
  • npm run typecheckpassed (exit 0).
  • npm run lintpassed (exit 0).
  • npm run generate:settings-schema + the CI schema-freshness snippet — settings.schema.json up-to-date (no drift, nothing to stage).
  • node scripts/lint.js --prettier (the CI "Run Prettier" step) — exit 0, but it rewrote 38 unrelated tracked files; all restored via git restore --source=HEAD, tree confirmed clean afterwards.
  • npm run check-i18npassed ("✅ All checks passed!").
  • npm run check:serve-fast-path-bundlepassed ("Startup bundle closure checks passed.").
  • CI check snippet (post-commit, on the committed tree) — exit 0, "NOTICES.txt is up-to-date"; git status --porcelain --untracked-files=all empty.
  • git show --stat HEADfbc9851251, 1 file changed, 1 insertion(+), 1 deletion(-): only packages/vscode-ide-companion/NOTICES.txt.

Not run, with reasons:

  • Integration tests (npm run test:integration:*) — the change is a text artifact that no runtime code path reads at startup; nothing in the bundled CLI behavior changes.
  • The failing run's logs on GitHub — this runner has no gh credentials, so the diagnosis rests on exact local reproduction of the guard at the exact commit instead. The workflow's own independent CI remains the final gate.
  • macOS/Windows — the notices guard runs only in the Linux lint job, and the generator normalizes CRLF and resolves license files case-insensitively precisely so its output is platform-independent; the regenerated file matched the committed one byte-for-byte apart from the version string.
中文说明

Autofix E2E 报告 — issue #10864main2a428054c4 上 CI 失败)

概述

main 变红的原因是一个已提交的生成产物过期了。提交 2a428054c4("chore(deps): bump fast-uri to 3.1.7 to clear the high-severity audit gate (#10862)")只改动了 package-lock.json——把 fast-uri3.1.5 升到 3.1.7——但没有重新生成 packages/vscode-ide-companion/NOTICES.txt。该文件会为打进 VS Code 伴生扩展的每一个依赖固定记录其解析后的版本号。Qwen Code CI 的 lint 作业会重新生成这个文件,然后对任何差异直接判失败,因此该作业在报告任何测试结果之前就死在这个"新鲜度守卫"上——这与 issue 的描述完全一致。

修复就是把生成产物重新生成:一行改动,fast-uri@3.1.5fast-uri@3.1.7。许可证正文本身没有变化(3.1.7 仍然是同样的 MIT 条款),所以这是对已提交生成文件中版本字符串的修正,而不是许可证变更。

根因链条

  1. packages/vscode-ide-companion/NOTICES.txtscripts/generate-notices.js 生成,该脚本读取 package.jsonpackage-lock.json 以及磁盘上的许可证文件,为每个依赖输出一个 name@version 头部。它被挂在该包的 prepare 脚本上,所以任何一次 npm ci 都会重新生成它。
  2. fast-uri 是通过 @modelcontextprotocol/sdkajvfast-uri 进入该产物的;发生变动的 lockfile 条目是提升后的 node_modules/fast-uri
  3. .github/workflows/ci.yml 中有一个两步守卫:"Generate VS Code companion notices",随后是 "Check VS Code companion notices are up-to-date";当 git status --porcelain packages/vscode-ide-companion/NOTICES.txt 非空时以 exit 1 失败。这两步都以 full CI profile 为条件,而只改 lockfile 的变更会被归类为 full.github/scripts/ci/classify-profile.mjs 只对纯文档变更和一组固定的 github_ci_only 文件降级)。
  4. 结果:在 main2a428054c4 上,该守卫必然失败。

复现(修复前,在失败运行所用的确切提交上)

该 runner 没有 GitHub 凭据(gh auth status → "You are not logged into any GitHub hosts"),因此无法读取运行 33703006312 的日志。诊断依据改为在失败运行所构建的确切提交上本地复现该守卫(2a428054c4,即本轮开始时的 HEAD):

--- pre-check (committed state) ---
(clean)
--- CI step: Generate VS Code companion notices ---
NOTICES.txt generated at .../packages/vscode-ide-companion/NOTICES.txt
Total dependencies: 656
--- CI step: Check notices are up-to-date ---
Error: NOTICES.txt is out of date.
Please run: npm run generate:notices --workspace=qwen-code-vscode-ide-companion
 packages/vscode-ide-companion/NOTICES.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CI_CHECK_EXIT=1

差异恰好就是被升级的那个依赖:

-fast-uri@3.1.5
+fast-uri@3.1.7
 (git+https://github.com/fastify/fast-uri.git)

修复

一个追加式提交 fbc9851251,只包含重新生成的 packages/vscode-ide-companion/NOTICES.txt(1 file changed, 1 insertion, 1 deletion)。没有触碰任何源码、配置、CI 或 workflow 文件。

有意不新增测试:该行为已经由 CI 的新鲜度守卫本身固定,而且生成器已有覆盖(packages/vscode-ide-companion/scripts/generate-notices.test.js,23 个测试全部通过)。再加一个断言"已提交文件与生成器输出一致"的单元测试只会重复该守卫并放大 diff。

变异探针(反向执行,因为本轮没有新增守卫或分支)

本轮没有新增代码路径,所以见证者就是 CI 守卫本身,并在同一棵树上做了双向探测:

状态 命令 结果
提交了过期产物(修复前) 生成 + CI 检查片段 exit 1 — "Error: NOTICES.txt is out of date."
提交了重新生成的产物(修复后) 生成 + CI 检查片段 exit 0 — "NOTICES.txt is up-to-date",git status --porcelain --untracked-files=all 为空

同时也验证了确定性:生成器的输出与 runner 执行 npm ci 时该包 prepare 钩子产出的副本逐字节一致(diff -q → identical),并且在已提交的树上再次运行生成器完全不产生变化。

同一作业中的其他门禁(避免修完这一处后 main 仍然是红的)

由于失败作业是 full profile 的 lint 作业、触发原因是一次 lockfile 升级,该作业中所有可能被依赖变更影响的其他门禁都做了本地实际运行,而不是靠假设:

  • settings schema 新鲜度守卫(紧邻 notices 检查之前的同类生成产物检查):settings.schema.json up-to-date。这也是 ci.yml 中唯一的另一个"脏树"守卫——在该文件里 grep git status --porcelain / git diff --exit-code 只返回这两处。
  • npm run check-i18n:"✅ All checks passed!"。
  • npm run check:serve-fast-path-bundle:"Startup bundle closure checks passed."(lockfile 升级会改变进入 bundle 的内容,所以这一步值得实跑而不是假设)。
  • 该作业的 "Run Prettier" 步骤执行的是 prettier --write .(见 scripts/lint.jsrunPrettier()),无论是否改写文件都返回 exit 0,且后面没有跟随任何脏树守卫——所以它不可能是失败步骤。

附带发现,有意不修

在本地运行那个 CI prettier 步骤会重新格式化 38 个无关的受版本控制文件(859 insertions / 690 deletions),其中包括 README.md 的 markdown 表格以及 .github/ 下的文件。这些改写是我的验证命令带来的副作用,而不是修复的一部分,因此全部用 git restore --source=HEAD --worktree -- <paths> 恢复(排除 notices 产物),并在提交前确认最终树是干净的。这种格式化漂移确实存在,但不在本次范围内:它不会让 CI 失败(该步骤只写不校验),其中大部分位于本 workflow 不允许修改的 .github/,而且把 38 个被重新格式化的文件塞进一个一行改动的 CI 修复里会掩盖真正的变更。它值得单独立一个整洁性 issue。

验证(Verification)

本轮实际执行的命令及结果:

  • git checkout -b autofix/issue-10864 — 从 HEAD = 2a428054c4(失败运行所构建的提交)创建。
  • npm run generate:notices --workspace=qwen-code-vscode-ide-companion(修复前,在干净的已提交树上)— 产生 1 行差异;成功复现故障
  • .github/workflows/ci.yml 中 "Check VS Code companion notices are up-to-date" 的检查片段(修复前)— exit 1,"Error: NOTICES.txt is out of date."。
  • npm run generate:notices --workspace=qwen-code-vscode-ide-companion(即修复本身)— 重新生成,Total dependencies: 656
  • diff -q 比较生成器输出与 prepare 钩子输出 — 完全一致(生成器是确定性的)。
  • cd packages/vscode-ide-companion && npx vitest run scripts/generate-notices.test.js23 passed(1 个文件)。
  • npm run build通过(exit 0)。
  • npm run typecheck通过(exit 0)。
  • npm run lint通过(exit 0)。
  • npm run generate:settings-schema + CI 的 schema 新鲜度检查片段 — settings.schema.json up-to-date(无差异,无需暂存)。
  • node scripts/lint.js --prettier(CI 的 "Run Prettier" 步骤)— exit 0,但它改写了 38 个无关的受控文件;已全部用 git restore --source=HEAD 恢复,之后确认树干净。
  • npm run check-i18n通过("✅ All checks passed!")。
  • npm run check:serve-fast-path-bundle通过("Startup bundle closure checks passed.")。
  • CI 检查片段(提交后,在已提交的树上)— exit 0,"NOTICES.txt is up-to-date";git status --porcelain --untracked-files=all 为空
  • git show --stat HEADfbc9851251,1 file changed, 1 insertion(+), 1 deletion(-):只有 packages/vscode-ide-companion/NOTICES.txt

未运行的命令及原因:

  • 集成测试(npm run test:integration:*)— 本次改动是一个文本产物,启动时没有任何运行时代码路径读取它;打包后 CLI 的行为没有任何变化。
  • GitHub 上失败运行的日志 — 该 runner 没有 gh 凭据,因此诊断改为依据在确切提交上对该守卫的本地精确复现。workflow 自身的独立 CI 仍是最终验证门禁。
  • macOS/Windows — notices 守卫只在 Linux 的 lint 作业中运行,而且生成器会规范化 CRLF、并以大小写不敏感方式解析许可证文件,正是为了让其输出与平台无关;重新生成的文件除版本字符串外与已提交文件逐字节一致。

🧠 Handled by Qwen Code · model/模型 qwen3.8-max-2026-09-02

@github-actions github-actions Bot added the review/self-reported The linked issue was opened by the PR author (self-reported) label Sep 3, 2026
@qwen-code-ci-bot

qwen-code-ci-bot commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

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

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

@yiliang114

Copy link
Copy Markdown
Collaborator

Closing as superseded: the same NOTICES refresh already landed on main via #10863 (055e831). This PR's diff is byte-identical to that change, so there is nothing left to merge.

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Thanks for the repair — but it turns out the same fix already landed on main, so there is nothing left to merge here.

  • Template: complete ✓
  • Problem: the failure was real — main went red on 2a428054c4 because the fast-uri 3.1.7 lockfile bump didn't regenerate NOTICES.txt, which is what Main CI failed: Qwen Code CI on 2a428054c4ee #10864 tracks. However, chore(vscode): refresh NOTICES for the fast-uri bump #10863 (chore(vscode): refresh NOTICES for the fast-uri bump) was merged on 2026-09-03 and made exactly this change: line 4359 of NOTICES.txt on main already reads fast-uri@3.1.7, byte-for-byte the same as this PR's diff.
  • Direction: aligned — regenerating the artifact is the right fix for a stale generated file; it's just already done.
  • Size: 1 file, +1/−1; generated artifact only, no production logic touched.
  • Approach: minimal and correct (and good judgment excluding the unrelated prettier drift rather than folding it in). Merging now would be a content no-op: main has moved 3 commits ahead of this PR's merge base and already contains the one line this PR adds.
  • Risk: no elevated risk signals.

One procedural note: the linked issue #10864 is still open, and that is what keeps this gate from closing the PR autonomously as a duplicate — the duplicate-close path only fires once the linked issue is closed by the merged fix. Rather than guess, I'm handing it over.

⏸️ Deferring to @yiliang114 — you merged the identical fix in #10863; please close this PR as a duplicate (and #10864 too, since the notices guard on main should be green again).

中文说明

感谢这个修复——不过同样的修补已经合入 main,这里已经没有可合并的内容了。

  • 模板:完整 ✓
  • 问题:故障是真实存在的——2a428054c4 上 fast-uri 3.1.7 的 lockfile 升级没有重新生成 NOTICES.txt,导致 main 变红,即 Main CI failed: Qwen Code CI on 2a428054c4ee #10864 所跟踪的问题。但 chore(vscode): refresh NOTICES for the fast-uri bump #10863chore(vscode): refresh NOTICES for the fast-uri bump)已于 2026-09-03 合入,做的正是同样的改动:mainNOTICES.txt 第 4359 行已经是 fast-uri@3.1.7,与本 PR 的差异逐字节一致。
  • 方向:对齐——对过期的生成产物来说,重新生成是正确的修法,只是已经有人做了。
  • 规模:1 个文件,+1/−1;仅生成产物,未触碰生产逻辑。
  • 方案:最小且正确(把无关的 prettier 漂移排除在外、而不是顺手并进来,判断得当)。现在合并将是一次内容上的空操作:main 已越过本 PR 的合并基点 3 个提交,且已包含本 PR 要加的那一行。
  • 风险:无升级风险信号。

一个流程上的说明:关联 issue #10864 仍处于 open 状态,这正是本门禁没有直接按重复项关闭该 PR 的原因——duplicate-close 路径只在关联 issue 被已合并的修复关闭时才触发。与其擅自猜测,不如转交人工处理。

⏸️ 转交 @yiliang114——相同的修复已由你在 #10863 合入;请将本 PR 作为重复项关闭(main 上的 notices 守卫应该已恢复绿色,#10864 也可一并关闭)。

Qwen Code · qwen3.8-max

Reviewed at fbc98512516b21f149827dd300a73762f8fc4bb6 · re-run with @qwen-code /triage

@wenshao

wenshao commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Independent verification — built the real environment and reproduced every step

I ran this on a standalone clone with a clean npm ci, not on a mock. Verification started before this PR
was closed at 02:57:58Z; posting the result anyway because it independently confirms that closing it was the
right call, and because two of the checks say something useful about the guard itself.

Verdict: the bug this PR fixes is real, the fix is correct — and it was already on main when the PR was
opened. Closing as superseded by #10863 is correct. Nothing here needs to be reopened.

Rig
Tree standalone clone of QwenLM/qwen-code, main @ fa5f7a11a0, plus 2a428054c4 and PR head fbc9851251
Install clean npm ci, 3 m 13 s, exit 0 — same lockfile on all three arms (git diff 2a428054c4 main -- package-lock.json is empty), so one install serves all of them faithfully
Runtime macOS arm64, Node v22.23.2 / npm 10.9.8 — the exact Node the failing CI job used
Guard the two steps from .github/workflows/ci.yml:348-363 transcribed verbatim, run under bash -e -o pipefail as Actions does
Scale 656 dependency entries, 27 628 lines of NOTICES.txt

1. The bug is real, and it reproduces byte-for-byte

CI notices guard, three-arm A/B

Arm HEAD committed sha256 regenerated sha256 CI_CHECK_EXIT
B pre-fix main 2a428054c4 644bd6d57263221a… 4575b46a393b2d89… 1
A current main fa5f7a11a0 4575b46a393b2d89… 4575b46a393b2d89… 0
C PR #10867 head fbc9851251 4575b46a393b2d89… 4575b46a393b2d89… 0

Arm B's local output matches the real failing job — I pulled the log of run
33703006312, which the PR author noted they
could not read from their runner. Step Check VS Code companion notices are up-to-date printed
Error: NOTICES.txt is out of date. followed by the same 1 file changed, 1 insertion(+), 1 deletion(-).
The diagnosis in the PR body is confirmed against the run's own output, not just re-derived.

The diff really is only the version line: diff between the pre-fix blob and the PR head blob returns exactly
4359c4359 / < fast-uri@3.1.5 / > fast-uri@3.1.7, both files 27 628 lines. No license body was touched.

2. …but it was already fixed on main — three independent proofs

PR is a no-op against current main

  1. The blobs are byte-identical. main:NOTICES.txt and pr10867-head:NOTICES.txt both hash to
    4575b46a393b2d89dd79abf00ca0673cbf93b0aa711822e63898b4ed5b34a1f9.
  2. Merging changes no file. git merge-tree --write-tree main pr10867-headeece06ee9fef484d…, which
    is main's own tree object. A squash-merge here would have produced an empty commit and a full main-CI run.
  3. Real CI already agrees. On push run 33706578154
    for 055e831556 (merged chore(vscode): refresh NOTICES for the fast-uri bump #10863), both Generate VS Code companion notices and
    Check VS Code companion notices are up-to-date are success.

The cause is a timing gap, not a mistake in the repair: the PR branch was cut at 2a428054c4
(git merge-base confirms), so its diff is computed against a base that no longer reflects main.

01:16 UTC  main CI run 33703006312 fails on 2a428054c4 — NOTICES.txt out of date
02:06 UTC  issue #10864 filed by the main-CI-failure bot
02:09 UTC  PR #10863 merged as 055e831556 — the same one-line regeneration
02:44 UTC  PR #10867 opened, from a branch cut at 2a428054c4, 34 min after the fix landed
02:57 UTC  PR #10867 closed as superseded   03:01 UTC  issue #10864 closed

3. Optional steps 4 and 5 pass, and macOS can be promoted from ⚠️ to ✅

determinism, cross-platform, sibling guard

  • Step 4 — determinism. Three consecutive generator runs give the identical sha256 and leave the tree clean,
    and that hash equals what npm ci's prepare lifecycle had already written during install. Not an incidental match.
  • Step 5 — sibling guard. npm run generate:settings-schema exits 0 and leaves
    schemas/settings.schema.json clean. Not stale.
  • Cross-platform. The PR marks macOS ⚠️ (untested). My macOS regeneration produces
    4575b46a…, which is exactly the blob Linux CI regenerated and accepted. All 656 entries agree across both
    platforms, so the generator's deliberate CRLF normalisation and case-insensitive license lookup do hold up.
    The macOS row can be ✅.

4. One residual finding — not this PR's fault, but its "not validated" note is right

The PR flags that the CI prettier step rewrites unrelated tracked files. Confirmed, and it is worse than cosmetic:
ci.ymlnode scripts/lint.js --prettierscripts/lint.js:201 runs prettier --write ..
It writes and never verifies, so formatting drift can never turn CI red. On a clean fa5f7a11a0 checkout it
rewrites 36 tracked files in 81 s, across .github/workflows/, packages/web-shell/, packages/cli/,
.github/scripts/ and scripts/. NOTICES.txt is not among them, so there is no interaction with this guard.
Worth a standalone hygiene issue — replacing --write with --check would need those 36 files fixed first.

5. Scope and limits

  • Verified on macOS only; the Linux side is covered transitively by the CI step's success on the identical bytes,
    not by a Linux container of my own.
  • I did not run the repository test suites — no runtime code path changes in this PR, and the guard I exercised is
    the whole of its blast radius.
  • The autofix/in-progress label is still on the now-closed Main CI failed: Qwen Code CI on 2a428054c4ee #10864; harmless, but a stale label if anything sweeps on it.
中文说明

独立验证——搭了真实环境,逐条复现

我是在一个独立 clone 上跑的干净 npm ci,不是 mock。验证开始时本 PR 尚未关闭(关闭于 02:57:58Z);
仍然发出来,一是它独立确认了「关闭」这个决定是对的,二是其中两项检查对守卫本身有额外结论。

结论:本 PR 修的 bug 是真的,修法也对——但它被打开时,main 上已经有了同样的修复。
按 superseded by #10863 关闭是正确的,不需要重开。

装置
QwenLM/qwen-code 独立 clone,main @ fa5f7a11a0,外加 2a428054c4 与 PR head fbc9851251
安装 干净 npm ci,3 分 13 秒,exit 0——三个臂 lockfile 完全一致(git diff 2a428054c4 main -- package-lock.json 为空),因此一次安装可忠实服务全部三臂
运行时 macOS arm64,Node v22.23.2 / npm 10.9.8——与失败 CI 作业所用 Node 完全相同
守卫 .github/workflows/ci.yml:348-363 两个 step 逐字转录,按 Actions 的方式在 bash -e -o pipefail 下执行
规模 656 条依赖条目,NOTICES.txt 共 27 628 行

1. Bug 是真的,且逐字节复现

HEAD 已提交 sha256 重新生成 sha256 CI_CHECK_EXIT
B 修复前 main 2a428054c4 644bd6d57263221a… 4575b46a393b2d89… 1
A 当前 main fa5f7a11a0 4575b46a393b2d89… 4575b46a393b2d89… 0
C PR #10867 head fbc9851251 4575b46a393b2d89… 4575b46a393b2d89… 0

臂 B 的本地输出与真实失败作业一致——我拉取了 run
33703006312 的日志(PR 作者说他们的 runner
读不到)。step Check VS Code companion notices are up-to-date 打印了 Error: NOTICES.txt is out of date.
后面跟着同样的 1 file changed, 1 insertion(+), 1 deletion(-)
也就是说 PR 正文的诊断是对着该 run 自身的输出核实过的,不只是重新推导。

差异确实只有版本号那一行:修复前 blob 与 PR head blob 的 diff 恰好只有
4359c4359 / < fast-uri@3.1.5 / > fast-uri@3.1.7,两侧都是 27 628 行,许可证正文未被触碰。

2. ……但 main 上早已修好——三条独立证据

  1. 两个 blob 逐字节相同。 main:NOTICES.txtpr10867-head:NOTICES.txt 的哈希都是
    4575b46a393b2d89dd79abf00ca0673cbf93b0aa711822e63898b4ed5b34a1f9
  2. 合并不会改动任何文件。 git merge-tree --write-tree main pr10867-headeece06ee9fef484d…
    这正是 main 自己的 tree 对象。在这里做 squash-merge 只会产生一个空 commit 和一次完整的 main CI。
  3. 真实 CI 已经认可。 055e831556(即已合入的 chore(vscode): refresh NOTICES for the fast-uri bump #10863)的 push run
    33706578154 中,
    Generate VS Code companion noticesCheck VS Code companion notices are up-to-date 均为 success

根因是时间差,而不是修复本身有错:PR 分支切自 2a428054c4git merge-base 可证),
因此它的 diff 是对着一个已经不再代表 main 的基线算出来的。

01:16 UTC  main CI run 33703006312 在 2a428054c4 上失败 —— NOTICES.txt 过期
02:06 UTC  main-CI-failure 机器人开出 issue #10864
02:09 UTC  PR #10863 以 055e831556 合入 —— 同样的一行重新生成
02:44 UTC  PR #10867 开出,分支切自 2a428054c4,比修复落地晚 34 分钟
02:57 UTC  PR #10867 以 superseded 关闭    03:01 UTC  issue #10864 关闭

3. 可选步骤 4 和 5 都通过,并且 macOS 可以从 ⚠️ 升为 ✅

  • 步骤 4——确定性。 连续三次运行生成器得到相同 sha256 且树保持干净,
    且该哈希与 npm ciprepare 生命周期在安装期间已写入的内容相同。不是碰巧一致。
  • 步骤 5——兄弟守卫。 npm run generate:settings-schema exit 0,
    schemas/settings.schema.json 保持干净,没有过期。
  • 跨平台。 PR 把 macOS 标为 ⚠️(未测)。我在 macOS 上重新生成得到 4575b46a…
    正是 Linux CI 重新生成并接受的那份 blob。656 条条目在两个平台上完全一致,
    说明生成器刻意做的 CRLF 规范化与大小写不敏感许可证查找确实成立。macOS 那一行可以改成 ✅。

4. 一条遗留发现——不是本 PR 的锅,但它的「未验证」说明是对的

PR 提到 CI 的 prettier 步骤会改写无关的受控文件。已确认,而且比「表面问题」更严重:
ci.ymlnode scripts/lint.js --prettierscripts/lint.js:201 执行的是 prettier --write .
只写不校验,所以格式漂移永远不可能让 CI 变红。在干净的 fa5f7a11a0 检出上,
它会在 81 秒内改写 36 个受控文件,分布在 .github/workflows/packages/web-shell/
packages/cli/.github/scripts/scripts/NOTICES.txt 不在其中,因此与本守卫没有相互影响。
值得单开一个整洁性 issue——想把 --write 换成 --check,得先把这 36 个文件修掉。

5. 范围与边界

  • 只在 macOS 上验证;Linux 一侧是通过 CI 在相同字节上的 step 成功间接覆盖的,我没有自建 Linux 容器。
  • 没有跑仓库测试套件——本 PR 不改任何运行时代码路径,我实测的这个守卫就是它的全部影响面。
  • 已关闭的 Main CI failed: Qwen Code CI on 2a428054c4ee #10864 上仍挂着 autofix/in-progress 标签;无害,但如果有清扫逻辑依赖它,就是一个陈旧标签。

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Summary

Package Lines Statements Functions Branches
CLI N/A% N/A% N/A% N/A%
Core N/A% N/A% N/A% N/A%
CLI Package - Full Text Report
CLI full-text-summary.txt not found at: coverage_artifact/cli/coverage/full-text-summary.txt
Core Package - Full Text Report
Core full-text-summary.txt not found at: coverage_artifact/core/coverage/full-text-summary.txt

For detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/self-reported The linked issue was opened by the PR author (self-reported)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Main CI failed: Qwen Code CI on 2a428054c4ee

4 participants