Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b8e27b0
feat(autofix): require isolated targeted E2E proof
wenshao Aug 1, 2026
f06ecad
Merge origin/main into feat/autofix-e2e-verification
wenshao Aug 1, 2026
25ea11c
test(autofix): follow verification job split
wenshao Aug 1, 2026
dad1b5a
Merge branch 'main' into feat/autofix-e2e-verification
yiliang114 Aug 1, 2026
00bc2bb
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 1, 2026
b48e4f9
fix(ci): address review findings on CI failure issue and autofix work…
qwen-code-dev-bot Aug 2, 2026
7d710a1
Merge branch 'main' into feat/autofix-e2e-verification
wenshao Aug 2, 2026
f4545ee
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 2, 2026
26c6f39
fix(ci): record recurrences on non-eligible issues before exiting (#8…
qwen-code-dev-bot Aug 2, 2026
e5f317e
fix(ci): distinguish transient from permanent check_live_issue failur…
qwen-code-dev-bot Aug 2, 2026
902878f
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 2, 2026
16fc07c
fix(ci): address review findings on autofix verification hardening (#…
qwen-code-ci-bot Aug 2, 2026
1ed5439
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 2, 2026
f2b350e
fix(ci): pass NUL-delimited diff to resolve-owning-packages in repo-h…
qwen-code-dev-bot Aug 2, 2026
fa69200
Merge branch 'main' into feat/autofix-e2e-verification
wenshao Aug 2, 2026
d591517
Merge branch 'feat/autofix-e2e-verification' of https://github.com/Qw…
qwen-code-dev-bot Aug 2, 2026
6ea2b27
fix(ci): address review findings on autofix verification chain (#8318)
qwen-code-ci-bot Aug 2, 2026
8517bdf
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 2, 2026
a68a368
fix(ci): preserve unsupported E2E environment reasons
wenshao Aug 2, 2026
460291c
fix(ci): address review findings on targeted E2E verification (#8318)
qwen-code-ci-bot Aug 2, 2026
bc0e4cf
Merge branch 'feat/autofix-e2e-verification' of https://github.com/Qw…
qwen-code-dev-bot Aug 2, 2026
c0ed2ff
fix(ci): remove duplicate environments declaration breaking helper te…
qwen-code-dev-bot Aug 2, 2026
2897fee
fix(ci): suppress SC2329 for trap-invoked terminate functions (#8318)
qwen-code-dev-bot Aug 2, 2026
8a21369
fix(ci): address review findings on targeted E2E verification (#8318)
qwen-code-ci-bot Aug 2, 2026
bfd7e49
fix(ci): address round-5 review findings on targeted E2E verification…
qwen-code-ci-bot Aug 3, 2026
3d1e19e
Merge branch 'main' into feat/autofix-e2e-verification
wenshao Aug 3, 2026
a6d0445
fix(autofix): restore agent decline signal and tighten issue gates (#…
qwen-code-ci-bot Aug 3, 2026
83fb5f6
fix(autofix): harden issue publication, metadata load, and issue gate…
qwen-code-ci-bot Aug 3, 2026
268873b
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 3, 2026
4259fe3
fix(tests): sync qwen-resolve-workflow test expectations with externa…
qwen-code-ci-bot Aug 3, 2026
a2f1da3
fix(tests): merge origin/main and converge review timeout assertions …
qwen-code-dev-bot Aug 4, 2026
618c2a1
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 4, 2026
f328ca7
fix(ci): address round-6 review findings on targeted E2E verification…
qwen-code-dev-bot Aug 4, 2026
42730ec
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 4, 2026
4790b85
fix(ci): address round-7 review findings on targeted E2E verification…
qwen-code-dev-bot Aug 4, 2026
c24a47d
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 4, 2026
b3d176d
fix(ci): sync --paginate site pin with approval-record fetches (#8318)
qwen-code-dev-bot Aug 4, 2026
241625b
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 5, 2026
dd1d0af
fix(ci): close approval/redaction gaps and pin mutation-tested gates …
qwen-code-dev-bot Aug 5, 2026
53c0a29
Merge branch 'main' into feat/autofix-e2e-verification
qwen-code-dev-bot Aug 5, 2026
6f3c70e
fix(ci): run vitest gates before the worktree seal (#8318)
qwen-code-dev-bot Aug 5, 2026
f60f820
Merge branch 'main' into feat/autofix-e2e-verification
wenshao Aug 6, 2026
300e308
fix(ci): merge main into feat/autofix-e2e-verification (#8318)
qwen-code-dev-bot Aug 6, 2026
86f8f27
Merge branch 'main' into feat/autofix-e2e-verification
wenshao Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/scripts/autofix-cli-launcher.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const candidateCli = process.env['AUTOFIX_CANDIDATE_CLI'];
const uid = Number(process.env['AUTOFIX_VERIFY_UID']);
const gid = Number(process.env['AUTOFIX_VERIFY_GID']);

if (
!candidateCli ||
!Number.isInteger(uid) ||
uid <= 0 ||
!Number.isInteger(gid) ||
gid <= 0
) {
throw new Error('Missing isolated candidate CLI configuration');
}

if (process.getuid() === 0) {
process.setgroups([]);
process.setgid(gid);
process.setuid(uid);
} else if (process.getuid() !== uid || process.getgid() !== gid) {
throw new Error('Isolated candidate CLI is running as an unexpected user');
}

const candidate = await import(candidateCli);
if (typeof candidate.runCliEntryPoint !== 'function') {
throw new Error('Candidate CLI does not export runCliEntryPoint');
}
await candidate.runCliEntryPoint();
27 changes: 27 additions & 0 deletions .github/scripts/autofix-vitest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { resolve } from 'node:path';

const workspace = process.env.AUTOFIX_WORKSPACE;

if (!workspace) {
throw new Error('Missing isolated Vitest configuration');
}

export default {
root: resolve(workspace, 'integration-tests'),
test: {
// Mirror the integration-tests config default (TB_TIMEOUT_MINUTES=5);
// that env var is not on the wrapper's env allowlist. Without this,
// Vitest's 5 s default would fail any future allowlisted case that does
// not declare its own timeout.
testTimeout: 5 * 60 * 1000,
retry: 0,
fileParallelism: false,
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
isolate: true,
},
},
},
};
17 changes: 14 additions & 3 deletions .github/scripts/check-autofix-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@ fail() {

changed_files="$(cat)"

if ! npm run check-i18n; then
run_candidate() {
if [[ -n "${AUTOFIX_VERIFY_COMMAND:-}" ]]; then
"${AUTOFIX_VERIFY_COMMAND}" "${GITHUB_WORKSPACE}" "$@"
else
"$@"
fi
}
Comment on lines +13 to +19

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] Neither side of the contract-gate isolation pairing is tested: the behavioural test for this script never sets AUTOFIX_VERIFY_COMMAND (so it always exercises the bare "$@" branch), and no workflow test pins that issue-autofix-verify invokes the gate with AUTOFIX_VERIFY_COMMAND="${verify_cmd}" — the only AUTOFIX_VERIFY_COMMAND assertions in the suite are for check-settings-schema.sh. — Concrete cost: collapsing run_candidate to "$@" (an easy refactor, since the indirection looks redundant without caller context) leaves every test green; in the sealed verify job the i18n and tool-drift checks would then run as the runner user with its full environment instead of through the credential-free isolated-UID wrapper, violating the design doc's "every command receives a fresh isolated HOME through the trusted credential-free command wrapper" invariant.

Fix: in the existing behavioural test, add a case that sets AUTOFIX_VERIFY_COMMAND to a mock that logs its argv and assert the logged invocation is <wrapper> ${GITHUB_WORKSPACE} run check-i18n; and assert the verify-job text contains AUTOFIX_VERIFY_COMMAND="${verify_cmd}" adjacent to check-autofix-contracts.sh.

中文说明

[Suggestion] 合约门禁隔离配对的两侧都没有测试:本脚本的行为测试从不设置 AUTOFIX_VERIFY_COMMAND(因此总是走裸 "$@" 分支),也没有任何 workflow 测试固定 issue-autofix-verify 会以 AUTOFIX_VERIFY_COMMAND="${verify_cmd}" 调用该门禁——套件中唯一的 AUTOFIX_VERIFY_COMMAND 断言是针对 check-settings-schema.sh 的。— 具体代价:把 run_candidate 折叠成 "$@"(由于没有调用方上下文,这层间接看起来冗余,是个很容易发生的重构)后所有测试仍全绿;在密封的 verify job 中,i18n 与工具漂移检查将以 runner 用户及其完整环境运行,而非通过无凭据的隔离 UID wrapper,违反设计文档“每条命令都通过可信的无凭据命令 wrapper 获得一个全新隔离 HOME”的不变量。修复:在行为测试中新增一个设置 AUTOFIX_VERIFY_COMMAND 为记录 argv 的 mock 的用例,并断言 verify job 文本中 check-autofix-contracts.sh 附近含有 AUTOFIX_VERIFY_COMMAND="${verify_cmd}"

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


if ! run_candidate npm run check-i18n; then
echo '❌ i18n verification failed.'
fail
fi

if grep -Fxq 'packages/core/src/tools/tool-names.ts' <<< "${changed_files}"; then
if ! npm run test --workspace packages/web-shell -- \
client/components/messages/toolFormatting.drift.test.ts; then
# Coverage and JUnit reporting stay off: the sealed issue verify job
# audits every ignored artifact a gate leaves behind and rejects them.
if ! run_candidate npm run test --workspace packages/web-shell -- \
client/components/messages/toolFormatting.drift.test.ts \
--coverage.enabled=false --reporter=default; then
echo '❌ Web Shell tool-display contract verification failed.'
fail
fi
Expand Down
44 changes: 30 additions & 14 deletions .github/scripts/check-settings-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,34 @@ fail() {
exit 1
}

# Guard the generator itself: if it CRASHES (e.g. a type error the agent
# introduced in the schema source), a caller running under set -eo pipefail
# would abort before outcome=failed is written, leaving OUTCOME unset. Handle
# it here so the failure is explicit, not inferred from job.status.
if ! npm run generate:settings-schema; then
echo "❌ Settings schema generator failed to run."
fail
fi

if [[ -n "$(git status --porcelain "${SCHEMA_FILE}")" ]]; then
echo "❌ ${SCHEMA_FILE} is out of date. Run: npm run generate:settings-schema"
git --no-pager diff -- "${SCHEMA_FILE}" || true
git checkout -- "${SCHEMA_FILE}" || true
fail
# Autofix rejects changes to the committed schema and to a best-effort
# snapshot of the sources that feed it (the protected-path allowlist in
# validate-autofix-verification-outputs.mjs) before this gate runs; the
# snapshot is hand-curated, and the normal schema gate still runs on the
# published PR. Executing the candidate's schema module graph here would let
# module initialization short-circuit the trusted comparison.
# TODO: run-autofix-review-verification.sh still executes the generator
# on candidate code without this wrapper or the protected-path allowlist; the
# review-address chain was scoped out of the targeted E2E redesign and needs
# the same isolation before its schema gate is trusted the same way.
if [[ -n "${AUTOFIX_VERIFY_COMMAND:-}" ]]; then

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 AUTOFIX_VERIFY_COMMAND skip branch is pinned only structurally (toContain), while sibling check-autofix-contracts.sh got a behavioural wrapper test in the same file; no test executes this script with AUTOFIX_VERIFY_COMMAND set. — Failure scenario: A future edit hoisting the generator out of the else keeps every structural assertion green; at runtime the sealed issue-autofix-verify job runs the generator outside the isolated wrapper after finalize made tracked files root-owned/read-only → EACCES crash, and every autofix verification fails at the schema gate with a misleading error.

Suggested fix: Mirror the contracts-script harness: run check-settings-schema.sh with a fake AUTOFIX_VERIFY_COMMAND and a fake npm on PATH; assert exit 0 and an empty npm log.

中文说明

AUTOFIX_VERIFY_COMMAND 跳过分支只有结构化固定(toContain),而兄弟脚本 check-autofix-contracts.sh 在同文件中有行为学包装测试;没有任何测试在设置 AUTOFIX_VERIFY_COMMAND 时执行本脚本并断言退出 0 且不调用 npm。若未来把生成器移出 else(结构化断言仍全绿),密封 issue-autofix-verify job 会在 finalize 之后以只读 schema 文件运行生成器 → EACCES 崩溃,每次 autofix 验证都在 schema 门禁处以误导性错误失败。建议:仿照 contracts 脚本补行为学测试(假 npm + 假 AUTOFIX_VERIFY_COMMAND,断言 exit 0 且 npm 日志为空)。

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

echo 'Skipping settings-schema freshness check: Autofix rejects changes to the committed schema and its protected sources before this gate runs.'
exit 0
else
# Guard the generator itself: if it CRASHES (e.g. a type error introduced in
# the schema source), report an explicit gate failure.
if ! npm run generate:settings-schema; then
echo "❌ Settings schema generator failed to run."
fail
fi
if ! schema_status="$(git status --porcelain "${SCHEMA_FILE}")"; then
echo "❌ Failed to inspect ${SCHEMA_FILE} after generation."
fail
fi
if [[ -n "${schema_status}" ]]; then
echo "❌ ${SCHEMA_FILE} is out of date. Run: npm run generate:settings-schema"
git --no-pager diff -- "${SCHEMA_FILE}" || true
git checkout -- "${SCHEMA_FILE}" || true
fail
fi
fi
Loading
Loading