-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(autofix): state the primary agent budget and use the step's headroom #8257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
07d1e1a
fix(autofix): budget the whole round, not just the agent step
c19ab88
Merge branch 'main' into autofix-agent-budget
wenshao f8fc0b5
fix(autofix): bound every long step and cap the timeout override (#8257)
qwen-code-dev-bot ff6276b
Merge branch 'main' into autofix-agent-budget
wenshao e8f59df
fix(autofix): enforce the timeout ceiling and trim review feedback (#…
72f337b
fix(autofix): force base-10 clamp and align stale bound with job cap …
60bedda
fix(autofix): close the clamp int64 escape and pin it with a bash rep…
2ea770e
fix(autofix): give the timeout clamp a floor, not only a ceiling
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] The
vars.QWEN_AUTOFIX_TIMEOUT_MSoverride has no upper clamp, so the budget↔cap invariant this PR adds a test to protect only holds for the hardcoded fallback7200000. — Failure scenario: a maintainer sets the repo variable to a round "give it more time" value such as9000000(150 min); a non-empty string is truthy in GitHub expressions, so the expression evaluates to9000000, not the fallback.run-agent.mjs:21then arms its internal timer at 150 min, but the step'stimeout-minutes: 130kills the process first —timedOutstays false, theagent-timeoutmarker (run-agent.mjs:329-330) is never written, and the report step misclassifies the round as a crash, which is exactly the misreport the new comment warns about. The headroom is only 10 minutes, so any override ≥ 7,800,000 ms breaks the invariant, and the new test (which only sees the literal fallback) cannot catch it.Recommended fix — state the ceiling next to the override (and optionally clamp in
run-agent.mjswithMath.min(parsed, cap)so the marker is still written):中文说明
[Suggestion]
vars.QWEN_AUTOFIX_TIMEOUT_MS覆盖值没有上限钳制,因此本 PR 新增测试所保护的「预算↔上限」不变量只对硬编码回退值7200000成立。—— 失败场景:维护者把仓库变量设成一个取整的「多给点时间」的值,例如9000000(150 分钟);非空字符串在 GitHub 表达式中为真,因此表达式求值为9000000而非回退值。run-agent.mjs:21随即把内部计时器定为 150 分钟,但 step 的timeout-minutes: 130会先杀掉进程——timedOut保持为 false,agent-timeout标记(run-agent.mjs:329-330)永远不会写出,上报步骤便把该轮误判为崩溃,而这正是新增注释所警告的误报。余量只有 10 分钟,因此任何 ≥ 7,800,000 ms 的覆盖值都会破坏该不变量,而新测试(只能看到字面回退值)无法捕获它。建议修复——在覆盖值旁注明上限(并可选地在
run-agent.mjs中用Math.min(parsed, cap)钳制,使标记仍会写出):见上方代码块。— qwen3.8-max-preview via Qwen Code /review