fix(dx): tighten YAML scenario assertions and add path-finding harness features

What does this MR do and why?

Strengthens 32 YAML query scenario fixtures that were weaker than their original Rust test counterparts. Adds three new harness assertions for path-finding, total edge counts, and negative compile-error checks.

Relates to #1265 (closed)

Testing

All 261 YAML fixtures pass locally against Docker testcontainers. Parse validation passes in the local test suite. Full validation report comparing every Rust test against its YAML fixture: snippet 6054506.

Performance Analysis

  • This merge request does not introduce any performance regression. If a performance regression is expected, explain why.

Test-only changes. No runtime impact.

Agent context — long-form analysis, file-by-file walkthroughs, profiler output, alternatives considered

Validation methodology

Extracted all 262 Rust data correctness test functions and cross-referenced them with the # source: tags in all 261 YAML fixtures. Dispatched 14 parallel review agents, each comparing a batch of 20 Rust/YAML pairs and classifying each as identical, stronger, weaker, or different.

Results before this MR: 196 identical, 12 stronger, 47 weaker, 3 different.

What this MR fixes

Commit 1: tighten 20 existing YAML fixtures

  • 9 files: compile_error: true changed to substring match (e.g. compile_error: "traversal_path")
  • 6 files: prop_present replaced with rows carrying actual boolean/string values
  • 1 file: edge_exists changed to edges for exact set match
  • 3 files: added missing property rows, sql_contains entries, prop_absent
  • 1 file: new redaction_excludes_unauthorized.yaml fixture (was unported)

Commit 2: three new harness features + 12 fixture fixes

New QueryExpect fields in format.rs:

  • total_edge_count — asserts total edge count across all types
  • compile_error_not_contains — asserts error message does NOT contain substrings (info-leakage guard)
  • path_destinations — asserts path endpoint IDs by entity type (sorted set comparison)
  • path_edges — asserts per-path edge structure (from/to entity+id, edge type; all fields optional)
  • path_endpoint_absent — asserts entity types excluded from path edges

Corresponding runner logic in mod.rs.

12 YAML fixtures updated to use the new assertions.

Remaining gaps (intentionally deferred)

These cannot be expressed in a single-run declarative YAML fixture:

  • Determinism checks (cases 85, 90, 98, 101): require running the same query twice and comparing results
  • Cross-query comparison (case 58): compares text length between limit=1 and limit=1000 runs
  • Group column metadata (cases 192-194): assert_group_column checks response metadata structure
  • Compiled params inspection (cases 195, 198): inspects compiler internals; already tested at runtime via empty_aggregation
  • SQL injection cursor (case 82): tests a different (valid) property than the Rust test by design

%{all_commits}

Edited by Michael Usachenko

Merge request reports

Loading
Loading