qwen-code/.github/scripts
Shaojin Wen a5d77eb817
chore(ci): migrate autofix prose to the design record and ratchet growth (#9677)
* chore(ci): migrate autofix prose to the design record and ratchet growth

`qwen-autofix.yml` was at 462,720 bytes — 90% of GitHub's 500 KB
start-runs limit and 7,280 under this repo's gate. The prose migration in
#9517 had regained 78 KB; a single feature commit gave 25 KB of it back
two days later, 53% of it comment lines that belonged in the design
record. Nothing objected, because the gate is a ceiling and only speaks
when a file is already at the wall.

Two changes, addressing the level and the slope.

Level: 76 comment blocks of 8+ lines move into qwen-autofix.md as
af-073..af-148, each leaving its opening two lines plus the usual
pointer. The file drops to 419,995 — 50 KB under the gate.

Slope: every workflow's recorded size now lives in
.github/workflows/.size-baseline, and check-workflow-size.sh fails a file
that exceeds its entry by more than 4 KB. Growing a file is still
allowed; the ratchet only insists the growth be visible in review instead
of discovered at the wall. A file well under its baseline warns so the
slack is reclaimed rather than banked.

Two things the migration had to learn, both caught by contract tests
rather than by inspection:

Identical prose shares one af id. A step inlined into several jobs must
stay byte-identical across copies, and minting a separate id per copy
broke that for the git-config sanitize step — same length, different
pointer digits.

A cross-file editing contract is not prose. "This copy and the one in
qwen-triage must be edited together" only does its job where the editor
will see it; moving it to the design record is how a lockstep silently
breaks. Blocks naming a sibling workflow or script, or spelling the
contract out, stay put.

Behaviour is unchanged and checked, not assumed: both YAML documents were
parsed and compared with comment lines dropped from every string, and
they are equal.

* fix(ci): harden the workflow-size ratchet per review

- key the vitest baseline lookups by separator-agnostic file name so the
  merge-queue Windows lane resolves entries (split('/') missed win32 joins)
- fail closed on malformed .size-baseline lines: non-numeric values,
  leading zeros (bash octal), and extra fields no longer disable or
  mis-key the ratchet; keep an unterminated final line
- execute the gate script end-to-end in tests (growth, missing entry,
  missing baseline, slack warning, malformed line) so its decision
  branches are witnessed
- correct af-079/af-123/af-084 attributions in the design record

* fix(ci): pin ratchet boundaries and skip pre-bash-4 test hosts

* fix(ci): end migrated autofix teasers at sentence boundaries per review

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-22 16:31:56 +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 chore(ci): migrate autofix prose to the design record and ratchet growth (#9677) 2026-08-22 16:31:56 +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 chore(ci): migrate autofix prose to the design record and ratchet growth (#9677) 2026-08-22 16:31:56 +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): back-port the checkout-heal wipe guard to the triage and serve-ab wipes (#9277) 2026-08-18 06:49:40 +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 feat(autofix): audit the approach instead of stopping on growth-budget breach (#9262) 2026-08-21 04:54:07 +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 feat(autofix): defer verified out-of-footprint findings to a surviving follow-up queue (#9189) 2026-08-16 11:28:05 +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