feat(sdk): add TailorDB migration rebaseline - #1990
Open
dqn wants to merge 11 commits into
Open
Conversation
@tailor-platform/create-sdk
@tailor-platform/eslint-plugin-sdk
@tailor-platform/sdk
@tailor-platform/sdk-plugin-seed
@tailor-platform/sdk-plugin-tailordb-erd
commit: |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
📖 Docs Quality & Consistency Check
✅ Docs are consistent with the implementation and contain no user-facing internal-detail leaks.
Checked areas:
- New
tailordb migration rebaselinecommand documentation inpackages/sdk/docs/cli/tailordb.mdandpackages/sdk/docs/cli-reference.md - Migration rebaseline workflow documentation in
packages/sdk/docs/services/tailordb-migration.md - Updated
migration setandmigration synccommand documentation regarding history ID alignment - Updated
migration statusdocumentation regarding format version checking - Migration file format compatibility section
- Error handling documentation for unsupported migration file versions
Verification performed:
- CLI command consistency: Verified the
rebaselinecommand description, notes, and options match the command definition inpackages/sdk/src/cli/commands/tailordb/migrate/rebaseline.ts(auto-generated via politty) - Format version accuracy: Confirmed documentation states "writes format version
2and reads versions1through2" which matches implementation constantsSCHEMA_SNAPSHOT_VERSION = 2andMIN_SUPPORTED_MIGRATION_FILE_VERSION = 1 - Migration history ID: Verified this is an appropriate user-facing concept (stored in
0000/schema.jsonwhich users interact with, affects deployment behavior users must understand) - Checkpoint repair mechanism: Confirmed the documented behavior of adopting a new baseline after rebaseline matches the implementation in schema-checks.ts
- Internal details: Verified no internal label names (e.g.,
sdk-migration-history), RPC/API names, module structure references, or transport-layer terminology leaked into user-facing docs - Behavioral accuracy: Confirmed the rebaseline workflow description (validation → confirmation → file replacement → metadata update) matches the implementation flow
Re-run this check by adding the
docs-checklabel to the PR.
The deploy confirmation and migration set prompts called the migration history ID a "history generation", while the user-facing docs consistently say "migration history ID". Align CLI output, JSDoc, and test names with the documented term.
🦋 Changeset detectedLatest commit: 75de129 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Code Metrics Report (packages/sdk)
Details | | main (6396b4d) | #1990 (b71a7e5) | +/- |
|--------------------|----------------|-----------------|-------|
+ | Coverage | 78.5% | 78.7% | +0.2% |
| Files | 463 | 465 | +2 |
| Lines | 17768 | 18038 | +270 |
+ | Covered | 13956 | 14208 | +252 |
+ | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 |
| Code | 126901 | 129054 | +2153 |
+ | Test | 62068 | 63484 | +1416 |Code coverage of files in pull request scope (86.7% → 87.3%)SDK Configure Bundle Size
Runtime Performance
Type Performance (instantiations)
Reported by octocov |
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
TailorDB projects can safely collapse an applied migration history into a new baseline while preserving compatibility with existing v1 migration files.
Usage
Related CLI behavior
tailor tailordb migration rebaseline0000baseline and history generation.tailor deploytailor tailordb migration statustailor tailordb migration set/synctailor tailordb migration generate/validateNotes
0000from the working tree and resets the selected workspace checkpoint; every environment must be on the latest migration before it is re-baselined.