Skip to content

feat(tck): node-value rendering + first whole-node un-skip + matrix v2 (#889 slice 2)#899

Merged
DecisionNerd merged 3 commits into
mainfrom
feature/889-slice2-render-unskip-final
Jun 23, 2026
Merged

feat(tck): node-value rendering + first whole-node un-skip + matrix v2 (#889 slice 2)#899
DecisionNerd merged 3 commits into
mainfrom
feature/889-slice2-render-unskip-final

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Part of #889 (slice 2) / advances #598. The payoff of the engine work this cycle: the render arms finally have a runnable corpus consumer.

What lands

  1. Render (tests/bdd/tck_steps.rs): render_cell gains a node Struct arm → (:Label {k: v}) (sorted keys, node_uuid omitted as non-deterministic) and a List arm; plus the And having executed: setup step.
  2. First whole-node un-skip — per-scenario. Corpus features interleave supported/unsupported scenarios, so un-skipping is per-scenario: remove the feature-level @skip-rust, tag only the still-unsupported scenarios. clauses/with/With1: [1][2][5] (node + null forwarding through WITH) now run and pass; [3]/[4]/[6] (relationship/path/optional-match) stay @skip-rust. Corpus passing 6 → 9.
  3. Matrix v2 (coverage_matrix.json + tck_coverage.rs): each feature now records scenarios_passing (runnable subset) and a rust_status of passing/partial/skip; _meta.scenarios_passing is the corpus total. tck_coverage recomputes per-scenario (feature or scenario @skip-rust) and asserts the matrix matches — the regression floor is now at scenario granularity.

Why per-scenario (vs whole-feature)

Empirically, zero corpus features are entirely runnable today (verified by running, not the over-optimistic static classifier) — each interleaves scenarios needing features still to come. Per-scenario un-skipping is the mechanism all of #598#601 will grow through.

Validation

  • BDD corpus 9/9 (Literals1 6 + With1 3); the node-returning With1 [1][2] exercise the render arms ((:A), (:B)).
  • tck_coverage green (With1 partial 3/6; _meta.scenarios_passing = 9); e2e (88) + cargo clippy --workspace -- -D warnings clean.

Engine prerequisites that made this possible (all merged this cycle): node values (#785/#893), WITH read-path + whole-node forwarding (#894/#896), multi-pattern + anon endpoints (#895), RETURN * (#897), CREATE anonymous paths (#898).

🤖 Generated with Claude Code

Note

Add node-value rendering and un-skip first whole-node scenarios in TCK with partial-status matrix support

  • Extends render_cell in tck_steps.rs to handle Arrow Struct (node) and List array types, formatting nodes as (Label1:Label2 {k: v, ...}) via a new render_node_struct helper.
  • Adds a given_having_executed step handler so setup queries can be run before assertions in BDD scenarios.
  • Removes the feature-level @skip-rust from With1.feature, adding per-scenario @skip-rust only to the 3 scenarios involving relationships, paths, or nullable nodes — making 3 additional scenarios runnable.
  • Rewrites coverage tracking in tck_coverage.rs to compute (total, passing) per feature, support a partial matrix status, and enforce a corpus-wide scenarios_passing floor.
  • Updates coverage_matrix.json to add scenarios_passing per feature and bumps _meta.scenarios_passing from 6 to 9.

Macroscope summarized 7b09645.

Summary by CodeRabbit

  • Tests
    • Enhanced TCK coverage tracking to compute Rust status per scenario, with new scenarios_passing visibility for more granular outcomes
    • Updated coverage matrix data and assertions to align with the per-scenario @skip-rust behavior
    • Added regression tests for nuanced tag placement with scenario outlines and examples
  • New Features
    • Expanded TCK step handling for required setup queries and improved Arrow value rendering in outputs (including struct and list shapes)
  • Bug Fixes
    • Improved error messaging for unimplemented Arrow type tiers to clarify missing render support

DecisionNerd and others added 2 commits June 23, 2026 16:33
Parked slice-2 render work for #889: render_cell Struct/List arms →
`(:Label {k: v})` and the `And having executed:` step. Verified correct
(Return4 [2] `(:Singleton)` passes when un-skipped), but corpus
un-skipping is gated on engine features (WITH/#577, multi-pattern MATCH,
builtins) — so this lands with the un-skip PR once those exist. Not for
merge yet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#889 slice 2 / #598)

Brings the parked render arms back now that the engine runs the needed
shapes (WITH forwarding, multi-pattern, RETURN *, node values), and
lands the first whole-node TCK un-skip with per-scenario granularity.

- Render (tests/bdd/tck_steps.rs, from the cherry-picked commit):
  render_cell gains node Struct → `(:Label {k: v})` (sorted keys,
  node_uuid omitted) and List arms; new `And having executed:` step for
  setup CREATEs.
- Un-skip (per-scenario): the corpus interleaves supported/unsupported
  scenarios, so a feature is un-skipped by removing its feature-level
  @skip-rust and tagging only the still-unsupported scenarios.
  clauses/with/With1: [1][2][5] (node + null forwarding) now run; the
  relationship/path/optional-match scenarios stay @skip-rust. Corpus
  passing 6 → 9.
- Matrix v2 (coverage_matrix.json + tck_coverage.rs): each feature now
  records `scenarios_passing` (the runnable subset) and a rust_status of
  passing/partial/skip; `_meta.scenarios_passing` is the corpus total.
  tck_coverage recomputes per-scenario (feature OR scenario @skip-rust)
  and asserts the matrix matches — the regression floor is now at
  scenario granularity. Docs updated.

Validated: BDD corpus 9/9 (Literals1 6 + With1 3); tck_coverage green
(With1 partial 3/6, total passing 9); e2e + clippy gate clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a having executed BDD setup step and Arrow rendering support for node structs and lists in the TCK step runner. Refactors the TCK coverage test to compute per-scenario scenarios_passing counts via feature_breakdown and status_for. Updates coverage_matrix.json with scenarios_passing for every feature and adjusts @skip-rust tags in With1.feature to mark three scenarios as newly runnable.

Changes

TCK Step Enhancements and Per-Scenario Coverage Tracking

Layer / File(s) Summary
BDD step: having executed and Arrow node/list rendering
crates/gf-api/tests/bdd/tck_steps.rs
Adds ListArray/StructArray imports, implements the having executed Given step that executes a setup query against the forge, extends render_cell() to dispatch on Struct (node) and List Arrow types, and adds render_node_struct() which emits sorted-property openCypher node literals.
Per-scenario coverage breakdown and test validation
crates/gf-api/tests/tck_coverage.rs
Updates module docs to define per-scenario rust_status semantics. Replaces file-level skip detection with feature_breakdown that line-scans feature text tracking contiguous tag blocks per scenario/outline (including expanded example rows) and produces (total, passing) counts; adds status_for mapping to rust_status; updates collect_features and test assertions to validate scenarios, scenarios_passing, and corpus-wide _meta.scenarios_passing. Adds regression tests for outline tag scanning edge cases.
Coverage matrix and With1.feature tag updates
tests/tck/coverage_matrix.json, tests/tck/features/clauses/with/With1.feature
Adds scenarios_passing to every feature record in the matrix and updates _meta with scenarios_passing: 9; changes With1.feature from skip to partial status; adjusts scenario-level @skip-rust tags to un-skip three scenarios (removing @skip-rust from line 31, adding it to lines 72, 94, and 125).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • DecisionNerd/graphforge#887: Both PRs modify crates/gf-api/tests/bdd/tck_steps.rs to extend the TCK Cucumber step vocabulary and the Arrow-to-TCK render_cell dispatch logic.
  • DecisionNerd/graphforge#891: Both PRs modify crates/gf-api/tests/tck_coverage.rs and tests/tck/coverage_matrix.json to enforce rust_status and scenario counts derived from @skip-rust tagging.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the three main components: node-value rendering, first per-scenario un-skip with matrix v2 support, all clearly mapped to the PR's core deliverables.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description is comprehensive and detailed, covering all major changes: node-value rendering, per-scenario un-skipping strategy with specific example scenarios, and matrix v2 coverage tracking with clear metrics.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/889-slice2-render-unskip-final

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/gf-api/tests/tck_coverage.rs`:
- Around line 61-116: The inner scanning loop for Examples blocks advances past
all non-scenario lines including tag blocks like `@skip-rust` that belong to the
next scenario. When the outer loop resumes at the next `Scenario:` line,
`pending_skip` has already been reset to false, causing scenario-scoped tags to
be ignored. To fix this, the inner loop (around lines 70-98 where it walks
through Examples and the trailing `j += 1`) needs to detect and stop before
consuming lines that start with `@` (tag lines). Add a condition to check if a
line starts with `@` and break the inner loop when such a line is encountered,
allowing the outer loop to properly re-process those tags for the following
scenario.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 791bcc3e-d8e1-466f-b87d-086a7b3ae675

📥 Commits

Reviewing files that changed from the base of the PR and between 9ccd05f and 24b0fd3.

⛔ Files ignored due to path filters (1)
  • docs/reference/tck-compliance.md is excluded by !**/*.md, !**/docs/**
📒 Files selected for processing (4)
  • crates/gf-api/tests/bdd/tck_steps.rs
  • crates/gf-api/tests/tck_coverage.rs
  • tests/tck/coverage_matrix.json
  • tests/tck/features/clauses/with/With1.feature

Comment thread crates/gf-api/tests/tck_coverage.rs
… CodeRabbit)

feature_breakdown's Scenario-Outline scan walked past every non-scenario
line including a following scenario's `@…` tag block (via the trailing
`j += 1`), so a scenario-scoped `@skip-rust` placed right after an
outline's Examples was never seen — that scenario would be wrongly
counted as passing (a latent false-positive that could mask a
regression; not triggered by the current corpus).

Fix: on a tag line, look past the contiguous `@` block — if it
introduces the next Scenario/Feature, stop so the outer loop sees the
tags; if it tags an Examples block, keep scanning (those rows still
count). Two regression unit tests cover both directions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
crates/gf-api/tests/tck_coverage.rs (1)

84-117: 🎯 Functional Correctness | 🔵 Trivial

Outline fix is correct; consider future-proofing for Examples-level @skip-rust tags.

The fix for the previously-reported outline tag-consumption bug is correct: when the contiguous @… block precedes the next Scenario/Feature, the inner loop breaks and i = j so the outer loop re-reads those tags (lines 84-96). The alternative path (j = k; continue) correctly retains Examples-block tags inside the outline.

However, that path also silently skips checking @skip-rust on an Examples: block itself. When a tag block precedes Examples: (not a scenario/feature), it is consumed at lines 97-98 and subsequent rows are unconditionally tallied at lines 100-117, even if @skip-rust was present. The current corpus carries no @skip-rust tags on Examples blocks, so counts remain correct today; however, for robustness, consider tracking a flag (e.g., pending_skip) within the outline scan to exclude such rows from passing if the corpus evolves.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/gf-api/tests/tck_coverage.rs` around lines 84 - 117, The tag block
preceding an Examples or Scenarios block is being consumed without checking for
`@skip-rust` tags, and the subsequent row counting in the inner while loop (lines
100-117) happens unconditionally. To fix this, introduce a flag variable (e.g.,
pending_skip) to track whether `@skip-rust` was present in the tag block that
precedes the Examples block. Check this flag when processing tags before the
Examples block, and then only increment the rows counter if the skip flag is not
set. This ensures that rows from Examples blocks with `@skip-rust` tags are not
unconditionally counted toward the passing rows tally.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/gf-api/tests/tck_coverage.rs`:
- Around line 84-117: The tag block preceding an Examples or Scenarios block is
being consumed without checking for `@skip-rust` tags, and the subsequent row
counting in the inner while loop (lines 100-117) happens unconditionally. To fix
this, introduce a flag variable (e.g., pending_skip) to track whether `@skip-rust`
was present in the tag block that precedes the Examples block. Check this flag
when processing tags before the Examples block, and then only increment the rows
counter if the skip flag is not set. This ensures that rows from Examples blocks
with `@skip-rust` tags are not unconditionally counted toward the passing rows
tally.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 25f4668b-4551-435c-a244-4e626fe82546

📥 Commits

Reviewing files that changed from the base of the PR and between 24b0fd3 and 7b09645.

📒 Files selected for processing (1)
  • crates/gf-api/tests/tck_coverage.rs

@DecisionNerd DecisionNerd merged commit 613fc67 into main Jun 23, 2026
43 checks passed
@DecisionNerd DecisionNerd deleted the feature/889-slice2-render-unskip-final branch June 23, 2026 23:11
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