-
Notifications
You must be signed in to change notification settings - Fork 24
docs(user): split language/branching pages + front-door pages (Phase 2) #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Merging Branches | ||
|
|
||
| Merging integrates the changes on one branch into another. OmniGraph merges are | ||
| **three-way and row-level**: it compares both branches against their common | ||
| ancestor and merges each node/edge table row by row, then publishes the result as | ||
| **one atomic commit** across the whole graph. | ||
|
|
||
| ```bash | ||
| omnigraph branch merge review/2026-04-25 --into main s3://bucket/graph.omni | ||
| ``` | ||
|
|
||
| `branch merge <source> [--into <target>]` merges `<source>` into `<target>` | ||
| (default `main`). | ||
|
|
||
| ## Outcomes | ||
|
|
||
| A merge resolves to one of three outcomes: | ||
|
|
||
| - **Already up to date** — the target already contains every change on the source; | ||
| nothing to do. | ||
| - **Fast-forward** — the target has no changes the source lacks, so the target | ||
| simply advances to the source. | ||
| - **Merged** — both sides diverged; a new merge commit is created with two parents. | ||
|
|
||
| ## Conflicts | ||
|
|
||
| When both branches changed the same data incompatibly, the merge fails with a | ||
| structured list of conflicts (the HTTP server returns `409` with a | ||
| `merge_conflicts[]` array). No partial result is published — the merge is | ||
| all-or-nothing. The conflict kinds are: | ||
|
|
||
| | Kind | Meaning | | ||
| |---|---| | ||
| | `DivergentInsert` | The same id was inserted on both branches. | | ||
| | `DivergentUpdate` | The same row was updated differently on both branches. | | ||
| | `DeleteVsUpdate` | One side deleted a row the other side updated. | | ||
| | `OrphanEdge` | An edge references a node the other side deleted. | | ||
| | `UniqueViolation` | The merged result would violate a unique constraint. | | ||
| | `CardinalityViolation` | The merged result would violate an edge cardinality constraint. | | ||
| | `ValueConstraintViolation` | The merged result would violate a value constraint (enum/range). | | ||
|
|
||
| Each conflict carries the table, the row id (when applicable), the kind, and a | ||
| message. Resolve conflicts by reconciling the two branches — typically by making | ||
| the conflicting change on one side and re-merging. | ||
|
|
||
| See [branches & commits](index.md) for the branch and commit-DAG model, and | ||
| [changes](changes.md) for diffing two branches before you merge. | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| # Snapshots & Time Travel | ||||||
|
|
||||||
| Every read in OmniGraph happens against a **snapshot** — a consistent, cross-table | ||||||
| view of the graph at one manifest version. A query holds one snapshot for its whole | ||||||
| lifetime, so it never sees a partial write from a concurrent commit (see | ||||||
| [transactions](transactions.md)). | ||||||
|
|
||||||
| ## Reading the past | ||||||
|
|
||||||
| - **Current head** — by default a read targets the current head of the bound branch. | ||||||
| - **By snapshot id** — read a branch or a specific snapshot id (`--snapshot` on | ||||||
| `omnigraph read`). | ||||||
| - **By version** — reconstruct a historical snapshot from any past manifest version. | ||||||
| - **Single entity** — look up one entity at a past version without building a full | ||||||
| snapshot (cheaper when you only need one node or edge). | ||||||
|
|
||||||
| Snapshots are cheap to build: a snapshot is just the set of visible sub-table | ||||||
| versions at a manifest version, so cross-table reads stay snapshot-isolated. | ||||||
|
|
||||||
| ## CLI | ||||||
|
|
||||||
| ```bash | ||||||
| # Read a query against a past snapshot | ||||||
| omnigraph read --query ./q.gq --name find --snapshot <snapshot-id> s3://bucket/graph.omni | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||||||
| ``` | ||||||
|
|
||||||
| Time travel composes with branches: every branch has its own version history, and | ||||||
| you can read any branch at any of its past versions. Commits and the commit DAG | ||||||
| that these versions correspond to are described in | ||||||
| [branches & commits](index.md); diffing two versions is on the | ||||||
| [changes](changes.md) page. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Concepts | ||
|
|
||
| OmniGraph is a typed property-graph engine built as a coordination layer over the | ||
| [Lance](https://lance.org) columnar storage format. It gives you a schema-checked | ||
| graph with vector, full-text, and graph queries in one runtime, plus Git-style | ||
| branches and commits across the whole graph. | ||
|
|
||
| ## The data model | ||
|
|
||
| - A graph has **node types** and **edge types**, declared in a | ||
| [schema](../schema/index.md). | ||
| - Each node type and each edge type is stored as its **own Lance dataset** — | ||
| columnar, versioned, on local disk or object storage. | ||
| - A single `__manifest` table coordinates all of those datasets, so the graph has | ||
| one coherent version even though it spans many datasets. | ||
|
|
||
| This split is what lets a graph commit be **atomic across every type at once**: a | ||
| publish flips every relevant dataset's version together in one manifest write, so | ||
| readers never see a half-applied change. See [storage](storage.md) for the layout. | ||
|
|
||
| ## Two layers: inherited vs. added | ||
|
|
||
| Throughout the docs, capabilities are framed as **L1** (inherited from Lance) or | ||
| **L2** (added by OmniGraph): | ||
|
|
||
| | | L1 — from Lance | L2 — added by OmniGraph | | ||
| |---|---|---| | ||
| | Storage | Columnar Arrow datasets on object storage | Per-type datasets coordinated as one graph | | ||
| | Versioning | Per-dataset versions + time travel | [Snapshots](../branching/time-travel.md) across all types at once | | ||
| | Branches | Per-dataset branches | [Graph-level branches](../branching/index.md), atomic across types | | ||
| | Commits | Per-dataset commits | [Commit DAG](../branching/index.md) for the whole graph; three-way [merge](../branching/merge.md) | | ||
| | Indexes | Scalar / vector / full-text indexes | Built per relevant column; graph topology index for traversal | | ||
| | Search | Vector + full-text primitives | [`nearest` / `bm25` / `rrf`](../search/index.md) in one query, plus graph traversal | | ||
| | Querying | — | The [`.gq` query language](../queries/index.md) and [`.pg` schema language](../schema/index.md) | | ||
|
|
||
| ## How the pieces fit | ||
|
|
||
| - The **schema** (`.pg`) and **query** (`.gq`) languages are compiled to a typed | ||
| intermediate representation. | ||
| - The **engine** runs queries and mutations against Lance, coordinates the manifest, | ||
| maintains the commit graph, and builds indexes. | ||
| - The **CLI** ([`omnigraph`](../cli/index.md)) and the | ||
| **HTTP server** ([`operations/server.md`](../operations/server.md)) are two front | ||
| ends over the same engine, so embedded and remote behavior match. | ||
| - [Cedar policy](../operations/policy.md) enforcement is engine-wide — every writer | ||
| goes through the same authorization gate regardless of front end. | ||
|
|
||
| For deployment-scale topics — multi-graph servers, control-plane operations, | ||
| recovery — see [clusters](../clusters/index.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quickstart.md:BranchCommand::Mergeusesurias a--urilong flag, not a positional. Passing the S3 path as a trailing positional will be rejected by clap.