Found during the architecture audit (sub-agent review).
Finding (MEDIUM)
Stages define structured errors (ParseError+kind in ast; BindError{kind,span} ir/binder.rs:111-118; LoweringError{UnknownFunction|UnsupportedExpr|UnboundVar|InvalidType} rel/expr.rs:74-95; AlgorithmError in exec) — but every public entry flattens to GfError strings:
- rel →
GfError::Plan(e.to_string()) at every public fn (rel/lowerer.rs:520,550,568,586,606,649); even LoweringError::InvalidType (a validation rejection) surfaces as GF_PLAN
- exec round-trips
GfError ↔ DataFusionError: to_df_err (exec:457-458) wraps into DataFusionError::External, then back via e.to_string() (exec:5911,5678) — double-stringification
- Entry-point divergence is tracked separately in the cypher-pure-parser issue
Why it matters
Error taxonomy at the public API is accidental (string content decides the code), and diagnostics lose span/kind information the stages already computed.
Acceptance criteria
Architecture review decision
Treat this as a parent public-error-contract issue. Define the conversion matrix before changing individual call sites.
Additional acceptance criteria:
The release impact is intentionally left undecided until public-code compatibility is proven.
Found during the architecture audit (sub-agent review).
Finding (MEDIUM)
Stages define structured errors (
ParseError+kind in ast;BindError{kind,span}ir/binder.rs:111-118;LoweringError{UnknownFunction|UnsupportedExpr|UnboundVar|InvalidType}rel/expr.rs:74-95;AlgorithmErrorin exec) — but every public entry flattens toGfErrorstrings:GfError::Plan(e.to_string())at every public fn (rel/lowerer.rs:520,550,568,586,606,649); evenLoweringError::InvalidType(a validation rejection) surfaces asGF_PLANGfError↔DataFusionError:to_df_err(exec:457-458) wraps intoDataFusionError::External, then back viae.to_string()(exec:5911,5678) — double-stringificationWhy it matters
Error taxonomy at the public API is accidental (string content decides the code), and diagnostics lose span/kind information the stages already computed.
Acceptance criteria
LoweringError::InvalidTypeno longer surfaces asGF_PLAN(test)Architecture review decision
Treat this as a parent public-error-contract issue. Define the conversion matrix before changing individual call sites.
Additional acceptance criteria:
GfError-> Python exception -> Node error codeGfErrorThe release impact is intentionally left undecided until public-code compatibility is proven.