Repository navigation
Contract ORM API and preserve migration scripts and failed cleanup - #56
Merged
Merged
Conversation
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.
Migration scripts currently stop after the first SQLite statement, while successful PostgreSQL scripts fail when their multiple results are read as one result. Failed rollback/unlock/deallocation can also return or leak an unsafe connection. This change adds the explicit optional adapter script boundary, quarantines failed SQLite connections (including retryable physical close), and discards poisoned PostgreSQL clients while preserving the primary operation error. Escaped transaction migration handles now reject plan/apply/resolve before SQL; CLI database entries load through file URLs for Windows paths and reserved URL characters.
The 0.5.0 API review cuts 132 entrypoint/name pairs to 78, removes sql.key, and makes the existing ORM-owned CLI implementation private behind the single runDatabaseCli bridge. All five export-map keys remain. The generated GeneratedDatabaseArtifact contract and askr-cli's metadata/dynamic bridge are retained; every removed name has a migration note. Of the 41 moved tooling function bodies, 40 remain token-identical; loadDatabases receives the intentional file-URL correction reproduced by the strengthened cross-platform generation fixture.
Validation:
Remaining release blocker: the real PostgreSQL generation/validation workflow is incomplete in the existing shadow reset/introspection/description methods. It is reproduced and tracked in #55. The prior fake-driver generation test does not qualify that workflow. This PR does not declare the ORM ready, bump a version, tag or publish. #53/#54 stay open pending #55 and the complete candidate/website qualification.
Refs #53, #54, #55. Full maintainer review of the final coordinated 0.5.0 candidate is required before publication.