Skip to content

docs(architecture): scope the Arrow result contract to data-returning operations #708

Description

@DecisionNerd

Problem

Confirmed on current main at 6dc51fa47a9658d26a3f6e51e8a8261aaf9b4b86.

docs/book/architecture/overview.md:35-41 says all methods return Arrow tables and no public surface returns bespoke result types. Public Rust APIs intentionally return Vec<String>, u64, String, (), and construction handles at:

  • crates/graphforge-api/src/lib.rs:2593-2632
  • crates/graphforge-api/src/lib.rs:2743-2761
  • crates/graphforge-api/src/construction.rs:20-24
  • crates/graphforge-api/src/construction.rs:79-85

Python and Node mirror these control, metadata, explanation, lifecycle, and construction surfaces. The central overview overclaims the Arrow contract.

Objective

State the contract precisely: tabular query/algorithm data remains Arrow in and Arrow out, while identified control, metadata, lifecycle, explanation, and construction operations may return scalars, collections, unit, or handles.

Requirements

  • Replace the universal overview claim with a precise data-plane versus control/construction-plane contract.
  • Inventory intentional non-Arrow return categories across Rust, Python, and Node.
  • Explain construction handles versus metadata/control results.
  • Preserve that bindings do not reshape tabular engine results into binding-owned objects.
  • Reconcile API, binding, architecture, and contributor docs repeating the universal claim.

Acceptance Criteria

  • The overview no longer says every method returns Arrow.
  • The Arrow guarantee clearly covers Cypher and analyst/data-bearing results.
  • Scalar, collection, unit, explanation, lifecycle, and handle exceptions match Rust/Python/Node signatures.
  • No docs imply bindings own execution or tabular reconstruction.
  • Search finds no contradictory universal Arrow-return claim.
  • Documentation/API signature checks pass at exact head.

BDD Completion Scenarios

Scenario: A client author selects the correct result type

Given a client author reads architecture and binding docs
When calling a Cypher/analyst operation versus metadata/construction
Then the documented result category matches the signature
And tabular graph results remain Rust-owned Arrow data.

Scenario: Thin bindings remain explicit

Given Python and Node expose the same operation
When its return contract is documented
Then any scalar/handle is identified as a thin facade value
And no binding-side graph execution or tabular reconstruction is implied.

Implementation Notes

Start from Rust facade signatures and mechanically compare Python stubs and Node declarations. Keep the Arrow data-result claim strong; narrow only the false universal quantifier.

Observability

No production change. Documentation/signature inventory checks are sufficient.

Security And Privacy

No new security/privacy surface.

Testing

Compare Rust public signatures with Python stubs and Node declarations. Run docs checks and searches for contradictions. Do not change runtime types merely to make prose true.

Documentation

Primary surfaces: docs/book/architecture/overview.md, public API/binding docs, and contributor architecture references.

Non-Goals

  • Converting lifecycle/metadata/explanation/construction APIs to Arrow.
  • Binding-owned result models.
  • Changing the data-bearing Arrow contract.

Related Issues

  • Parent tracker will be attached through GitHub's native sub-issue relationship.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationrelease:noneNo release note or version impact

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions