fix(core): honor compaction disable settings#32864
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: The search found two potentially related PRs that address compaction configuration:
These PRs may have overlapping concerns with the current PR #32864 regarding compaction configuration and auto-compaction behavior. You should review them to ensure there's no duplicate work, especially around config overrides and provider overflow recovery handling. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Issue for this PR
Fixes #32385
Type of change
What does this PR do?
This PR makes the compaction disable settings take effect in both config loading and V2 provider-overflow recovery.
OPENCODE_DISABLE_AUTOCOMPACTandOPENCODE_DISABLE_PRUNEas highest-priority core config overrides so environment variables win over lower-priority config files.compactAfterOverflowfrom auto-compacting whencompaction.autois disabled.This fixes the issue where users could set
compaction.auto: falseorOPENCODE_DISABLE_AUTOCOMPACT=truebut still get automatic compaction after provider context overflow.How did you verify your code works?
From
packages/core:bun test test/session-compaction.test.tsbun test test/config-env.test.tsbun test test/session-runner.test.ts --test-name-pattern "provider context overflow"bun typecheckScreenshots / recordings
Not applicable; this is a core/session behavior change with no UI changes.
Checklist
Reference: #32385