qwen-code/scripts
Shaojin Wen f89335e453
fix(autofix): stop counting idle timeouts toward the timeout cap (#9673)
* fix(autofix): stop counting idle timeouts toward the timeout cap

TIMEOUT_WINDOW_CAP exists to stop a PR that is too big to finish a round
inside the agent's time budget, and its remedy says exactly that: split
the PR or raise the budget. A silent-sandbox (idle) timeout is a
different failure entirely — the idle watchdog kills the round because
the sandbox produced no output at all, so no budget increase cures it
and nothing about the PR caused it. Counting a failure whose prescribed
remedy is inapplicable is what parked healthy PRs: over the 14 days to
2026-08-21 idle rounds were 58 of 119 timeouts, every one of the 51
windows that tripped this cap tripped it at exactly three, and 9 of the
12 PRs then carrying autofix/needs-human had been stopped here — #8332
at 24 rounds, #8368 at 28, #8276 at 16, all still pushing rounds when
they were parked.

Gate the cap on budget timeouts alone. A persistently wedged sandbox
stays bounded, because an idle round pushes nothing and resets no
streak, so CONSECUTIVE_FAILURE_CAP still terminates it; what no longer
terminates is idle rounds interleaved with real progress, where the PR
is not stuck and the runner is. Idle rounds stay visible through a
job-log warning, which reaches whoever owns the runners without
spending a comment on someone's PR.

Two consequences inside the census. The idle needle became the full
emitted headline prefix rather than a bare substring, because the count
is now subtracted and must be a subset of the total — a loose needle
could match provider error text on the same line and drive the
difference negative. And the all-idle remedy branch is gone as
unreachable: the guard now fires only when budget timeouts alone reach
the cap, so a counted window always holds more of them than idle ones.

* fix(autofix): emit idle census warning on terminal runs (#9673)

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

* fix(autofix): pin idle-census counts and extend idle exclusion to prepare census (#9673)

* test(autofix): reuse pinned IDLE_HEAD fixture in timeout-census replay (#9673)

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-22 04:48:03 +00:00
..
installation fix(install): avoid Get-FileHash for Windows checksums (#9112) 2026-08-14 01:12:08 +00:00
lib
tests fix(autofix): stop counting idle timeouts toward the timeout cap (#9673) 2026-08-22 04:48:03 +00:00
acp-http-smoke.mjs
audit-runtime-critical.js ci: keep the critical-audit gate honest when npm cannot answer (#7743) 2026-07-26 06:59:13 +00:00
benchmark-api-latency.mjs
build-hosted-installation-assets.js
build-standalone-release.js fix(packaging): bundle clipboard addon in standalone builds (#6708) 2026-07-11 15:18:24 +00:00
build.js fix(devx): fail with actionable message when unit-test build prerequisites are missing (#9149) (#9171) 2026-08-18 13:19:09 +00:00
build_package.js
build_sandbox.js
build_vscode_companion.js
check-build-status.js fix(review): report what the transcripts prove; build the roster in one call (#7033) 2026-07-18 00:43:57 +00:00
check-desktop-isolation.js feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
check-i18n.ts fix(cli): localize approval mode UI labels (#6592) 2026-07-11 00:07:03 +00:00
check-lockfile.js
check-serve-fast-path-bundle.js feat(ci): fail the startup bundle check when the CLI entry is hoisted into a chunk (#8203) 2026-07-31 08:57:57 +00:00
check-voice-guard-sync.js feat(voice): support trusted private ASR base URLs (#8350) 2026-08-06 14:04:57 +00:00
clean-package-build-artifacts.js feat(channels): GitHub polling adapter with notification-as-wakeup architecture (#7632) 2026-07-25 09:31:50 +00:00
clean.js
cli-entry.js fix(cli): preserve Qwen Review startup version in footers (#8431) 2026-08-04 14:58:56 +00:00
copy_bundle_assets.js refactor(cli): consolidate shared helpers ahead of the legacy audit skill (#9345) 2026-08-19 14:53:44 +00:00
copy_files.js refactor(core): move review skill incident narratives to DESIGN.md (#8499) 2026-08-04 12:41:18 +00:00
create-standalone-package.js feat(review): say so when the bundle is older than the review it runs (#8390) 2026-08-07 03:21:26 +00:00
create_alias.sh
daemon-dev.js fix(scripts): allow multiple dev:daemon instances by probing Vite port (#7212) 2026-07-19 12:49:47 +00:00
desktop-openwork-sync.ts
dev.js fix(review): report what the transcripts prove; build the roster in one call (#7033) 2026-07-18 00:43:57 +00:00
esbuild-shims.js
generate-changelog.js feat(release): user-facing bilingual digest for release notes (#9216) 2026-08-17 00:12:04 +00:00
generate-git-commit-info.js
generate-release-notes.js feat(release): user-facing bilingual digest for release notes (#9216) 2026-08-17 00:12:04 +00:00
generate-settings-schema.ts revert: remove local PR verification gate (#7031) 2026-07-16 11:24:38 +00:00
get-release-version.js fix(ci): force-push release branch so retries replace failed attempts (#9076) (#9082) 2026-08-16 16:33:14 +00:00
lint.js fix(ci): cache downloaded linters on ECS runners (#9001) 2026-08-13 05:13:23 +00:00
local_telemetry.js
measure-flicker.mjs
pre-commit.js
prepare-package.js chore(deps): bump sharp to ^0.35.0 to resolve GHSA-f88m-g3jw-g9cj (#8952) 2026-08-13 06:56:10 +00:00
prepare.js feat(web-shell): git status chip, visual working-tree diff, and sidebar git status (#7054) 2026-07-18 10:06:07 +00:00
release-script-utils.js
review-audit-layers.mts feat(review): cover modeled-system defect layers in the reverse audit (#8956) 2026-08-12 18:15:11 +00:00
run-java-daemon-sdk-e2e.ts ci: reduce SDK Java runner queueing (#8441) 2026-08-03 16:21:05 +00:00
sandbox_command.js fix(scripts): avoid shell injection in sandbox command detection (#6108) 2026-07-01 16:20:40 +08:00
sdk-node-exporter-stub.js chore(deps): Clear high-severity CVE baseline and harden the security gate (#9584) 2026-08-21 07:43:32 +00:00
sign-release.sh
start.js fix(review): report what the transcripts prove; build the roster in one call (#7033) 2026-07-18 00:43:57 +00:00
sync-computer-use-schemas.ts
telemetry.js
telemetry_gcp.js
telemetry_utils.js
test-rewind-e2e.sh
test-windows-paths.js
unused-keys-only-in-locales.json
upload-aliyun-oss-assets.js
verify-capture.mjs fix(ci): avoid verify capture color conflict (#8236) 2026-07-31 14:15:40 +00:00
verify-installation-release.js
version.js fix(release): pin channel-base dep to exact version during release bump (#7953) 2026-07-28 16:58:28 +00:00
vitest-global-setup.js fix(devx): fail with actionable message when unit-test build prerequisites are missing (#9149) (#9171) 2026-08-18 13:19:09 +00:00
workspaces.js