-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(goal): make get_goal's default view a summary instead of the whole catalog #9973
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
+289
−16
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
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 summary fixture gives every earlier-turn entry a 240-byte preview, so the branch where an earlier-turn preview is already within the 80-byte cap — kept unchanged and not counted in
shortenedPreviews— is never exercised. A mutation check confirmed the gap: changingif (preview !== entry.preview) shortenedPreviews += 1;to an unconditionalshortenedPreviews += 1;leaves the whole suite green (39/39), and the byte-identical pass-through guarantee for short earlier-turn previews is pinned by no assertion. A regression inflatingshortenedPreviewswould tell the model that aview: "full"read reveals more than it actually would — undermining the read-full decision the field exists to inform.Add one earlier-turn entry whose preview is already under the cap, keep the count at 60, and pin the pass-through:
The probe verified the new assertion earns its place: the same mutant fails with
AssertionError: expected 61 to be 60once that entry exists, and the un-mutated code stays green with it.中文说明
摘要视图的 fixture 给每一条更早轮次的条目都设置了 240 字节的 preview,因此「更早轮次的 preview 已经在 80 字节上限之内——保持原样且不记入
shortenedPreviews」这个分支从未被执行。变异检验确认了这个缺口:把if (preview !== entry.preview) shortenedPreviews += 1;改成无条件的shortenedPreviews += 1;,整个测试套件仍然全绿(39/39);短 preview 逐字节原样返回的保证也没有任何断言锁定。一个夸大shortenedPreviews的回归会告诉模型view: "full"读取能揭示比实际更多的内容——破坏了这个字段本要支撑的「是否值得完整读取」的决策。修复方式:在
checkpointedCatalogfixture 中增加一条 preview 已低于上限的更早轮次条目(示例见上方英文代码块),计数保持 60,并断言该短 preview 原样返回。探针已验证该断言有效:加入该条目后,同一变异体以AssertionError: expected 61 to be 60失败,未变异代码保持全绿。— qwen3.8-max via Qwen Code /review (v0.22.0)