Skip to content

fix: route manual/overflow compaction through compact() wrapper#298

Merged
jalehman merged 1 commit intoMartian-Engineering:mainfrom
electricsheephq:fix/route-sweep-through-compact-wrapper
Apr 6, 2026
Merged

fix: route manual/overflow compaction through compact() wrapper#298
jalehman merged 1 commit intoMartian-Engineering:mainfrom
electricsheephq:fix/route-sweep-through-compact-wrapper

Conversation

@100yenadmin
Copy link
Copy Markdown
Contributor

Summary

One-line fix: engine.ts called compaction.compactFullSweep() directly for manual and overflow compaction, bypassing the compact() method. This means the context cache optimization from PR #295 would not apply to manual /compact or overflow recovery paths.

Merge order: between #294 and #289 (touches engine.ts only, no conflicts with any other PR).

Part of the LCM Performance & Cache Optimization Sprint — see #297.

Change

- const sweepResult = await this.compaction.compactFullSweep({
+ const sweepResult = await this.compaction.compact({

compact() delegates to compactFullSweep() with the same signature. Currently identical behavior, but once #295 merges, compact() wraps with withContextCache for the read optimization.

Test

  • 107/107 engine tests pass

🤖 Generated with Claude Code

engine.ts called compaction.compactFullSweep() directly for manual
and overflow compaction paths, bypassing the compact() method. Once
PR Martian-Engineering#295 adds the withContextCache wrapper to compact(), this direct
call would miss the per-phase context cache optimization.

Change: compactFullSweep → compact (same signature, same behavior,
but goes through the wrapper that future PRs will enhance).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 6, 2026 18:01
@100yenadmin
Copy link
Copy Markdown
Contributor Author

Merge order: between #294 and #289 — touches engine.ts only, no conflicts.

Recommended full sequence: #288#294#298#289#295#296

See #297 for the full sprint tracking issue.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Routes manual and overflow compaction through the CompactionEngine.compact() wrapper so future wrapper-only optimizations (e.g., context cache from #295) apply consistently across compaction entry points.

Changes:

  • Replace direct call to compaction.compactFullSweep() with compaction.compact() for the sweep path in engine.ts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jalehman jalehman merged commit c9ca7e2 into Martian-Engineering:main Apr 6, 2026
7 of 9 checks passed
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