Repository navigation
chore(fork): carry the event-history-retention patch - #173
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add event history retention mapping .github/fork-patches.txt |
Adds event-history-retention to the ordered patch list, mapped to patch/event-history-retention and pingdotgg/t3code#28144. Comments describe startup table creation and an upstream migration change before the patch is dropped. |
Estimated code review effort: 1 (Trivial) | ~3 minutes
Suggested labels: coderabbit-queue
Merge Risk: 
Minimal · up to f545e
-
The patch-list change is ready to merge with no identified blocking risk.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description is mostly complete. It includes the problem, change details, upstream issue reference, verification results, risks, recovery information, and agent details. It does not use a separate “Scope and approval” heading or state explicit maintainer approval, but the relevant scope and justification are described in the Change section.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
The stl-wsl database is 42 GB, and most of it is thread event history nothing reads. Upstream pingdotgg#28144 prunes thread events older than a day while keeping the projections that threads are read from.
Change
Adds
event-history-retention patch/event-history-retention pingdotgg/t3code#28144to.github/fork-patches.txt, with a comment for whoever drops it later.The patch branch is pingdotgg#28144's head merged with the fork's current upstream base (
84537c4dd9), plus three commits:CREATE TABLE IF NOT EXISTSat the end ofrunMigrations. Upstream already took id 77, and the migrator skips every id at or below the highest recorded, so a fork-only id would make the database skip upstream's next migration.aggregate_kind, so SQLite seeksidx_orch_events_stream_sequenceinstead of scanning every event written since the pass began. A Sol review found it, andEXPLAIN QUERY PLANon a copy of the real database confirms the new plan.When pingdotgg#28144 lands upstream, its migration has to use
IF NOT EXISTSbefore this line is removed. Otherwise servers that already have the table fail to start.Verification
node scripts/fork-sync.ts --force --base 84537c4dd9merges every patch and builds0.1.7-nightly.20261102.409301./home.Review tier: 8/10, prunes history on the daily-driver database
One-way door: pruned events are gone from
statev2.sqlite, and the server refuses a projection rebuild afterwards. A restic snapshot is the way back.Blast radius: the event store, replay to reconnecting clients, and startup migrations on every fork server
Written by Claude Opus 5.5 in Claude Code, running in T3 Code.
🤖 Generated with Claude Code