Skip to content

[codex] expose context compaction gates (#3765)#3780

Open
nightt5879 wants to merge 2 commits into
Hmbown:mainfrom
nightt5879:nightt5879/issue-3765-context-gates
Open

[codex] expose context compaction gates (#3765)#3780
nightt5879 wants to merge 2 commits into
Hmbown:mainfrom
nightt5879:nightt5879/issue-3765-context-gates

Conversation

@nightt5879

Copy link
Copy Markdown
Contributor

Summary

Closes #3765.

  • Adds [compaction].enabled as an engine-level config.toml switch for replacement compaction.
  • Adds [seam_manager].enabled as an explicit alias for the Flash seam manager master switch while keeping thresholds/model under [context].
  • Keeps existing behavior compatible when [compaction].enabled is unset: runtime compaction still follows the saved auto_compact settings/default path.
  • Updates config.example.toml and docs/CONFIGURATION.md so power users can discover the hard gates.

Credit: thanks @Mr-Moon121 for the concrete report and config-surface request in #3765.

Verification

  • cargo fmt --all --check
  • cargo test -p codewhale-tui --bin codewhale-tui --locked compaction
  • cargo test -p codewhale-tui --bin codewhale-tui --locked seam_manager_enabled
  • cargo test -p codewhale-tui --bin codewhale-tui --locked profile_without_context_gates
  • cargo test -p codewhale-tui --bin codewhale-tui --locked config
  • cargo test --workspace --locked
  • cargo build --release -p codewhale-cli -p codewhale-tui --locked

Add config.toml switches for the two context-maintenance mechanisms from Hmbown#3765: [compaction].enabled controls replacement compaction at the engine layer, and [seam_manager].enabled is an explicit alias for the Flash seam manager master switch.

The default path stays compatible: if [compaction].enabled is unset, runtime compaction still follows the existing auto_compact settings/default behavior.

Credit: thanks @Mr-Moon121 for the concrete Hmbown#3765 report and config-surface request.

Verification:

- cargo fmt --all --check

- cargo test -p codewhale-tui --bin codewhale-tui --locked compaction

- cargo test -p codewhale-tui --bin codewhale-tui --locked seam_manager_enabled

- cargo test -p codewhale-tui --bin codewhale-tui --locked profile_without_context_gates

- cargo test -p codewhale-tui --bin codewhale-tui --locked config

- cargo test --workspace --locked

- cargo build --release -p codewhale-cli -p codewhale-tui --locked

Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
@nightt5879 nightt5879 marked this pull request as ready for review June 29, 2026 07:28
@nightt5879 nightt5879 requested a review from Hmbown as a code owner June 29, 2026 07:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e80e111713

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/tui/src/tui/app.rs Outdated
Comment thread crates/tui/src/tui/app.rs
Address Codex review feedback on PR Hmbown#3780.\n\nKeep the runtime [compaction].enabled override in sync when config.toml is reloaded or a profile switch loads a new Config, and use the effective automatic compaction gate for the pre-send trigger and context-pressure guidance.\n\nVerification:\n- cargo fmt --all --check\n- cargo test -p codewhale-tui --bin codewhale-tui --locked compaction\n- cargo test --workspace --locked\n- cargo build --release -p codewhale-cli -p codewhale-tui --locked\n\nSigned-off-by: Nightt <nightt5879@users.noreply.github.com>
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.

Expose SeamManager.enabled and CompactionConfig.enabled to config.toml

1 participant