Skip to content

Carry explicit ownership through hydration and synchronous reads - #151

Merged
bazer merged 1 commit into
v0.10from
codex/0.10-w1-owned-read-execution
Sep 17, 2026
Merged

bazer merged 1 commit into
v0.10from
codex/0.10-w1-owned-read-execution

Conversation

@bazer

@bazer bazer commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Why

Authoritative hydration previously granted read permission to any caller on a recorded thread. A deterministic provider-command callback reproduced public transaction.Query() succeeding while a mutation still owned execution. Ordinary synchronous read boundaries also checked the busy flag without owning the slot across provider work and cleanup.

Changes

  • Replace the thread-ID allowance with an explicit private operation step through canonical and fallback hydration.
  • Preserve the original transaction as the entity source and cache identity; private services never become the returned model source.
  • Hold synchronous read ownership through single-row warm/cold cache lookup, buffered single/batch/index loading, scalar execution and raw reader enumeration/cleanup.
  • Keep deferred construction cold, caller commands borrowed and other-thread admission rejected while cleanup is suspended.
  • Add eighteen deterministic regression/lifetime cases and update the W1 execution records.

Validation

  • Negative control: the new provider-callback regression failed against the pre-change implementation (artifacts/w1-owned-read-before.json).
  • Release / .NET 10 transaction-focused tests: 119/119 passed.
  • Full Release / .NET 10 unit suite: 1,908/1,908 passed.
  • SQLite-file and SQLite-memory compliance anchor shards: 516/516 passed each, maximum parallelism 8.
  • Release unit/compliance builds and core .NET 8/9/10 build: zero warnings/errors.
  • Diff whitespace and local links in all five changed planning pages checked. Planning pages are excluded from DocFX.

Local summaries under artifacts/w1-owned-read-*.json are modified-checkout development evidence, not a strict release capture. Exact-commit CI is recorded below.

Boundaries

This continues W1.2 after merged #150; it does not finish W1. General LINQ/entity/projection/relation invocations may compose several reads: this PR protects the listed inner boundaries, not universal outer invocation/buffered-result lifetime. Async enumeration/handoff, overlapping enumerator-call rejection, helper draining, native lazy initialization and W1.3 recovery remain pending.

Gate release after cleanup failure does not establish provider connection trust. Primary/secondary failure composition and provider trust classification remain W1.3 work; existing synchronous failure behavior is retained.

Coordination allocations/locks still require measurement against W0. No public declarations, driver packages, pooling settings or package publication changed. W0-F1, official corrected SQLite adoption and release acceptance remain open. The 0.9.2 baseline and frozen W0 evidence are unchanged.

Exact-commit CI

Latest CI run 35245861732 passed on head db51228799e471e7ba6f882139f398ae0631ffce: all 12 jobs, including Latest required gate, succeeded. This covers unit, generators, Memory, SQLite file/memory, MySQL 9.7 and MariaDB 12.3 compliance/provider suites, smoke and dependency audit. The PR remains open for review.

Replace thread-based authoritative hydration permission with private operation steps while preserving transaction source and cache identity. Hold read admission across single-row lookup, buffered source loading, scalar execution and raw reader cleanup.

Add eighteen regression and lifetime cases, record validation evidence, and retain the remaining outer invocation, async recovery, performance and SQLite acceptance gates.
@bazer
bazer merged commit 8843dea into v0.10 Sep 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant