Complete v4.3.0 migration tooling suite - #48
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.
Summary
Prepare version4.3.0 for review. This release adds a first-party, review-first workflow for moving schemas and rows from external data sources into a new staged CSharpDB database.
CSV, JSON/NDJSON, SQLite, LiteDB 5, and the bounded MySQL 8.0/8.4 subset can be captured into retained, digest-pinned source packages, reviewed through deterministic plans and exact target DDL, applied or resumed using target-authoritative receipts, and checksum-validated before activation. Unsupported source objects remain visible as blocking diagnostics or explicit reviewed exclusions. An offline CSharpDB snapshot can also be exported as resumable, lossless CSV, JSON, or NDJSON with a source-bound manifest.
The release also implements bounded Microsoft Access and on-premises SQL Server 2019/2022/2025 schema-and-row capture lanes. Access supports local unencrypted
.mdb/.accdbtables through ACE on Windows, with deterministic retained rows. SQL Server now has a strict positive non-sysadminmetadata-visibility proof that passed a SQL Server 2019 Express LocalDB fixture and fails closed on object-levelDENY. Both lanes remain evaluation-only in v4.3.0: non-overrideable qualification diagnostics block planning and apply until their declared live environment matrices are complete.Access, SQL Server, and MySQL access run in fixed isolated worker processes, so the base cross-platform CLI does not carry ACE/OLE DB, ScriptDom, SqlClient, or MySqlConnector. Server credentials are accepted only through named environment variables and are needed only during capture. Retained packages are plaintext-sensitive and bind their catalog, provider contract, schema, rows, deterministic ordering, and package limits to an independently recorded SHA-256 manifest digest.
The release adds two review tools over the same migration contracts:
migrate type-mapreports exact, lossless-reencoded, lossy, and unsupported mappings selected by the planner;migrate query-checkperforms bounded read-only CSharpDB or isolated T-SQL parse analysis and emits explicit missing-binding/execution evidence. MySQL, SQLite, and Access query dialects remainUnknownuntil qualified parsers exist.The new
CSharpDB.MigrationandCSharpDB.Migration.DualRunNuGet packages expose the durable migration contracts and an SDK for offline, read-only query-pack comparison between a source snapshot and staged CSharpDB. Dual-run uses typed parameters, provider-enforced read-only source connections, explicit endpoint snapshot identities, versioned canonicalization, ordered or duplicate-preserving unordered comparison, bounded resource limits, and strictly validated digest reports. Errors, incoherent evidence, and exhausted bounds areInconclusive, never pass.The branch also adds framework-dependent .NET 10 migration CLI archives for Windows x64, Linux x64, and macOS Apple silicon. The combined publisher preserves every applicable fixed adapter and its notices/licenses, verifies byte-identical base CLI roots before composition, enforces safe output containment, writes checksums alongside the archives, and assigns exact executable modes to POSIX archives. User-directory installers refuse overwrites by default, preserve unrelated files under explicit force, reject linked path escapes, do not request elevation, and do not change
PATH.Public documentation now includes an end-to-end database migration guide with installation, source recipes, plan/preview/apply/resume/validate commands, export, mapping and query checks, dual-run guidance, recovery authority, security requirements, troubleshooting, and explicit provider qualification limits. It is separate from the older
CSharpDB.CoretoCSharpDB.Primitiveslibrary-rename guide.Type of Change
Related Issues
None linked.
Testing
Validation completed for the version4.3.0 migration branch:
dotnet build CSharpDB.slnxDbExceptionpaths)Latest release-preparation validation:
DENYfailure path.MIGRATION-SHA256SUMS.txt.win-x64zip with Access, SQL Server, and MySQL adapters, plus 141-entrylinux-x64andosx-arm64tarballs with no Access assets. Archive checksums and exact POSIX modes passed publisher validation.--force, rejected a nested destination symlink, and left the outside sentinel unchanged.CSharpDB.MigrationandCSharpDB.Migration.DualRunpacked as version 4.3.0, and an independent local-feed consumer restored and built the full package closure without warnings or errors.Checklist
Notes for Reviewers
MIG-ACCESS-LIVE-QUALIFICATION-PENDING-001blocks plan/apply until the Windows/ACE/file-format/bitness matrix is complete.MIG-SQLSERVER-RETAINED-LIVE-QUALIFICATION-DEFERRED-001blocks plan/apply until the supported-edition, published-runtime, platform, authentication, and differential matrix is complete. Do not elevate the account tosysadminto bypass a failed proof.Conditionalquery results do not claim binding, execution, or semantic equivalence.The branch contains:
b121471— qualify the CSV, JSON/NDJSON, and SQLite migration MVP.337e012— add retained LiteDB migration, recovery, and validation.e82f788— add retained SQL Server schema and row capture.0f6a978— add retained MySQL migration and shared capture-path safety.dbcf4df— package and document the migration tooling.613ab11— complete retained export, Access capture, compatibility reports, restricted-account proofs, dual-run validation, documentation, and regression coverage.