Skip to content

refactor(context): simplify micro compact builder wiring#25

Merged
Yumiue merged 2 commits intomainfrom
refactor/micro-compact-config-aggregation
Apr 24, 2026
Merged

refactor(context): simplify micro compact builder wiring#25
Yumiue merged 2 commits intomainfrom
refactor/micro-compact-config-aggregation

Conversation

@fennoai
Copy link
Copy Markdown

@fennoai fennoai Bot commented Apr 24, 2026

Requested by @Yumiue

Summary

  • Remove unused newDefaultBuilder helper in context builder.
  • Merge duplicated return paths in applyReadTimeContextProjection without behavior changes.
  • Keep existing compatibility constructors and tests unchanged.

Yumiue and others added 2 commits April 24, 2026 21:01
- 新增 MicroCompactConfig 结构体,将 MicroCompactPolicySource、
  MicroCompactSummarizerSource、MicroCompactPinChecker 三个接口
  打包为单一配置对象,简化 Builder 构造参数
- 新增 NewConfiguredBuilder 作为统一构造入口,支持可变 SectionSource
- newPromptSources 改为接受 ...SectionSource 可变参数,nil 自动跳过
- 旧构造函数保留并标记 Deprecated,委托到新入口
- 更新 bootstrap.go 和 runtime.go 使用新构造 API
- 补充 TestNewConfiguredBuilder 覆盖 5 个子场景

关联: 1024XEngineer#416
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Yumiue <188874804+Yumiue@users.noreply.github.com>
@Yumiue Yumiue merged commit b50e00d into main Apr 24, 2026
1 of 2 checks passed
@fennoai fennoai Bot deleted the refactor/micro-compact-config-aggregation branch April 24, 2026 13:26
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.36842% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/context/builder.go 96.55% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants