Skip to content

feat(mothership): expose table rows_version and schema hash to the copilot VFS snapshot#5724

Open
TheodoreSpeaks wants to merge 1 commit into
stagingfrom
feat/table-version-vfs
Open

feat(mothership): expose table rows_version and schema hash to the copilot VFS snapshot#5724
TheodoreSpeaks wants to merge 1 commit into
stagingfrom
feat/table-version-vfs

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • add rowsVersion + schemaHash to table entries in the per-message VFS snapshot, so any row write or schema/column-order edit emits a ~table workspace-changes delta to the model
  • rowsVersion is the trigger-maintained user_table_definitions.rows_version counter; schemaHash fingerprints column id+name+user-visible order (folds in metadata.columnOrder, so a pure reorder is detected too)
  • expose rowsVersion in tables/{name}/meta.json (and the recently-deleted variant) via serializeTableMeta
  • move schemaFingerprint out of the snapshot cache into a shared lib/table/schema-fingerprint.ts (hash unchanged — golden test pins it so cached CSV keys never silently rotate); move applyColumnOrderToSchema to column-keys.ts
  • TableDefinition.rowsVersion is now required and selected by getTableById/listTables
  • regenerated vfs-snapshot-v1.ts from the Go contract (companion copilot PR)

Type of Change

  • New feature

Testing

Unit tests for the fingerprint (stability, rename/add/reorder, metadata-order equivalence, golden hash) and snapshot mapping (omit-zero mirrors Go omitempty); verified live against the dev DB — a row write bumps rowsVersion in the emitted snapshot, a metadata-only column reorder flips schemaHash with rows_version untouched. Lint + strict API validation pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 16, 2026 11:51pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant