qwen-code/.github/scripts
Shaojin Wen e89a32c18c
fix(ci): neutralize legacy ##[ commands in autofix stdout echoes (#9871)
* fix(ci): neutralize legacy ##[ commands in autofix stdout echoes

A review finding about workflow-command injection carried its payload
strings (::error::forged, ##[add-matcher]) verbatim as example text.
Prepare echoed feedback.md raw, the runner parsed the mid-line
##[add-matcher] and failed the step before the agent ran, and the
consecutive-failure breaker burned the takeover window of #9761 in
about 70 minutes while reporting it as a 100/100 round cap.

The existing neutralization covered only the modern :: syntax; the
runner also parses the legacy ##[name] form, even mid-line. Extend
every untrusted-content echo in the autofix family (prepare feedback
echo, both artifact dump loops, the gate's failure/handoff/no-action
echoes, the deferred-findings dumps and upsert re-emit loops) to
neutralize both prefixes, and pin the census plus a behavioral ##[
case in the contract tests.

* fix(ci): unify the autofix neutralizer on one canonical spelling

Review feedback on #9871: the two upsert re-emit loops neutralized with
a hybrid spelling (bash expansion for :: plus a single-syntax sed for
##[) while the other fourteen sites used the canonical two-expression
sed, establishing two implementations of one normalization. A future
edit fixing one spelling could miss the other and recreate the
single-syntax half-guard that let #9761 through. Unify both loops on
the canonical sed and consolidate the pinned test shapes.

The census test's comment also promised more than its assertions
deliver: it pins the known enumeration, it does not auto-detect new
un-neutralized echoes. Reword it to state the actual guarantee, ban
the ##[-only sed and the bare bash expansion alongside the existing
::-only ban, and fold the script-side re-emit loop into the census.

* test(ci): assert the neutralizer pairing property instead of banning shapes

The three shape bans only matched the no--e spellings, so the canonical
line's natural half-copies (sed -e 's/::/;;/g' alone, or the ##[-only -e
mirror) passed every ban while guarding only one syntax. Assert the
pairing property instead: every occurrence of either substitution
expression must belong to the canonical two-expression pair, so a
half-guard in ANY spelling unbalances the count and fails the census —
verified by probe against all four half-guard shapes.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-25 02:17:46 +00:00
..
ci perf(ci): run docs-only automatic reviews at medium effort (#8648) 2026-08-07 17:00:32 +00:00
dsw-swe-verified feat: chain Terminal-Bench release evaluation (#9120) 2026-08-17 05:53:06 +00:00
fixtures test(ci): stage on-disk session state in the serve A/B (#9444) 2026-08-20 14:09:03 +00:00
assign-issue-owner.mjs feat(ci): auto-assign issues to area owners from labels (#8668) 2026-08-08 23:01:03 +00:00
assign-issue-owner.test.mjs feat(ci): auto-assign issues to area owners from labels (#8668) 2026-08-08 23:01:03 +00:00
auto-minimize-spam.test.mjs fix(ci): minimize new spam comments on creation (#9266) 2026-08-17 05:12:04 +00:00
autofix-push-and-report.sh fix(ci): neutralize legacy ##[ commands in autofix stdout echoes (#9871) 2026-08-25 02:17:46 +00:00
cap-release-notes.mjs fix(release): keep notes anchored and cap the release body (#8199) 2026-07-31 09:55:38 +00:00
cap-release-notes.test.mjs fix(release): keep notes anchored and cap the release body (#8199) 2026-07-31 09:55:38 +00:00
check-autofix-contracts.sh ci(autofix): add cross-package contract verification (#7642) 2026-07-24 05:13:04 +00:00
check-settings-schema.sh ci(autofix): recover from generated-artifact CI gates and stop silent stalls (#6998) 2026-07-17 03:26:43 +00:00
check-workflow-size.sh fix(ci): scope workflow-size ratchet to the PR that grew the file (#9931) 2026-08-25 01:46:34 +00:00
ci-flaky-rerun.mjs feat(ci): auto-open a deflake fix issue for confirmed flaky tests (#7231) 2026-07-19 16:49:29 +00:00
ci-runner-routing.test.mjs fix(ci): narrow serve-ab's self-hosted wipe to the A/B checkout dirs (#9228) 2026-08-24 13:27:38 +00:00
classify-release-notes.mjs fix(ci): route workflow label mutations through REST (#8761) 2026-08-09 15:05:15 +00:00
classify-release-notes.test.mjs fix(ci): route workflow label mutations through REST (#8761) 2026-08-09 15:05:15 +00:00
create-desktop-update-manifest.mjs feat(desktop): add Aliyun OSS release mirror (#8976) 2026-08-12 10:59:10 +00:00
create-electron-bridge-manifest.mjs fix(desktop): bridge Electron users on Windows and Linux (#9079) 2026-08-13 15:42:31 +00:00
pr-safety-precheck.mjs fix(ci): limit fork PR precheck to safety signals (#6178) 2026-07-02 20:56:41 +08:00
pr-safety-precheck.test.mjs fix(ci): limit fork PR precheck to safety signals (#6178) 2026-07-02 20:56:41 +08:00
qwen-triage-workflow.test.mjs fix(triage): compute the flake-gate diff before the env -i re-exec (#9468) 2026-08-19 14:37:44 +00:00
resanitize-git-config.sh fix(ci): make autofix verification gates hermetic to runner git config (#8961) 2026-08-13 11:39:04 +00:00
resolve-owning-packages.sh fix(autofix): resolve owning package for nested paths; report verify-failed handoffs as not pushed (#7330) 2026-07-20 14:39:56 +00:00
resolve-sandbox-image.mjs fix(autofix): bind the sandbox image to its pulled digest (#9527) 2026-08-21 06:46:52 +00:00
resolve-sandbox-image.test.mjs fix(autofix): bind the sandbox image to its pulled digest (#9527) 2026-08-21 06:46:52 +00:00
run-autofix-review-verification.sh fix(ci): neutralize legacy ##[ commands in autofix stdout echoes (#9871) 2026-08-25 02:17:46 +00:00
serve-ab-diff.mjs test(ci): stage on-disk session state in the serve A/B (#9444) 2026-08-20 14:09:03 +00:00
serve-ab-diff.test.mjs test(ci): stage on-disk session state in the serve A/B (#9444) 2026-08-20 14:09:03 +00:00
serve-ab-drive.mjs test(ci): stage on-disk session state in the serve A/B (#9444) 2026-08-20 14:09:03 +00:00
serve-ab-drive.test.mjs test(ci): stage on-disk session state in the serve A/B (#9444) 2026-08-20 14:09:03 +00:00
upsert-bot-comment.sh perf(ci): run docs-only automatic reviews at medium effort (#8648) 2026-08-07 17:00:32 +00:00
upsert-bot-comment.test.mjs perf(ci): run docs-only automatic reviews at medium effort (#8648) 2026-08-07 17:00:32 +00:00
upsert-deferred-issue.sh fix(ci): neutralize legacy ##[ commands in autofix stdout echoes (#9871) 2026-08-25 02:17:46 +00:00
web-shell-visuals-compose.mjs ci(web-shell): denoise cross-job font-AA so visual previews stop false-flagging (#7210) 2026-07-19 11:27:08 +00:00
web-shell-visuals-compose.test.mjs ci(web-shell): denoise cross-job font-AA so visual previews stop false-flagging (#7210) 2026-07-19 11:27:08 +00:00
web-shell-visuals-publish.mjs fix(ci): don't let one failing scenario sink the whole visual preview (#7511) 2026-07-23 02:34:07 +00:00
web-shell-visuals-publish.test.mjs fix(ci): don't let one failing scenario sink the whole visual preview (#7511) 2026-07-23 02:34:07 +00:00