Skip to content

test(gq): add the Kuzu-derived .gqt case corpus - #617

Open
azimafroozeh wants to merge 1 commit into
ModernRelay:mainfrom
azimafroozeh:kuzu-derived-gqt-corpus
Open

test(gq): add the Kuzu-derived .gqt case corpus#617
azimafroozeh wants to merge 1 commit into
ModernRelay:mainfrom
azimafroozeh:kuzu-derived-gqt-corpus

Conversation

@azimafroozeh

Copy link
Copy Markdown
Contributor

What & why

97 kuzu_*.gqt feature cases (275 steps) translated from the Kuzu e2e tests (test/test_files/, MIT): regression coverage for match patterns, where, not { }, bounded traversal, return, order, limit, and the aggregates. Follow-up to #607. No harness change.

  • Coverage: every statement in Kuzu's GQ-shaped areas that GQ can express. Of 1,690 statements, 1,132 have no GQ spelling (arithmetic, WITH, path variables, functions, multi-label patterns) and 278 were skipped (large datasets, Kuzu -SKIP); they are absent, not red.
  • Where the engines disagree by design, the case pins GQ's reading and the header names Kuzu's value: {m,n} is shortest-path distance per endpoint pair, an undirected self-loop is one row, AVG at scale 12.
  • 10 cases pin behavior the engine does not have yet and are red on this branch (listed below); the PR is a draft until they go green.
  • crates/omnigraph-gqt/README.md gains the derived-case rules and the MIT notice; RFC 0045's Decision log records the source-prefix convention. The fix-regression gate keys on the issue_ prefix and never reads these files.

Backing issue / RFC

  • RFC 0045, GQ logic tests (docs/rfcs/0045-gq-logic-tests.md, draft): Decision log amended with the derived-case rules; nothing here differs from its design.

Checklist

  • Change is focused (one derived corpus, two doc paragraphs)
  • Tests added/updated for behavior changes (the PR is tests; each case is its own test)
  • Public docs updated if user-facing surface changed (none; crate README and RFC log updated)
  • Reviewed against docs/dev/invariants.md — data-only diff, no invariant touched

Local verification

  • cargo test -p omnigraph-gqt: 94 unit tests green; corpus 96 passed / 10 failed (the red-on-purpose set); slowest case 0.72 s.
  • Every expectation checked against three oracles independent of the engine and of Kuzu: hand derivation from the seed with the Cypher re-read for fidelity; a SQL translation run on SQLite (268 of 270 steps agree, the 2 left are an oracle gap in delete-cascade counting; seeded faults: 86 of 86 values and 6 of 6 orderings caught); a Python evaluator of the documented semantics (234 of 247 agree, the rest being the hop-range cases where it let a path return to its start, which the self-loop fix's release note rules out). The pass found and fixed one wrong expectation, four limit steps that were green only by scan order, and five dropped reads.
  • python3 scripts/check-docs.py: ok. Vocabulary guard, fmt, clippy: not run, no Rust or guarded surface in the diff.

Notes for reviewers

  • Red on purpose, 10 files, each with a # notes: Red on purpose: line naming what it waits on. GQ Logic Tests is a required check, so this stays a draft; each fix PR carries its own minimal issue_N_ case and these remain as full-seed coverage:
    • sum over an integer column accumulates in f64 (1 file)
    • duplicate result column name, T25 refusal not yet in the compiler (2 files)
    • F32 cells render as the f64 widening, 0.99 as 0.990000009537 (4 files)
    • min/max over Bool and Date refused, T8 (2 files)
    • count($e) over an edge binding refused, T23 (1 file)
  • 38 files inline the same seed: RFC 0045 keeps seeds inline by design; they are generated from one source, so a seed fix is one edit and a regenerate.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant