Skip to content

refactor(config): retire compaction truncateAfterCompaction gate - #115206

Merged
steipete merged 1 commit into
mainfrom
steipete/issue-112476-status-9f26b4
Jul 28, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/issue-112476-status-9f26b4

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

agents.defaults.compaction.truncateAfterCompaction is a stale two-flag trap. #113233 deleted the file-era JSONL successor-transcript rotation the flag originally controlled, leaving it as a pure enable-gate for maxActiveTranscriptBytes: a configured byte threshold silently no-ops unless the second flag is also set (#100529), and the config help/type docs still describe deleted rotation behavior.

Why This Change Was Made

Per the config-surface-reduction bar, a knob whose only job is to arm another knob should not exist. After this change, maxActiveTranscriptBytes > 0 alone opts in to both remaining behaviors:

  • core preflight byte-triggered compaction (resolveMaxActiveTranscriptBytes in src/auto-reply/reply/memory-flush.ts)
  • the Codex app-server native-rollout byte guard (extensions/codex/src/app-server/startup-binding.ts), where the behaviorally dead truncateAfterCompaction tail block is also deleted; the context-engine bootstrap deferral is preserved

openclaw doctor --fix migrates shipped configs: the retired key is stripped everywhere; when a config had the explicit opt-out truncateAfterCompaction: false alongside a configured maxActiveTranscriptBytes, the byte threshold is removed too so the user's explicit opt-out is preserved. Config help, labels, type docs, and the three docs pages are rewritten to the actual semantics.

User Impact

Closes #100529.

Evidence

  • Focused proof (local, trusted source): node scripts/run-vitest.mjs over the doctor migration tests, config schema tests, agent-runner-memory tests, and the Codex startup-binding tests — 4 shards, 250 tests passed; help-quality suite 24 passed; git diff --check clean.
  • Doctor migration tests cover all four states: {true + maxBytes} → flag stripped/maxBytes kept, {false + maxBytes} → both removed, {true} → stripped, untouched config → no changes.
  • Codex-backed autoreview (gpt-5.6-sol, xhigh): clean, no accepted findings.
  • Codex native-rollout semantics verified against sibling ../codex source (codex-rs/app-server/src/request_processors/thread_processor.rs, codex-rs/rollout/src/recorder.rs).
  • Net diff: −40 lines total; production TypeScript net −1 with a new 21-line doctor migration included.

@steipete
steipete marked this pull request as ready for review July 28, 2026 13:21
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: codex size: M maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete steipete closed this Jul 28, 2026
@steipete steipete reopened this Jul 28, 2026
@steipete
steipete merged commit 2160b97 into main Jul 28, 2026
292 of 307 checks passed
@steipete
steipete deleted the steipete/issue-112476-status-9f26b4 branch July 28, 2026 15:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 28, 2026
* origin/main:
  test(codex): de-flake attempt turn-watch timing tests (#115258)
  fix: preserve retryable ACPX lease ownership (#115247)
  fix: serialize ACPX lease ownership transitions
  fix: retain ACPX leases across wrapper reconnects
  refactor: parse ACPX lease command identity
  fix: preserve OpenClaw profile env in macOS launch-at-login plist (#99752)
  refactor(config): retire compaction truncateAfterCompaction gate (#115206)
  improve(ui): reduce duplicate chat startup work (#114743)
  fix(ui): keep reconnects, browser tabs, and localized search consistent (#115221)
  perf(pr): cache complete small file lists (#115199)
  perf(sqlite): skip no-op automatic schema repair (#115193)
  docs(browser): correct Docker sandbox setup (#115254)
  fix(ui): avoid duplicate session refreshes during startup (#114764)

# Conflicts:
#	ui/src/pages/agents/panels-tools-skills.browser.test.ts
vincentkoc added a commit that referenced this pull request Jul 28, 2026
* origin/main:
  test(codex): de-flake attempt turn-watch timing tests (#115258)
  fix: preserve retryable ACPX lease ownership (#115247)
  fix: serialize ACPX lease ownership transitions
  fix: retain ACPX leases across wrapper reconnects
  refactor: parse ACPX lease command identity
  fix: preserve OpenClaw profile env in macOS launch-at-login plist (#99752)
  refactor(config): retire compaction truncateAfterCompaction gate (#115206)
  improve(ui): reduce duplicate chat startup work (#114743)
  fix(ui): keep reconnects, browser tabs, and localized search consistent (#115221)
  perf(pr): cache complete small file lists (#115199)
  perf(sqlite): skip no-op automatic schema repair (#115193)
  docs(browser): correct Docker sandbox setup (#115254)
  fix(ui): avoid duplicate session refreshes during startup (#114764)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool-result pruning silently omits results (reads as 'empty output'); maxActiveTranscriptBytes silently no-ops without truncateAfterCompaction

1 participant