Compaction/Safeguard: preserve recent turns verbatim#25554
Compaction/Safeguard: preserve recent turns verbatim#25554jalehman merged 9 commits intoopenclaw:mainfrom
Conversation
e6f5191 to
c4188db
Compare
c4188db to
3652276
Compare
006446c to
5ec8a8a
Compare
5ec8a8a to
ddc5d3b
Compare
ddc5d3b to
cc02d4e
Compare
|
@greptileai please review and update PR description |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc02d4e70d
ℹ️ 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".
Greptile SummaryThis PR adds functionality to preserve recent user/assistant turns verbatim during safeguard compaction, addressing the problem where exact phrasing from the freshest turns could be lost. The implementation correctly splits out a configurable number of recent turns (default 3, max 12) before summarization and appends them to the final summary. Key changes:
Code quality:
Confidence Score: 5/5
Last reviewed commit: cc02d4e |
|
@jalehman Hey Josh, I have several follow up PRs chained on top of this one. Would you like to review / test them all at once? Or do you prefer this approach? |
fafd7b7 to
890d422
Compare
1a5e3db to
7fb33c4
Compare
|
Merged via squash. Thanks @rodrigouroz! |
Individual PRs as you have them are fine. I'll add your others to my queue. Thank you! |
Merged via squash. Prepared head SHA: 7fb33c4 Co-authored-by: rodrigouroz <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
pnpm vitest run src/agents/pi-extensions/compaction-safeguard.test.tspnpm tsgoExpected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
<0, unset, and very high values).Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/agents/pi-extensions/compaction-safeguard.ts,src/agents/pi-extensions/compaction-safeguard-runtime.tsRisks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.Stack: 2/9, depends on #25553.