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
{{ message }}
Repository navigation
Commit f6bca07
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): finished outbox rows and old PR cache files are pruned
The orchestration effect outbox kept every succeeded, failed and cancelled
row forever (10,258 rows on a real install), and the pull request read
cache left one file per PR read on disk long after the entry expired
(739 files since Sep 15), because the persisted cache only drops an
expired entry when the same key is read again.
The outbox gets a `pruneSettled` method that deletes succeeded and
cancelled rows completed more than seven days ago, 500 rows per
statement so a backlog never holds the write lock for long. Failed rows
stay, because storage cleanup keeps a deleted thread's worktree while
any of its effects failed. Every other reader only asks whether a row is
pending or running, and the deterministic-id dedupe that relies on old
rows only spans one command retry or one restart. A layer-owned fiber
runs it after server activation and then hourly, in the production
orchestration layer.
The PR read cache layer sweeps its directory on the same schedule and
deletes `pr-v2` entry files not written for a day. Entries expire a
minute after they are written, so the day is only slack for clock
changes. The `revisions` scope file is left alone.
Event-store compaction (`compactEventStore`) stays unwired: command
retries replay their events, clients catch up from a cursor, and it
needs a vacuum to return space, so it needs its own design.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
0 commit comments