v1.11: make event acceptance and run ownership trustworthy - #78
yoheinakajima wants to merge 2 commits into
Conversation
|
Architecture record: this PR implements ADRs 0053–0055 / D078–D080 in activegraph-vision PR #44. Review the code against those invariant-level decisions and the appended v1.11 runtime contract, rather than as five unrelated issue patches. |
|
I am testing an external backend pattern that puts the authoritative EventStore and disposable GraphStore in one transactional database. PR #78's append-before-project rule is the correct safe default for independent stores, but it exposes one compatibility boundary worth deciding explicitly. Reproducible ordering problemThe released v1.10 order is: An external co-located adapter can therefore commit the event and its derived projection delta in one database transaction. At this PR's current head, the order is: With the same adapter, event N commits the empty or event N-1 buffer, the durable projection remains one event behind, and the final staged delta may never flush. I confirmed the order change directly at Architecture questionShould the post-v1.11 extension surface reserve an optional atomic acceptance coordinator for co-located backends? A possible shape is:
Independent EventStore/GraphStore pairs would keep this PR's append-first behavior unchanged. Invariants and gates
If this belongs in a separate architecture issue after #78 rather than this release, I will follow that route and wait for |
Why
The open integrity issues all point at one boundary problem: the runtime did not consistently define when an event became an owned, durable fact. That allowed caller payload mutation, projection-before-append divergence, stale shared-run writers, and false
patch.appliedrecords.Decisions implemented
update | replaceMain changes
Graph.emit, EventStore append/read, listeners, and sinksConcurrentWriterErrorGraph.attach_storeInvalidPatchOperation, fail-closed live/replay validation, exhaustive projectionCloses #67
Closes #73
Closes #74
Closes #76
Closes #77
Verification
pytest -m 'not slow' -q --ignore=tests/test_sandbox_trial.py: 990 passed, 43 skipped, 13 deselectedRLIMIT_ASplatform expectation failuresmypy: 54 files cleangit diff --check: clean