Repository navigation
fix(codex): cap compaction override warning cache via createDedupeCache - #101745
vincentkoc merged 4 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 4, 2026, 3:14 AM ET / 07:14 UTC. ClawSweeper reviewWhat this changesThe PR replaces the Codex compaction override-warning Set with a 4,096-entry SDK deduplication cache and adds entry-point eviction-boundary coverage. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep open: current main still retains warning keys in an unbounded Set, and the patch has no source-level correctness finding. A final Codex contract and merge-ready verdict is blocked because the repository-required sibling Codex checkout is unavailable. Priority: P3 Review scores
Verification
How this fits togetherThe bundled Codex plugin sends compaction work to Codex app-server and warns when OpenClaw-specific compaction overrides cannot apply. The module-local cache suppresses duplicate operator warnings before native compaction continues. flowchart LR
A[Agent compaction settings] --> B[Codex compaction entry]
B --> C[Ignored override check]
C --> D[Bounded warning cache]
D --> E[Operator warning]
B --> F[Codex app-server request]
F --> G[Native thread compaction]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +65. Total +67 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the narrow SDK-cache replacement only after an exact-head review can inspect the required sibling Codex source and confirm the existing app-server contract. Do we have a high-confidence way to reproduce the issue? Yes from source: current main records each distinct ignored-override key in a process-lifetime Set, and the proposed test exercises the 4,096/4,097-key boundary through the entry point. This read-only review did not execute the test. Is this the best way to solve the issue? Yes for the local memory-boundary defect: the plugin already has an SDK-supported bounded dedupe cache, so using it preserves warn-once behavior until intentional LRU eviction without adding a parallel implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8393b37779d9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (43 earlier review cycles; latest 8 shown)
|
8516dbb to
d2d3e84
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
1 similar comment
|
@clawsweeper re-review |
d284a6d to
cdaa401
Compare
cdaa401 to
59d6fff
Compare
6e9acce to
536ad6f
Compare
ebbbdeb to
10f4d92
Compare
10f4d92 to
3c2a635
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
The Codex app-server ignored-compaction-override warning used a process-lifetime
Set<string>. Every distinct ignored override key remained in memory until thegateway exited.
Why This Change Was Made
The warning owner now uses the existing public SDK helper:
createDedupeCache({ ttlMs: 0, maxSize: 4096 }).This preserves ordinary warn-once behavior while bounding retained keys. A key
can warn again only after it is evicted from the 4,096-entry LRU cache.
The change does not alter configuration, persistence, provider routing, or the
Codex RPC.
User Impact
Gateways with ordinary ignored-override cardinality keep the same warning
behavior. High-cardinality configurations no longer grow this warning cache
without bound.
Evidence
36605735babdbd4ebc8d6733eb6b817fb6acf78a.mainstill contains the unbounded module-levelSet.openai/codex414782450952a196bbb64b1605a458c2531c47b6:codex-rs/app-server-protocol/src/protocol/v2/thread.rs:924-926definesThreadCompactStartParamswith onlythread_id.codex-rs/app-server/src/request_processors/thread_processor.rs:1755-1766loads that thread and submits
Op::Compact.codex-rs/core/src/tasks/compact.rs:17-75selects native compaction fromthe Codex turn context.
thread/compact/start; the warning remains accurate.node scripts/run-vitest.mjs extensions/codex/src/app-server/compact.test.ts -t "bounds ignored compaction override warnings".git diff --checkpassed.openclaw/ci-gate:https://github.com/openclaw/openclaw/actions/runs/30884809067
fix(codex): cap compaction override warning cache via createDedupeCache #101745 (comment)
before returning model output, so no autoreview result was available.
Production delta:
+5/-3(net+2). Tests:+65/-0.AI-assisted: built with Codex