docs: add transactions.md — branch-as-transaction explainer#69
Open
ragnorc wants to merge 1 commit into
Open
Conversation
The architectural rule "no cross-query BEGIN/COMMIT; branches fill that role" lives in docs/invariants.md §VI.23 but is not surfaced anywhere user-facing. New users coming from Postgres/MySQL hit the gap when they realize multiple queries on main are independently atomic, not jointly atomic. This page explains the model with worked examples: * Single-query multi-statement (atomic by default) * Two separate queries on main (NOT atomic — common surprise) * Many queries via a branch (atomic at merge) * Coordinating multiple agents via branch-per-agent Plus a comparison table to BEGIN/COMMIT, failure-mode rundown, and "when to use what" decision matrix. Linked from AGENTS.md "Where to find each topic" between branches-commits.md and runs.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Adds
docs/transactions.md— a user-facing explainer for the atomicity model. The architectural rule lives indocs/invariants.md§VI.23 ("no cross-queryBEGIN/COMMIT; branches fill that role") but isn't surfaced anywhere a user looking atdocs/query-language.mdwould find it. New users coming from Postgres/MySQL trip over the gap when they realize multiple queries onmainpublish independently.The new page covers:
BEGIN/COMMIT.main(NOT atomic — common surprise).Why now
Came up during MR-794 / PR #68 review when I asked whether the
D₂parse-time rule (rejecting mixed insert/update + delete in one query) hinted at a missing transaction concept. The answer is no — the model deliberately replaces transactions with branches — but the deliberate replacement isn't documented anywhere a user would find it.Independent of #68. Doesn't reference any MR-794 specifics; the branch-as-transaction model is invariant across MR-794 and predates it.
Test plan
scripts/check-agents-md.shpasses (27 links, 27 docs)docs/🤖 Generated with Claude Code
Note
Low Risk
Documentation-only change that adds a new guide page and updates the docs index; no runtime behavior or APIs are modified.
Overview
Adds a new
docs/transactions.mdpage that explains OmniGraph’s transaction/atomicity model: single.gqqueries are atomic, and multi-query workflows use branches + merge instead ofBEGIN/COMMIT.Updates
AGENTS.mdto link the new transactions guide from the docs index, making the “branches as transactions” invariant easier to discover.Reviewed by Cursor Bugbot for commit 52cb3f1. Bugbot is set up for automated code reviews on this repo. Configure here.