ADR-0014: EF join-entry observation supports native-edge experimentation¶
Date: 2026-10-11. Status: accepted for the observed EF seam; native graph behavior pending.
Evidence¶
GB-009 executed 19 tests against EF Core 10.0.12 with GraphBridge's service registration. Only the test context substitutes EF's core model validator and a recording database. EF still owns conventions, identities, change detection, relationship fix-up, original values, entry selection and acceptance. Production relationship validation remains unchanged. No database or driver call occurred.
Implicit dictionary and explicit CLR join entities reach the provider as Added/Modified/Deleted IUpdateEntry instances. Endpoint roles can be read from public skip-navigation/FK metadata, and original/current scalar values and payload modification flags are available. No alternative tracker or private join-detection method was needed. The experiment report links exact tests, source and captured output.
Decision¶
Proceed with native association lowering once the remaining M2 gate permits production edge work. Preserve finalized EF metadata as the sole model authority. Explicitly map the join storage kind, relationship type and source/target FK roles; never infer graph direction from metadata ordering or classify every two-FK entity as an edge.
Refine the proposed endpoint update semantics:
- Accepted association FKs that are primary-key members cannot be edited. Replacing a collection endpoint yields an old Deleted join plus a new Added join.
- An entity with its own stable key permits non-key FK changes.
GetOriginalValuepreserves the old endpoint;GetRelationshipSnapshotValuemay already contain the new endpoint after fix-up. Do not use relationship snapshots as persisted endpoint originals. - Removing and re-adding an accepted association without intervening detection yields no write; with intervening detection, the observed join remains Deleted. Follow EF's actual update entries and document this boundary rather than creating a second reconciliation tracker.
- EF's observed entry list can contain Added before Deleted. The graph planner must derive ordering from node/edge storage dependencies rather than copying list order.
- EF cascade affects tracked joins. Unloaded graph relationships remain a separate deletion-policy gate; no
DETACH DELETEis implied.
The independently keyed FK observation does not implement M4 edge identity, physical endpoint rebinding or parallel relationships. No implicit/explicit edge-storage pivot is justified by the current EF evidence; graph shaping may still require a later, separately justified choice.
Remaining gates¶
Native edge commands must prove endpoint/cardinality checks, fixed direction, no synthetic join node, atomic node/edge writes, rollback, duplicate association races and saved EF entry counts against the disposable graph. Fresh-context loading and EF fix-up must pass before skip-navigation query loading or Include is advertised. The EF-only scheduling adjustment did not remove final M2 regression or these GB-010 gates.