qwen-code/.github
Shaojin Wen d9d210eb7a
feat(autofix): seed the takeover round counter with /takeover from N (#9321)
* feat(autofix): seed the takeover round counter with `/takeover from N`

Taking over a PR that has already been through several review rounds
restarted the Critical-only brake from zero: the round counter is
window-scoped, and engaging takeover opens a fresh window, so a PR that
spent nine human rounds getting to "almost mergeable" got five more
suggestion-capable rounds the moment it was managed — the diff grew on
nice-to-haves exactly where it should have been converging.

`@qwen-code /takeover from N` now seeds the window's counter at N, so
CRITICAL_ONLY_AFTER_ROUND is reached in the remainder rather than a full
fresh five. This is the one parameterized command form: the literal
prefix must still match TAKEOVER_COMMAND byte-for-byte, the tail is a
bounded 1-2 digit integer, and the captured value reaches nothing but an
integer comparison. Everything else — a prefixed body, a `stop from N`
hybrid, a substitution payload — still fails closed.

The seed rides as its own `<!-- autofix-round-start N -->` marker on a
separate line of the engage ack, never as a field inside
`<!-- takeover-ack engaged -->`. That literal is matched with jq
contains(), closing `-->` included, at seven read sites — four here and
three in the fleet shepherd's paused/resume detector — so an inline
field would silently break all of them: the window key would fall back
to an older ack and the shepherd would age out a PR that was just
re-armed. Same shape as the existing autofix-redcheck marker.

Both round readers fall back to the seed instead of a hardcoded 0, read
it by created_at equality against the window key (so a superseded
window's seed cannot leak forward), and clamp it strictly below the
effective cap so a seed can never park a PR at its round cap on the very
round it is taken over. The seed is window-scoped like every other
census: `/retry` or a bare re-takeover returns the counter to 0.

Both engage acks and the Critical-only audit record now name the seed
when there is one — otherwise the ack reports "round 4/100" on its first
managed round, and the audit record claims five completed rounds on a PR
the loop has run twice.

The growth brake is deliberately not seeded: its baseline anchors at the
window's first measured round, and a pre-takeover baseline is not
recoverable, so growth stays measured from engagement.

* fix(autofix): address the R1 review findings on the takeover round seed

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

* fix(autofix): address the R2 review findings on the takeover round seed

* fix(autofix): address the R3 review findings on the takeover round seed

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-18 01:53:07 +00:00
..
actions ci: run Windows merge queue tests on ECS (#8386) 2026-08-05 12:14:42 +00:00
assets fix(cli): echo resume command to main screen on exit (#8455) 2026-08-08 04:29:31 +00:00
ISSUE_TEMPLATE chore: re-organize labels for better triage results (#819) 2025-10-17 19:49:11 +08:00
scripts feat: chain Terminal-Bench release evaluation (#9120) 2026-08-17 05:53:06 +00:00
workflows feat(autofix): seed the takeover round counter with /takeover from N (#9321) 2026-08-18 01:53:07 +00:00
actionlint.yaml ci: add Windows runner smoke test (#8008) 2026-07-29 08:44:36 +00:00
CODEOWNERS chore(ci): Add security hygiene: CODEOWNERS for release workflows, least-privilege permissions, security checks and Scorecard (#9008) 2026-08-14 01:22:53 +00:00
dependabot.yml Limit dependabot PRs to security updates (#6657) 2025-08-20 22:24:43 +00:00
issue-owners.json feat(ci): auto-assign issues to area owners from labels (#8668) 2026-08-08 23:01:03 +00:00
pull_request_template.md docs(agents,pr-template): add Working Principles and restructure PR template (#4496) 2026-05-25 19:15:35 +08:00
release.yml ci: auto-skip internal CI changes in release notes (#7251) 2026-07-20 11:10:55 +00:00
spam-blocklist.txt ci: auto-minimize comments from org-blocked users (#7899) 2026-07-29 23:37:42 +00:00