Atomic Apply

derivon apply --operations <FILE> [--max-operations-bytes <N>]

The operations file cannot be stdin or -. It is an unversioned JSON array whose version follows the CLI compatibility line (0.1.x before 1.0, major version after 1.0). Every item is a typed mutation object.

opRequired fieldsOptional fields and defaults
point.addiddata = {}
point.removeidcascade = false, ignoreMissing = false
point.renameid, newIdnone
point.data.setid, valuepointer = ""
point.data.removeidpointer = "", ignoreMissing = false
hyperedge.addid, head, weighttails = [], data = {}
hyperedge.removeidignoreMissing = false
hyperedge.renameid, newIdnone
hyperedge.set.tailsid, tailsnone
hyperedge.set.headid, headnone
hyperedge.set.weightid, weightnone
hyperedge.data.setid, valuepointer = ""
hyperedge.data.removeidpointer = "", ignoreMissing = false

Explicit data null is preserved. Tails are JSON arrays. Boolean fields require JSON booleans. File-based data/value forms do not exist inside operations. Missing, unknown, or incorrectly typed fields fail the complete apply. Issue paths include the operation array index, for example /operations/3/head.

Operations execute in array order and each intermediate graph must remain valid. Later operations may refer to entities created or renamed earlier. Reads, queries, and subgraph operations are rejected. An empty operation array succeeds and returns the input graph. The same no-op and strictness rules as individual commands apply.

The process mutates one owned graph and needs no rollback copy because no intermediate state is externally visible. The complete result is validated and serialized into memory before stdout is touched. Argument, parse, validation, operation, and serialization failures produce zero stdout bytes.

A final transport failure exits 74 but cannot retract bytes already accepted by the OS. This unavoidable Unix IO case is outside the atomic operation guarantee. Input and operations files remain read-only.