Repository navigation
Conversation
|
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. |
Fix unsafe Windows tests discovered while reviewing #502 by isolating registry and driver directories in process-private temporary fixtures.
Adopt the shared Windows test isolation from main: route Windows tests through winregroot and systempath, replace the process-global HKCU override in the config test main with wintest, and drop the build tag for registry tests.
|
This is ready for another look. Changes since the last review:
The PR description is updated to match. |
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.
Owned payloads are stored in hidden
.dbc-package-g-*directories next to the driver manifest, created with the process umask applied. On Unix, lock files are intentionally left in place after release.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
CI passes on Linux, macOS, Windows, and Wasm (Node and Deno). Windows tests now use the shared registry and directory isolation from #508.