-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(ci): keep the review workflow under the expression-length limit #8720
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
+85
−11
Merged
Changes from all commits
Commits
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
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
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.
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 stale-head slice gains a
-1guard for its start anchor, but its end anchor stays unguarded — and this is the one slice in the family where losing the anchor keeps every assertion green. The siblings protect themselves:smallPrArm/belowMaxArmcarrynot.toContainassertions that fail on an over-expanded slice, and the at-max arm explicitly guards its end anchor (expect(atMaxEnd).toBeGreaterThan(-1)). This slice has only positive assertions, so it is the lone exception — exactly the silent-degradation mode the comment above describes. — Failure scenario: ifPROMPT="/review ${REVIEW_URL}"is ever reworded (the workflow already builds PROMPT conditionally with--effort/--commentsuffixes, so churn is plausible),indexOfreturns-1,slice(staleHeadStart, -1)silently expands to the entire rest of the run body, and all three positivetoContainassertions still pass — the ordering the test name pins ("before invoking qwen") silently dies. Probe-confirmed: rewording the anchor kept the test green; adding the guard below flipped it to a hard failure under the same mutation.中文说明
这个 stale-head 切片为起始锚点新增了
-1保护,但结束锚点仍未加保护——而在整个切片家族中,这是唯一一个丢失锚点后所有断言依然全绿的切片。兄弟切片都有自保护:smallPrArm/belowMaxArm带有not.toContain断言,切片过度展开时会失败;at-max 分支显式保护了结束锚点(expect(atMaxEnd).toBeGreaterThan(-1))。这个切片只有正向断言,因此是唯一的例外——恰恰就是上方注释所描述的静默退化模式。失败场景:如果PROMPT="/review ${REVIEW_URL}"将来被改写(workflow 中 PROMPT 本来就带条件拼接,如--effort/--comment后缀,改动是很可能发生的),indexOf返回-1,slice(staleHeadStart, -1)会静默扩展到 run 正文的整个剩余部分,三个正向toContain断言全部照常通过——测试名称所钉住的顺序("在调用 qwen 之前")就悄无声息地失效了。已通过探针验证:改写锚点后测试仍为绿;加上以下保护后,同样的变异会变为硬性失败。— qwen3.8-max via Qwen Code /review (v0.21.7)