You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: adjust compaction budgets for slimmer prompts - #4558
I have linked a related issue, or explained the problem above.
I have added tests that prove my feature works. (本 PR 为测试修复,目标文件 120/120 通过)
The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR. (无产品行为变化)
Ran gen-changesets skill, or this PR needs no changeset. (测试专用修复)
Ran gen-docs skill, or this PR needs no doc update. (测试专用修复)
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
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
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.
Requirement or Bug
修复 #4557 合入后 main 的
fullCompaction测试失败;该 PR 合并时尚未包含精简提示词后的预算与断言调整。Bug Reproduction Steps
在
cca9bae3d7a4c0eba95aec76e1b7aef912238973运行CI=true pnpm --filter @moonshot-ai/agent-core-v2 exec vitest run test/agent/fullCompaction/fullCompaction.test.ts,8 条用例因旧 token 数和 40k pre-shrink 预算失败。main CI run 41045333295 的test (4)出现同样失败。Root Cause
#4521 精简内置提示词后,测试夹具仍使用旧绝对 token 数和 40k pre-shrink 预算,导致不再触发预期的 compaction 行为。#4557 在测试修正提交推送前已经合并。
Code Changes
expect.any(Number),继续检查 compaction 的行为与计数,而不绑定提示词长度。仅修改
packages/agent-core-v2/test/agent/fullCompaction/fullCompaction.test.ts,无产品代码或行为变化。Behavior Changes and Affected Users
None:仅修正测试预算与断言。生产代码、默认配置、公开契约和用户可见行为均不变。
验证:
CI=true pnpm --filter @moonshot-ai/agent-core-v2 exec vitest run test/agent/fullCompaction/fullCompaction.test.ts,120/120 通过。Checklist
gen-changesetsskill, or this PR needs no changeset. (测试专用修复)gen-docsskill, or this PR needs no doc update. (测试专用修复)