feat(migrations): port data-integrity migrations with shell-summary backfill#60
Merged
Merged
Conversation
Backport upstream ce9f337 (pingdotgg#1973 "Add shell snapshot queries") as a column-only migration — just the four ALTER TABLE statements needed by downstream backfill / cleanup migrations. MarCode's ProjectionSnapshotQuery still computes these values on the fly via SQL aggregates (lazy-hydration design), so this migration adds the columns as dormant storage to unblock upstream migrations that write to them. The aggregate-query reads remain authoritative. Columns added to projection_threads: - latest_user_message_at (TEXT) - pending_approval_count (INTEGER NOT NULL DEFAULT 0) - pending_user_input_count (INTEGER NOT NULL DEFAULT 0) - has_actionable_proposed_plan (INTEGER NOT NULL DEFAULT 0) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…tgg#2004) Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…en model selection (pingdotgg#2076)
Upstream c9b07d6 (pingdotgg#2004) added two ProjectionPipeline tests that assert on projection_threads.pending_approval_count after runtime projection. The prerequisite commit ce9f337 (pingdotgg#1973) teaches the pipeline to update that denormalized column alongside the projection_pending_approvals table, but MarCode's lazy-hydration design (see FEATURES.md) keeps the count computed via SQL aggregate at query time and leaves the column dormant (migration-time backfill only). Drop the threadRows queries + assertions from both upstream tests and leave a comment pointing to the architectural divergence. The approval row assertions (the actual stale/non-stale routing behavior) are preserved. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
projection_threadsshell-summary columns (latest_user_message_at,pending_approval_count,pending_user_input_count,has_actionable_proposed_plan) to support MarCode's two-phase bootstrap (sidebar renders immediately with hollow threads)pendingApprovalCountvia SQL aggregate instead of denormalized column at runtime)Testing
bun run test— all tests pass, including comprehensive migration backfill tests (028_BackfillProjectionThreadShellSummary.test.ts)