Skip to content

fix(gfql): validate absent relationship types - #2003

Merged
lmeyerov merged 4 commits into
masterfrom
fix/gfql-1916-relationship-type-validation
Aug 28, 2026
Merged

lmeyerov merged 4 commits into
masterfrom
fix/gfql-1916-relationship-type-validation

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Make strict validation reject a typed relationship when the edge schema proves the type absent.
  • Preserve the generic type-carrier case as unjudgeable without scanning instance values.
  • Treat an explicitly declared empty relationship-type catalog as judgeable and empty.
  • Record the fix under [Development] in CHANGELOG.md.

This closes the validator/executor agreement residual tracked by #1916 without changing default strictness, the declared-schema API, or remote behavior.

Final linear state

The three reviewed implementation/test patches are range-diff exact after the final rebase. The fourth commit adds only the requested changelog entry.

Relationship-type judgement boundary

The strict binder has four pinned states:

  • No relationship-type carrier and no declarations: the schema proves the requested type absent, so strict validation raises typed E301.
  • Generic type carrier without declarations: membership is unjudgeable without scanning values, so validation defers.
  • Generic carrier with an explicitly empty declared catalog: the declaration proves no type exists, so strict validation raises.
  • Nonempty declared catalog: strict validation judges ordinary membership.

Validation

  • Focused CPU boundary selection: 6 passed, 232 deselected.
  • Master-relative diff-check and added-line prohibited-token/broad-str scan: clean.
  • Canonical type-hygiene guard: no growth.
  • ./bin/lint.sh: clean, including Ruff, comment-density, and import guards.
  • ./bin/typecheck.sh: mypy 2.3.1, 336 source files, zero issues.
  • No Docker, local GPU, DGX, or broad local suite was used.

Review resolution

Landing

Review the master-relative range fcf369fb9...76d87ab22.

After this exact-head CI generation is green, the authorized landing method is GitHub Create a merge commit with admin override. Retain the source branch.

bool(available_types) or has_declared_type_catalog or "type" not in edge_columns
)
if can_judge_types:
for rel_type in relationship_pattern.types:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this sufficient positive and negative testing on either side of the boundary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The original positive/negative pair was sound for the no-carrier versus generic-carrier boundary, but it did not isolate the second disjunct added by the implementation: an explicitly declared empty relationship-type catalog. Exact commit 133a01955ede7d65126216cfa484a09814b93c5d adds that direct strict-binder case (type carrier + edge_types=() rejects NOPE). The resulting matrix now covers no carrier, generic undeclared carrier, explicit empty catalog, and nonempty declared catalog. Six focused tests pass; lint/mypy are clean; the incremental diff adds zero prohibited typing/dynamic-attribute tokens.

@lmeyerov
lmeyerov force-pushed the fix/gfql-1997-polars-gpu-bool-sum branch from e216bcd to 712e2d1 Compare August 27, 2026 10:31
@lmeyerov
lmeyerov force-pushed the fix/gfql-1916-relationship-type-validation branch from 053f216 to 133a019 Compare August 27, 2026 10:54
@lmeyerov
lmeyerov force-pushed the fix/gfql-1997-polars-gpu-bool-sum branch from 712e2d1 to d357373 Compare August 28, 2026 13:55
@lmeyerov
lmeyerov force-pushed the fix/gfql-1916-relationship-type-validation branch from 133a019 to 76d87ab Compare August 28, 2026 14:46
@lmeyerov
lmeyerov changed the base branch from fix/gfql-1997-polars-gpu-bool-sum to master August 28, 2026 14:48
@lmeyerov
lmeyerov merged commit 222799c into master Aug 28, 2026
110 of 111 checks passed
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