omnigraph/docs/user/operations/errors.md
Andrew Altshuler 77dffdae92
docs(user): de-dev polish — strip internal scaffolding from user docs (Phase 3a) (#226)
Remove developer-only scaffolding that leaked into the public user/operator
docs, while preserving every user-facing behavior, command, flag, endpoint,
constant, and env var. No behavior changes.

Removed across 18 files:
- internal ticket / sequencing refs (MR-NNN, RFC-NNN, "Phase N");
- source-code paths (crates/**/*.rs, *.pest) and internal struct/function
  dumps (e.g. the QueryIR / GraphCommit / SchemaMigrationPlan Rust types,
  internal fn names like fork_branch_from_state, optimize_all_tables);
- Lance-internal blocker prose (upstream issue numbers, blob-decode cause,
  sidecar Phase-B/C mechanics) — keeping the user-visible behavior (e.g.
  "optimize skips Blob-column tables; reads/writes unaffected");
- pre-v0.4.0 Run-state-machine archaeology.

Internal IR/lowering/recovery-internals sections were either trimmed to a
brief user-facing note (e.g. "Traversal execution", "interrupted writes
recover automatically; recovery commits are recorded under actor
omnigraph:recovery") or removed.

Kept: all language syntax, lint codes, Cedar actions/scopes, endpoints,
error taxonomy, every constant and env var (verified none dropped from the
constants cheat-sheet), and the operator-facing explanations of on-disk
artifacts. Residual "legacy" mentions are all user-facing (the deprecated
omnigraph.yaml, the legacy token chain, old command names).

Verified: zero internal-scaffolding leaks (MR/RFC/Phase/.rs/.pest = 0) across
docs/user; zero broken links; check-agents-md.sh green.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 14:39:25 +03:00

1.8 KiB

Errors and Result Serialization

Error taxonomy (omnigraph::error::OmniError)

  • Compiler(...) — schema/query parse/typecheck errors
  • Lance(String) — storage layer
  • DataFusion(String) — execution layer
  • Io(io::Error)
  • Manifest(ManifestError { kind: BadRequest|NotFound|Conflict|Internal, details: Option<ManifestConflictDetails>, … })
    • ManifestConflictDetails::ExpectedVersionMismatch { table_key, expected, actual } — caller's expected_table_versions did not match the manifest's current latest non-tombstoned version (set by OmniError::manifest_expected_version_mismatch).
    • ManifestConflictDetails::RowLevelCasContention — Lance row-level CAS rejected the publish because a concurrent writer landed the same object_id. Retried internally by the publisher; only surfaces if the retry budget exhausts.
    • D₂ parse-time rejection: 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 query-language.md for the rule.
  • 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 binary
  • to_sdk_json() — JS-safe JSON (large i64 wrapped in metadata)
  • to_rust_json() — Rust-friendly JSON
  • batches() — direct Arrow RecordBatch access

Mutation results: { affectedNodes: usize, affectedEdges: usize } (also exposed as a tiny Arrow batch).