Skip to content

test(core): cover token threshold compaction through harnesses - #3291

Merged
EItanya merged 1 commit into
kagent-dev:mainfrom
adalundhe:fix/go-compaction-behavior
Oct 20, 2026
Merged

EItanya merged 1 commit into
kagent-dev:mainfrom
adalundhe:fix/go-compaction-behavior

Conversation

@adalundhe

Copy link
Copy Markdown
Contributor

Summary

  • Exercise Harness token thresholds without an interval.
  • Check retained tails of one or three events through recorded model requests.
  • Verify that usage below the threshold leaves raw history intact.

The cases reuse the existing compaction models, recorder, and Harness fixture.
They assert which events reach the summarizer and which remain in the next agent request.

Validation

Commands run from go/:

  • go test -race -count=1 ./adk/pkg/agent -run 'TestCompaction|TestSummarizer' -v
  • go test -run '^$' ./core/test/e2e
  • make lint LINT_ARGS=./core/test/e2e
  • go test -race -v -count=1 -parallel=1 -timeout=15m ./core/test/e2e -run 'TestSession(Context|TokenThreshold)Compaction'

All four live cases pass in an isolated KIND fleet with the current controller and Go harness built from 2261632.

Assert configured token thresholds and retained event tails through recorded model requests. Reuse the existing Harness fixture and compaction responses, including a below-threshold control.

Verified Go runtime compaction tests and all four live Harness compaction cases with race detection. Focused core E2E lint and compilation pass.

Signed-off-by: Ada Lundhe <adalundhe@lundhe.audio>
@adalundhe
adalundhe requested a review from a team as a code owner October 20, 2026 15:20
@github-actions github-actions Bot added the testing Additional testing required label Oct 20, 2026
@EItanya
EItanya enabled auto-merge October 20, 2026 19:26
@EItanya
EItanya added this pull request to the merge queue Oct 20, 2026
Merged via the queue into kagent-dev:main with commit 48e11b5 Oct 20, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Additional testing required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址