branch

diff

Compare two branches and report the entities that differ across every primitive.

strata branch diff

wire branch_diff

Compares two branches and reports the authored entities that differ, grouped by capability and space: entries `added` on `branch_b`, `removed` relative to `branch_a`, and `modified` on both sides. The comparison is directional from `branch_a` to `branch_b`.

Every data primitive is compared - key-value, JSON documents, vectors, event streams, and graphs. Graph changes are reported per row class: nodes, edges, and ontology appear as separate capabilities in the result. Derived rows (search and vector indexes, graph reverse maps) are omitted. A missing branch is rejected with `not_found.engine.branch`.

Status commands return a scalar or compact status payload and do not mutate database state.

To see the complete help for this command, run:

strata branch diff --help

Example

Compare a fork against the branch it came from, across primitives.

strata vector collection create notes 2 --metric cosinestrata kv put config basestrata branch fork default experimentstrata command run --command-json '{"branch":"experiment","key":"Y29uZmln","type":"kv_put","value":"dHVuZWQ="}'  # diverge the key-value entry on the forkstrata command run --command-json '{"branch":"experiment","collection":"notes","key":"n1","type":"vector_upsert","vector":[0.1,0.2]}'  # add a vector on the forkstrata branch diff default experiment  # reports the key-value change and the new vector, grouped by capability

Parameters

NameTypeRequiredDescription
branch_astringyesThe first branch (the `A` side).
branch_bstringyesThe second branch (the `B` side).
at_timestampinteger or nullnoOptional read-as-of commit timestamp: compare each branch as of the `timestamp` from `history` output (a commit-timeline position, not the `version`).

Returns

StatusResponse<BranchComparisonItem>

  • dataBranchComparisonItem
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 10 Branches commands

agents: this page as markdown → /docs/reference/branch/diff.md