mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
Refresh user-facing and agent-facing docs for the staged-write rewire and clean up stale Run-state-machine references that survived MR-771. MR-794-specific updates: * docs/runs.md — remove "Known limitation: mid-query partial failure" section; document the in-memory accumulator + D₂ rule + the LoadMode::Overwrite residual. * docs/invariants.md §VI.25 — flip from aspirational/open to upheld for inserts/updates. Within-query read-your-writes is now load-bearing for the publisher CAS contract. * docs/architecture.md — add "Mutation atomicity — in-memory accumulator (MR-794)" subsection with per-op flow; refresh the engine + state diagrams to drop RunRegistry and add MutationStaging. * docs/execution.md — rewrite the mutation flow sequence diagram for the staged-write path; updated the LoadMode table to call out per-mode commit semantics; rewrote load vs ingest. * docs/query-language.md — document the D₂ parse-time rule. * docs/errors.md — add the D₂ BadRequest rejection path. * docs/testing.md — extend the runs.rs row to cover the new MR-794 contract tests; add the staged_writes.rs row. * docs/releases/v0.4.1.md (new) — release note covering the rewire, test additions, residuals, and files changed. * AGENTS.md (CLAUDE.md symlink) — update the atomic-per-query description and the L2 capability matrix row. Stale-reference cleanup (MR-771 leftovers): * docs/storage.md — drop live _graph_runs.lance / _graph_run_actors.lance from the layout diagram and prose; mark legacy. * docs/branches-commits.md — move __run__<id> to a legacy note; remove publish_run from the publish-trigger list. * docs/audit.md — refresh _as API list (drop begin_run_as / publish_run_as); legacy RunRecord.actor_id moved to a historical note. * docs/constants.md — mark run registry / branch-prefix rows as legacy. * docs/cli.md — replace the legacy omnigraph run * quickstart block with omnigraph commit list/show. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Errors and Result Serialization
Error taxonomy (omnigraph::error::OmniError)
Compiler(...)— schema/query parse/typecheck errorsLance(String)— storage layerDataFusion(String)— execution layerIo(io::Error)Manifest(ManifestError { kind: BadRequest|NotFound|Conflict|Internal, details: Option<ManifestConflictDetails>, … })ManifestConflictDetails::ExpectedVersionMismatch { table_key, expected, actual }— caller'sexpected_table_versionsdid not match the manifest's current latest non-tombstoned version (set byOmniError::manifest_expected_version_mismatch).ManifestConflictDetails::RowLevelCasContention— Lance row-level CAS rejected the publish because a concurrent writer landed the sameobject_id. Retried internally by the publisher; only surfaces if the retry budget exhausts.- D₂ parse-time rejection (MR-794): a single mutation query that mixes inserts/updates with deletes errors out before any I/O with kind
BadRequest. Message:mutation '<name>' on the same query mixes inserts/updates and deletes; split into separate mutations: (1) inserts and updates, then (2) deletes. See docs/query-language.md for the rule and docs/runs.md for the underlying staged-write rationale.
MergeConflicts(Vec<MergeConflict>)
Compiler-side NanoError covers parse / catalog / type / storage / plan / execution / arrow / lance / IO / manifest / unique-constraint, each with structured spans (SourceSpan { start, end }) for ariadne-style diagnostics.
Result serialization (omnigraph_compiler::result::QueryResult)
to_arrow_ipc()— efficient binaryto_sdk_json()— JS-safe JSON (large i64 wrapped in metadata)to_rust_json()— Rust-friendly JSONbatches()— direct ArrowRecordBatchaccess
Mutation results: { affectedNodes: usize, affectedEdges: usize } (also exposed as a tiny Arrow batch).