Skip to content

fix(core): retain compaction markers required for replay - #434

Merged
lg2m merged 1 commit into
mainfrom
fix/compaction-retention
Oct 23, 2026
Merged

lg2m merged 1 commit into
mainfrom
fix/compaction-retention

Conversation

@lg2m

@lg2m lg2m commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Repeated automatic compaction could evict the session prefix or another retained run's summary, causing restart to reconstruct raw history that the live agent had already compacted.

Retain the three recent rollback checkpoints plus the session prefix and per-run markers needed to replay their baseline. Reclaim superseded versions and covered runs. Both commit paths use the same transaction-local collector, with indexed prompt lookups. No protocol or storage schema change.

Verification on 6304da3e: formatting, lint, strict all-feature Clippy, 2,401 affected-package tests (15 skipped), and all 11 CLI/server smoke scenarios passed. The regression fails with the original collector. A real isolated server completed six automatic compactions, restarted with its live prefix intact, and recorded 96 shell effects exactly once. Reviewed the final diff, rollback behavior, reclamation, and query plan locally.

cargo xtask check initially stopped at a shifted legacy sleep reference; the redundant comment was removed and lint plus remaining stages passed separately. A development shell-heavy fixture hit its helper deadline; the final builtin-write regression retains the same three-compaction requirement without changing the timeout.

First task #5 slice in docs/plans/README.md. Instruction retention, history retrieval, and reconciliation of #371 follow separately; this PR alone does not establish overall unattended readiness.

lg2m commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T03:38:59.719212Z 6304da3 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6304da3e5f

ℹ️ 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".

@lg2m
lg2m added this pull request to stack #438 October 23, 2026 05:20
@lg2m
lg2m merged commit 8631f17 into main Oct 23, 2026
7 checks passed
@lg2m
lg2m deleted the fix/compaction-retention branch October 23, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant