Skip to content

test(rel): prove expression and relational-lowering boundaries #367

Description

@DecisionNerd

Problem\n\nThe accepted #360 workspace report shows the largest concentrated executable gaps in graphforge-rel/src/expr.rs and graphforge-rel/src/lowerer.rs. Existing happy-path and TCK coverage does not directly prove malformed Arrow shapes, heterogeneous value access, temporal boundaries, or created-row schema rejection behavior.\n\n## Objective\n\nAdd deterministic table-driven and property tests for reachable relational expression and lowering contracts without changing product behavior.\n\n## Requirements\n\n- Cover success, exact failure, and meaningful boundary cases for dynamic list/map/property access, heterogeneous values, temporal conversion/order, and scalar normalization.\n- Cover created-row schema, reserved topology fields, reference-vs-minted entities, and malformed/unbound lowering inputs.\n- Prefer public lowering behavior where it proves multiple layers; use module tests for pure Arrow/DataFusion helpers.\n- Do not exclude code, manufacture product branches, or accept missing results.\n\n## Acceptance Criteria\n\n- [ ] Selected uncovered expression/lowering contracts have explicit oracles.\n- [ ] Representative wrong value, wrong error, null, empty, overflow, and malformed-schema mutations fail.\n- [ ] graphforge-rel remains above the per-crate floor and materially reduces the canonical aggregate deficit.\n- [ ] Targeted and workspace gates pass with no runtime behavior change.\n\n## BDD Completion Scenarios\n\n### Scenario: Dynamic access rejects malformed values exactly\n\nGiven null, valid, wrong-type, out-of-range, and malformed tagged Arrow values\nWhen relational expression evaluation runs\nThen valid inputs return exact values\nAnd invalid inputs return the documented DataFusion error class.\n\n### Scenario: Created rows have a deterministic schema\n\nGiven reference and newly minted node specifications\nWhen relational lowering builds the emitted-row schema\nThen input columns and minted identity/property columns have exact types and qualifiers\nAnd reserved or unresolved fields are rejected.\n\n## Testing\n\nUse table-driven unit/property tests plus real lowering integration tests. Run the canonical coverage ledger and standard Rust gates.\n\n## Documentation\n\nUpdate testing evidence mapping only if the canonical coverage documentation needs a new boundary example.\n\n## Non-Goals\n\n- Executor persistence behavior.\n- Storage publication and facade contracts.\n- Runtime feature changes.\n\n## Related Issues\n\n- Parent and canonical close gate: #360\n- Blocked by the foundational coverage-ledger child.\n

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions