GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(server): preserve pending operation kind on upgrade by t3dotgg · Pull Request #10291 · pingdotgg/t3code

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 6, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot approved these changes Sep 6, 2026
View reviewed changes
@github-actions

github-actions Bot commented Sep 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg
t3dotgg force-pushed the t3code/debt-gzuf-2-migration48 branch from 96ab9fb to b0d1d05 Compare September 6, 2026 04:51
@t3dotgg t3dotgg mentioned this pull request Sep 6, 2026
fix(threads): tie compaction state to its request #10294
Closed
@t3dotgg
t3dotgg force-pushed the t3code/debt-gzuf-2-migration48 branch from b0d1d05 to 66170fe Compare September 6, 2026 05:19
This was referenced Sep 6, 2026
fix(server): recover interrupted checkpoint rewinds #10299
Closed
fix(threads): keep completed requests closed across clients #10123
Merged
@t3dotgg
refactor(server): preserve pending operation kind on upgrade
d858532
@t3dotgg
t3dotgg force-pushed the t3code/debt-gzuf-2-migration48 branch from 66170fe to d858532 Compare September 6, 2026 06:36
@t3dotgg

t3dotgg commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

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.

Projects

None yet

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.

1 participant

@t3dotgg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.