Repository navigation
refactor(store): fold migrations 0002..0008 into 0001_init (RIG-4556) - #1766
Merged
Merged
Conversation
The dev database is wiped for dogfood, so migration history is dead weight again. Fold every migration into 0001_init.sql, delete the folded files and the tests that replayed them over a v1 database. A fresh Open produces a byte-identical pg_dump schema. Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
😎 This pull request was merged. |
|
Compass engineering docs preview: https://compass-agent-rig-4556-colla.compass-eng-docs.pages.dev Deployed from Changed pages: |
…1 (RIG-4556) Co-authored-by: Matt Wilkinson <matt@rigel.build>
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
Folds migrations
0002..0008into0001_init.sqlfor the dogfood reset (RIG-4556). The mattfw dev database is wiped, so migration history is dead weight again.Change
0001_init.sqlnow creates everything the folded files added:tokens.tenant_idsession_bindings.usage_interval_idissues.search_tsvandcompass_labels_textlinear_agent_sessions.linear_issue_identifieraccount_tour_stateupdated_attriggers move into the existing 0001 blocks.0002..0008files and the pgtests that replayed them over a v1 database:backfill_empty_tenant,token_tenant_migration,migrate_upgrade.applyV1OnlyandexecAsSystemmove to the remaining tests that use them.server_secrets_pgtestnow also pins the compute log's withheld UPDATE and DELETE.pg_dump schema diff
The test applies main's
0001..0008chain to one database and the folded0001to another, then runspg_dump --schema-only --no-owneron each.The data dump differs only in the
now()timestamps of the seededtoken_usage_prune_horizonrow.The check can fail. Moving
tokens.tenant_idbeforerevoked_atproduces a non-empty diff.Gate
migration-immutabilityrejects this PR by design, sorollupstays red. Matt ruled option C on RIG-4572: this PR needs Matt's admin-bypass merge of the redrollup. Every other check must be green.After merge
compass-recreate. The wipe follows the merge, never precedes it.compassdatabase that ran the old chain fails on open with a v1 checksum mismatch. Drop and recreate it.0009(feat(usage): derive compute-usage rollups and prune the raw compute log (RIG-2872) #1513, feat(auth): mint and verify per-agent gateway tokens (RIG-2864) #1752, feat(comms): carry the agent turn sequence to the stored message and the settle sink (RIG-4323) #1602, feat(server): add forge scope storage (RIG-4434) #1654, feat(store): unique sibling channel-group names with a repairing migration (RIG-3030) #1595, feat(store): attach channels to agents with tree or explicit membership (RIG-4186) #1762) would leave a gap thatcheckContiguousrejects. Each renumbers to0002, one at a time.