refactor: 移除 MicroCompact 子系统#707
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| StableSystemPrompt: stablePrompt, | ||
| DynamicSystemPrompt: dynamicPrompt, | ||
| Messages: applyReadTimeContextProjection( | ||
| Messages: ProjectToolMessagesForModel( |
There was a problem hiding this comment.
With micro-compact removed, this path now projects every retained tool result at full DefaultOutputLimitBytes size. The default read_time_max_message_spans=24 can therefore send many 64 KiB tool outputs back through prompt estimation/provider calls, and it also keeps sensitive tool output visible longer than before. Please keep a read-time per-tool excerpt/sanitization step here (similar to the recent/memo projection) or otherwise bound projected tool content after trimming.
| }) | ||
| } | ||
|
|
||
| contextBuilder = agentcontext.NewConfiguredBuilder() |
There was a problem hiding this comment.
This block is not gofmt-formatted (the assignment and closing brace are over-indented). Running gofmt also changes several nearby files touched by this PR, so please format the changed Go files before merging.
概述
本 PR 彻底移除 MicroCompact 子系统,降低上下文管理模块的复杂度,明确 compact 策略的单一职责。
Closes #706
变更内容
删除文件(9 个,约 2200 行)
internal/context/microcompact.gointernal/context/microcompact_test.gointernal/context/microcompact_summarizer_test.gointernal/context/pin_checker.gointernal/context/pin_checker_test.gointernal/tools/micro_compact_policy.gointernal/tools/micro_compact_summarizer.gointernal/tools/micro_compact_summarizer_test.gointernal/tools/micro_compact_summarizers_builtin.go修改文件(约 20 个)
internal/context/types.go— 移除 MicroCompact 相关类型与字段internal/context/builder.go— 移除 microcompact 引用与构建逻辑internal/context/projection.go— 移除 microcompact 投影逻辑internal/config/context.go— 移除 microcompact 配置项internal/config/loader.go— 移除配置加载中的 microcompact 分支internal/tools/manager.go— 移除 summarizer 注册internal/tools/registry.go— 移除 microcompact 工具注册internal/runtime/runtime.go— 移除 runtime 中的 microcompact 引用internal/app/bootstrap.go— 移除启动时的 microcompact 初始化docs/context-compact.md— 移除 microcompact 相关文档docs/tech-debt.md— 更新技术债务清单docs/roadmap.md— 更新路线图影响分析
go build ./...通过 ✅go test ./...通过 ✅测试计划
go build ./...编译通过go test ./...全部通过go vet ./...无警告