You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds read-only event-log status plus explicit, dry-run-by-default bounded compaction (--session or --all, --apply, maximum 10,000 rows). Apply verifies latest message/part projection contents, batches in one immediate transaction, and only writes checkpoints for aggregates with no workspace or sync owner. Sync has no marker version negotiation, so synced/owned aggregates are reported and rejected.
How did you verify your code works?
bun test test/session-event-log-compaction.test.ts test/event.test.ts
bun typecheck (30 packages)
Prettier check
Screenshots / recordings
Not applicable; database maintenance CLI.
Checklist
I have tested my changes locally
I have not included unrelated changes in this PR
AI assistance
AI assistance: Yes
Tool(s): GPT-5.6-terra via OpenCode
Used for: Implementation, tests, and review-driven revision; Chris owns the change.
Rebased onto current dev (323d687173) and reverified after the latest upstream changes.
Fresh production evidence from today: ~/.local/share/opencode/opencode.db is now 27.2 GiB (page_size=4096, page_count=7,124,817, freelist_count=0), so this remains live append-only event data rather than reclaimable SQLite slack.
Verification on the rebased branch:
bun test test/session-event-log-compaction.test.ts test/event.test.ts — 45 passed
bun typecheck — 30 tasks passed across the workspace
bun prettier --check $(git diff --name-only origin/dev...HEAD) — passed
The branch is current, clean, mergeable, and CI is green. Maintainer review would be appreciated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #33356
Type of change
What does this PR do?
Adds read-only event-log status plus explicit, dry-run-by-default bounded compaction (
--sessionor--all,--apply, maximum 10,000 rows). Apply verifies latest message/part projection contents, batches in one immediate transaction, and only writes checkpoints for aggregates with no workspace or sync owner. Sync has no marker version negotiation, so synced/owned aggregates are reported and rejected.How did you verify your code works?
bun test test/session-event-log-compaction.test.ts test/event.test.tsbun typecheck(30 packages)Screenshots / recordings
Not applicable; database maintenance CLI.
Checklist
AI assistance