Files
goclaw/internal/pipeline
nguyenha935andnguyenha935 31f973477d test(pipeline): lock mid-loop compaction pressure flag end-to-end (#1479)
FinalizeStage forwards state.Prune.MidLoopCompacted into MaybeSummarize so a
mid-loop compaction gets persisted (TruncateHistory + IncrementCompaction)
instead of being thrown away and redone next turn. Nothing asserted the flag
value: TestFinalizeStage_MaybeSummarize_Called binds it as `_ bool`, so
hardcoding `false` at the call site keeps the whole suite green while silently
restoring the per-turn re-compaction loop and stalling the cumulative
compaction count episodic depends on.

Adds two cases driving the real NewDefaultPipeline().Run():
- a history large enough to force prune-stage compaction must reach
  MaybeSummarize with midLoopCompacted=true
- a small history must compact nothing and report false, so the flag cannot
  simply be pinned true

Mutation-verified: with the finalize call site hardcoded to false the new test
fails while the pre-existing pipeline and agent suites still pass.

Test-only change.

Co-authored-by: nguyenha935 <nguyenha935@users.noreply.github.com>
2026-07-25 15:02:08 +07:00
..
2026-07-15 09:56:43 +07:00