Repository navigation
Add explicit SQLite BusinessOperation support - #75
Open
philipgreat wants to merge 1 commit into
Open
philipgreat wants to merge 1 commit into
philipgreat wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Motivation
The requirement came from independent acceptance testing of an AI-built inventory transfer app. Shipping 10 units saves both source stock and the transfer order. With ordinary graph saves, rejecting the order write after the stock write leaves on-hand and reserved quantities at 90 and 20 while the order still reports zero shipped. The acceptance tests also exposed reuse of a key with a different quantity and the need to recover the original result after a retry or a lost commit acknowledgement. SQLite failure reproduction
The Work Management FastAPI example has the same operation boundary. Creating a project saves the project, the creator's membership, and the default section. Its acceptance test injects a failure on the third write and checks that all three changes roll back. Project creation callback
Applications supply the domain action, authorization, and invariants. The runtime commits the declared writes, retry result, and operation audit together and serializes competing operations on file-backed SQLite.
Summary
BusinessOperationboundary for file-backed SQLite. Multiple entity graph saves share one transaction, including the durable idempotency result and operation audit record.Verification
BusinessOperation tests on Python 3.13 with file SQLite — 33 passed, including concurrent writers, process exits, rollback and generated graph saves.
Repository regression on Python 3.13 — 1,718 passed, 8 skipped, 21 subtests passed. Optional S3 and OpenTelemetry SDK suites were excluded from this local container run.
Shipping example — one stock adjustment and the original result on replay.
Work Management FastAPI example against this branch — 18 browser checks passed.
The same FastAPI example passed all three contract checks against this branch, including rollback on the third project-creation write.