Guard released migration lineage and dependencies#129
Conversation
Freeze Scient's released migration identities and latest shipped migration contents, enforce contiguous migration conventions, and run the guard in CI and release preflight. Inspired-by: Synara 5495a6e81e4da80e996867a1c487c9546cbd0196 CI-reference: Synara 47dc7145174b71e2813b63b976a72807ad96262e
Extend the released migration lineage guard across repository-local runtime dependencies, including the exact workspace-contract source used by migration 35. Reject unresolved, escaping, ambiguous, dynamic, and unpinned workspace imports fail-closed, while excluding type-only edges. Add regressions for direct helper and transitive package dependency changes.
Pin the migration 35 contracts dependency to its exact importer and MODEL_OPTIONS_BY_PROVIDER runtime binding. Reject any other Scient workspace-package import shape until it has a correct source mapping, and validate the full current migration graph so unsafe imports cannot reach a release first.
Freeze the contracts package manifest and barrel alongside migration 35's runtime source so same-binding redirects cannot bypass append-only checks. Preserve runtime default imports when their named companion imports are type-only, with adversarial regression coverage for both boundaries.
Compare only the contracts package root import target and MODEL_OPTIONS_BY_PROVIDER barrel source while retaining full-content freezing for the model runtime module. Detect semantic redirects without blocking unrelated manifest metadata or barrel exports, with adversarial and benign regression coverage.
…migration-lineage-20260725
|
Final integration refresh (2026-07-25): current main dab9b6d was merged normally into this branch; no rebase or force-push. Exact hosted head: ed75c03. Migration-lineage tests 14/14 and the live migration lineage check passed. git diff --check passes and the task worktree is clean. Fresh hosted CI run https://github.com/ScientFactory/scient-desktop/actions/runs/30160243863 completed successfully, including format, lint, typecheck, full bun run test, stable browser, Linux geometry, desktop build/preload, release smoke, Linux and Windows HTML-preview smoke, and Windows process regression. No unresolved review threads remain. Existing documented manual limitations are unchanged and non-blocking. This candidate is integration-ready against main dab9b6d; this is not merge or release authorization. |
User impact
This is preventive reliability work: users should not see a new control, but future releases can no longer silently rewrite, renumber, rename, delete, or detach already-shipped database migrations or change the reviewed runtime dependency resolution beneath them.
The guard also safety-checks every current unreleased migration before it can ship and fails closed on unresolved, escaping, ambiguous, absolute, dynamic, runtime-loader, or unpinned workspace imports.
Upstream provenance and disposition
5495a6e81e4da80e996867a1c487c9546cbd0196, where recovery work exposed migration-history risk.Exact candidate
dab9b6d58e2a3f3da02c5475b86dc083f71580f1d97a131bb286d7e3994ee400c9e494250329038emaintenance/upstream-migration-lineage-20260725What is protected
release/stablefirst-parent ancestry, not semantic version ordering.@synara/contractspackage/barrel/runtime binding used by migration 35.bun run migration:check.Verification at exact head
bun run migration:check: 59 contiguous migrations; 79 protected official release tags; all historical migration code and latest shipped dependency resolution matchv0.5.13.bun run scient:upstream-check --intake: passed identity, format, lint (0 errors), all typechecks, fullbun run test, all builds, release smoke, and clean certification.git diff --checkclean; tests created no tracked or untracked artifacts.Independent review
Exactly three fresh, independent, read-only reviews inspected the full seven-file diff at
d97a131bb286d7e3994ee400c9e494250329038e:The final pre-push review found one P2 in the prior candidate: semantic-version sorting could choose an older dependency baseline after a later lower-version release. The candidate now selects by actual release-branch ancestry and includes a regression for that ordering.
Safety, rollback, and limitations
Hosted CI
A new hosted CI run was launched automatically for exact head
d97a131bb286d7e3994ee400c9e494250329038eand must be fully green before merge.Related intake PRs