GeezerVison is showing github.com — refactor(server): preserve pending operation kind on upgrade by t3dotgg · Pull Request #10291 · pingdotgg/t3code
Conversation
t3dotgg
commented
Sep 6, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Compaction and rewind need ordered database migrations. Rewind must not install migration 49 before the operation-state column in migration 48 exists.
Add the nullable operation_kind column and classify existing pending messages. Old writers can still omit the column. This PR does not change runtime behavior. This PR starts the dependency chain for compaction lifecycle and rewind.
The focused migration test passed. It covers mixed-case commands, whitespace, arguments, attachments, and old writers after the upgrade. Independent source review confirmed that this migration is additive and compatible with old writers.
Created with GPT-6 Astra in Codex. Recovery and verification continued in Codex.
Note
Add migration 048 to backfill operation_kind on pending projection turns
- Adds a nullable
operation_kind column to projection turns via 048_ProjectionPendingOperation.ts
- Selects pending user turns without a turn ID or checkpoint count, joins them to their same-thread messages, and classifies each row as
compact when the message has no attachments and its trimmed text matches the compact command; all other eligible rows are classified as ordinary turns
- Registers migration 048 in the migration registry and adds test coverage in 048_ProjectionPendingOperation.test.ts covering compact/ordinary classification, attachments, row ordering, and nullable values for legacy inserts after downgrade
- Behavioral Change: rows written by an older server after downgrade will have a null
operation_kind; readers must tolerate null values in this column
Macroscope summarized d858532.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
macroscopeapp
Bot
commented
Sep 6, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 96ab9fb
Macroscope's review found this PR approvable — This PR adds a nullable persistence field and a focused backfill for pending operations, while preserving compatibility with older writers. The migration is isolated, tested, and does not introduce product defaults or change the current runtime behavior.
No code changes detected at d858532. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
13.5 KiB |
13.6 KiB |
+66 B (+0.5%) |
15.1 KiB |
✅ |
| Codex |
Thread snapshot wire |
7.0 KiB |
7.0 KiB |
+5 B (+0.1%) |
7.3 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
6.5 KiB |
6.6 KiB |
+61 B (+0.9%) |
7.8 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
57.0 KiB |
57.1 KiB |
+88 B (+0.2%) |
66.4 KiB |
✅ |
| Codex |
Live turn messages |
8 |
10 |
+2 (+25.0%) |
21 |
✅ |
| Claude |
Total thread wire |
13.5 KiB |
13.6 KiB |
+46 B (+0.3%) |
15.1 KiB |
✅ |
| Claude |
Thread snapshot wire |
7.0 KiB |
7.0 KiB |
−11 B (−0.2%) |
7.3 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
6.5 KiB |
6.6 KiB |
+57 B (+0.9%) |
7.8 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
57.8 KiB |
57.9 KiB |
+88 B (+0.1%) |
66.4 KiB |
✅ |
| Claude |
Live turn messages |
8 |
10 |
+2 (+25.0%) |
21 |
✅ |
Baseline: d924fe2 · PR result: d858532 · Source CI: success
Scenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 113.8 KiB
- Claude decoded thread snapshot: 114.5 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Sep 6, 2026
Note 🤖 Claude Fable 5.1 responding on behalf of Theo
Closing. Nothing on main reads or writes operation_kind, and PR #10123 (which is stacked on this) never touches the column either. A migration with no reader is dead schema, and no projection writer sets it for new rows so the backfilled value goes null on the first new turn. If the compaction-lifecycle work in #10294 lands, the migration should ship inside that PR. Retargeting #10123 to main.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|