Repository navigation
fix(agents): handle preflight compaction no-op budgets - #86709
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 25, 2026, 10:31 PM ET / 02:31 UTC. Summary PR surface: Source +28, Tests +113. Total +141 across 6 files. Reproducibility: yes. from source: current main treats an ok but non-compacted preflight result as failure, and the PR adds a focused test for that path. I did not run the runtime path because this review is read-only. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the patch after maintainer review confirms that no-op success and compaction-model budget clamping are the intended behavior for existing agent sessions. Do we have a high-confidence way to reproduce the issue? Yes from source: current main treats an ok but non-compacted preflight result as failure, and the PR adds a focused test for that path. I did not run the runtime path because this review is read-only. Is this the best way to solve the issue? Yes, pending maintainer compatibility review: accepting ok non-compacted results and clamping to the compaction model is a narrow fix in the affected agent memory and compaction code, not a new product surface. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 34d862d45d68. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +28, Tests +113. Total +141 across 6 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Pearl Crabkin Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
3b4e502 to
84400c9
Compare
84400c9 to
4230ce5
Compare
* fix(auto-reply): accept no-op preflight compaction * fix(agents): clamp compaction runtime budget * fix(agents): clamp queued compaction budget
* fix(auto-reply): accept no-op preflight compaction * fix(agents): clamp compaction runtime budget * fix(agents): clamp queued compaction budget
* fix(auto-reply): accept no-op preflight compaction * fix(agents): clamp compaction runtime budget * fix(agents): clamp queued compaction budget
Summary
ok: true, compacted: falsepreflight compaction results as successful no-ops instead of failing the reply path.src/auto-reply/reply/agent-runner-memory.tsinto runtime compaction so the compactor evaluates the same budget that triggered preflight.src/agents/pi-embedded-runner/compact.ts, so an active conversation model cannot overstate the capacity of a smaller compaction model.Verification
git diff --checkpnpm tsgo:corepnpm check:test-typesReal behavior proof
Behavior addressed: preflight compaction no longer fails a successful no-op result, while runtime compaction still receives and clamps the caller budget safely.
Real environment tested: local OpenClaw checkout on branch
fix/preflight-compaction-noop.Exact steps or command run after this patch:
git diff --check;pnpm tsgo:core.Evidence after fix: whitespace check passed; core TypeScript lane passed.
Observed result after fix: branch typechecks with the new budget-forwarding and budget-clamping paths.
What was not tested: focused Vitest completion; local Vitest processes remained CPU-bound with no output and were killed after bounded waits.