Repository navigation
Add W1 transaction ownership and lazy initialization foundations - #150
Merged
Merged
Conversation
Share explicit operation leases with existing synchronous mutation and completion guards. Protect private dispatch and reader handoff across awaits without ambient privileges, queuing or provider work under locks. Add internal lazy resource publication with direct sync and async initialization, cancellation boundaries, terminal first-use failures and independent cleanup. Record 26 new controlled tests, 1,890 passing unit tests, both SQLite compliance shards and the remaining source/provider integration and performance gates.
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.
Why
The W1.1 contracts need explicit transaction ownership that survives suspension and can express first-use initialization without publishing half-initialized resources. The existing integer busy flag and thread-ID hydration allowance are not an async ownership model.
This is the W1.2 foundation, following merged #147 and the accepted limited W1 exception. It does not claim the complete W1.2 or W1 exit gate.
Changes
Deliberate limits
Production provider initialization is not wired to these helpers and its behavior is unchanged. Public async APIs, native dispatch, package dependencies and SQLite pooling are unchanged.
Existing read checks consult the shared gate, but full read/enumerator lifetime admission is not introduced here. The existing synchronous thread-ID hydration allowance remains on its old path; it must be replaced with a private owned source before async integration. Command/reader wrappers, callback drain/recovery, public failure composition, invocation capture and native bindings remain later work.
The gate adds allocation and short transition-lock costs versus the old integer flag. Performance comparison with W0 remains required; this PR makes no performance acceptance claim. W0-F1/native SQLite acceptance/release gates remain open.
Validation
All local executions used Release / .NET 10 and retained Testing CLI summaries/raw reports:
The implementation record names the local
artifacts/w1-ownership-*reports. These were modified-checkout development checks, not frozen release evidence. Latest CI run 35242670355 passed all 12 jobs, including the required gate, on commit52c3e3d69c047817d2ba827f06324be504207cdd. This PR is left open for review. No packages published.