Repository navigation
Conversation
|
Thanks for the detailed review! I'd like to handle the Windows HKCU lock identity in a follow-up and document the current limitation here. My preference is to address these issues in this PR first, then revisit splitting if you still think it would help. |
|
I looked at splitting this more carefully against the current diff. The only cleanly independent split I see is the low-level A larger split could make a stacked series of roughly ~2k infrastructure / ~6k registration+transaction / ~5k cleanup. So I think further splitting would mainly help as a review-only stack, while adding rebasing/interface churn and making the already-reviewed changes harder to follow. |
|
The CI failure should be addressed by #508, which can be merged independently. |
|
Based on discussions in the chat, I refactored to remove support for manifest-only drivers, which had not been documented. |
Summary
This PR extracts the transactional package installation foundation from #497 for dbc 0.4.0. Direct install, sync, and
Client.Installprepare a validated, dbc-owned driver payload before replacing the runtime registration. The previous installation remains usable until commit.It also removes manifest-only dbc package installation, an undocumented feature with no known usage. Every installed package must contain an actual
Files.driverpayload;Driver.sharedis no longer a fallback for a missing payload. This requirement applies even when signature verification is disabled.Ordinary ADBC runtime manifests that reference externally managed libraries remain supported. Removing manifest-only packages does not remove external runtime registration discovery or parsing.
Transaction contract
InstallPackage(ctx, ...)supports cancellation during lock waits and safe pre-commit boundaries. Registration mutation completes once started, including any rollback.Behavior changes in 0.4.0
Files.driversource = "dbc"and a safe same-root legacy layout; delete only the exact registered driver binary, then remove its directory if empty. Metadata may remain.config.UninstallDriverSharedConfig.UninstallDriverorClient.Uninstall.Legacy ownership is a compatibility assumption based on the old install layout, not a provenance proof. Unsafe paths, uncertain filesystem identity, conflicting references, or unknown/corrupt receipts prevent payload deletion. No additional heuristics reconstruct legacy ownership.
Compatibility and scope
Same-version direct install still exits before download or verification.
Client.Installdoes not gain mandatory signature or MANIFEST-version checks.InstallDriverremains a deprecated, non-transactional API, with the same owned-payload requirement.Native locks coordinate processes; Wasm locks are runtime-local. Wasm uninstall retains payloads because directory identity cannot be pinned safely. Post-uninstall cleanup errors identify retained paths; recovery of registration-less generations is deferred. Stable Windows registry lock identity remains follow-up work.
Lockfile v2, Packslip, a new package format, external registration commands, aliases, and replay/repair are outside this PR. This foundation accepts prepared owned payloads so future package decoding and reproducible-artifact locking can build on the same transaction model.
Validation
The known Windows test-isolation failure awaits integration of #508 after it merges.