Skip to content

fix: correct compaction token estimates and completion state - #493

Merged
SudoJacky merged 1 commit into
masterfrom
fix/compaction-usage-and-completion
Sep 21, 2026
Merged

SudoJacky merged 1 commit into
masterfrom
fix/compaction-usage-and-completion

Conversation

@SudoJacky

Copy link
Copy Markdown
Owner

Compaction could report identical before/after token counts despite replacing the history, and a completed manual compaction could leave the chat showing a running response.

This change estimates the replacement provider request after clearing stale Responses replay on a projected context copy, matching the actual checkpoint installation. Ordinary requests retain their native replay. After manual compaction, the chat reloads the persisted terminal state; pending streaming frames cannot overwrite that state, and new live updates invalidate older in-flight loads.

Regression coverage checks compaction and trimming estimates against the resumed request, cached running state after compaction, and both timeline reload/frame ordering cases. Required architecture and module documentation are updated.

Validation completed locally during implementation:

  • 35 Rust context tests passed.
  • Related frontend runtime, service, projection, and usage tests passed.
  • TypeScript type checking, Rust formatting, and diff checks passed.
  • Commit hooks passed engineering documentation and module README freshness checks.

Scope is limited to the compaction fixes, regression tests, and their required technical documentation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T04:43:21.310029Z 811ac81 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SudoJacky
SudoJacky merged commit 62e8bf6 into master Sep 21, 2026
3 checks passed
@SudoJacky
SudoJacky deleted the fix/compaction-usage-and-completion branch September 21, 2026 03:27
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.

1 participant