Commit 3077b36
Phase 1: settings validators + deep ring axis validation + persist axis defaults (#1280)
* phase1: validators, deep ring axis checks, and persist axis defaults
* fix: satisfy mypy for dataset_id URL refresh helper
* fix: make validate_settings typing compatible with python 3.8
* refactor: centralize axis field constants and typed dict contracts
* docs(changelog): record settings/axis validation + persist defaults work
* refactor(validate): centralize ring axis payload validators
* types(validate): add named url params/react settings aliases
* types(url_params): propagate named URLParamsDict across APIs
* feat(cypher): admit simple free-form intermediate MATCH (#1263) (#1279)
* feat(cypher/ir): add ReentryPlan.free_form marker for intermediate MATCH (#1263)
Adds a `free_form: bool = False` field to `ReentryPlan` so the runtime can
distinguish the LDBC SNB IC3 free-form intermediate MATCH shape from the
existing whole-row and scalar-only prefix shapes.
When the trailing MATCH after a prefix `WITH` introduces aliases none of
which is in the carried set, no carried alias anchors the seed pattern.
The runtime needs to broadcast carried columns onto the base node table
(single-prefix-row) or fall back to per-row union (multi-prefix-row) so
the trailing MATCH cross-joins implicitly via the row pipeline.
Default value preserves existing whole-row and scalar-only behavior.
Compile + runtime branches that consume this marker land in subsequent
commits.
Refs #1263 #999 #989
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(cypher): admit free-form intermediate MATCH at compile (#1263)
Lifts the failfast at the trailing-MATCH-first-alias check in
``_compile_bounded_reentry_query`` for the free-form case (LDBC SNB IC3
endpoint): when the trailing MATCH binds aliases none of which is in the
prefix WITH's carried whole-row set, treat every carried alias as
non-source and use the trailing MATCH's first alias as the carrier label
for downstream rewrites.
The existing ``_collect_non_source_alias_property_refs`` /
``_rewrite_reentry_expr_to_hidden_properties`` machinery (slice 4.3a/b
from #1248) materializes carried-alias property references as hidden
columns; with this change the same machinery covers free-form cases by
passing all whole-row aliases as ``non_source_alias_names``.
The ``ReentryPlan`` constructed for free-form sets
``free_form=True`` (no ``CarriedAlias`` entry has
``is_reentry_alias=True``) so the runtime can branch into a broadcast
path. The runtime change lands in a follow-up commit; until then,
free-form queries compile but return wrong rows because the existing
``_compiled_query_reentry_state`` still seeds from the wrong alias's
node ids — the regression is gated by the failfast tests (which fail
intentionally at this commit and are retargeted alongside the runtime
commit).
Also tightens the surviving guard from ``first_alias is None or
first_alias != reentry_alias`` to ``first_alias is None`` since the
admit branch now sets ``reentry_alias = first_alias`` for the
previously-rejected case.
Refs #1263 #999 #989
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(cypher): runtime broadcast for simple free-form + scoped failfast (#1263)
Lands the runtime half of the #1263 conservative admit:
* New ``_compiled_query_freeform_reentry_state`` in ``gfql_unified.py``
branches on ``ReentryPlan.free_form``. For a single-row prefix WITH
it broadcasts every ``__cypher_reentry_*`` hidden column from the
prefix row onto every base node and returns ``start_nodes=None``, so
the trailing MATCH runs as a regular MATCH and inherits the carried
values via the row pipeline. Multi-row prefix raises a clear
failfast pointing at the multi-row free-form follow-up slice.
* Compile gate added in ``_compile_bounded_reentry_query``: when
``free_form`` is True AND the trailing scope references any carried
alias property (e.g. ``WHERE country.id IN [x.id, y.id]`` in literal
IC3), raise a scoped ``#1263`` failfast pointing at the rewrite-order
refactor follow-up. The double-rewrite that emerges from composing
``_demote_secondary_whole_row_aliases`` (#1071) with
``_rewrite_reentry_expr_to_hidden_properties`` (#1248) under
free-form is deferred to its own focused slice.
End-to-end:
* Simple free-form (``MATCH (a) WITH a MATCH (c)-[:T]->(d) RETURN ...``)
compiles + executes vectorized on pandas.
* IC3-shape with carried-property WHERE rejects with a scoped #1263
failfast (clear error pointing at the follow-up).
Refs #1263 #999 #989
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(cypher): retarget free-form failfast tests for #1263 conservative admit
Two #1263 regression-locks added in #1270 expected the carried-alias gate to
fire for free-form intermediate MATCH. The conservative admit landed in the
preceding commits flips the simple shape from rejection to positive
execution and tightens the rejection scope to the carried-property variant:
* ``test_string_cypher_failfast_rejects_intermediate_reentry_match_with_no_carried_source``
→ renamed to ``..._with_carried_property_in_trailing_where`` and pinned to
the new scoped #1263 failfast (carried-alias property in trailing scope).
* ``test_string_cypher_failfast_rejects_simple_freeform_intermediate_reentry_match``
→ renamed to ``test_string_cypher_executes_simple_freeform_intermediate_reentry_match``
and converted to positive: asserts the trailing MATCH binds correctly
against the broadcast carried row table.
* New ``..._on_cudf_when_available`` mirror with ``pytest.importorskip("cudf")``
for engine parity per coordinator def-of-done.
Refs #1263 #999 #989
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(cypher): add multi-prefix-row free-form failfast regression (#1263)
Wave 1 review (single CONFIRMED IMPORTANT): the runtime failfast at
gfql_unified.py for multi-prefix-row free-form admit was untested. Adds a
positive regression-lock that builds a 2-row prefix and asserts the scoped
``single-row prefix WITH only`` failfast wording.
Refs #1263
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(changelog): #1263 simple free-form intermediate MATCH admit
Records the conservative #1263 close: simple free-form admit + scoped
failfast for the carried-property-in-trailing-WHERE variant + runtime
broadcast helper + retargeted regression tests + three TCK admits.
Refs #1263 #999 #989
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(cypher): Wave 2 amplification — multi-carried + empty prefix free-form (#1263)
Wave 2 review per agents/skills/review/SKILL.md confirmed convergence
(two consecutive non-significant-advance waves) and surfaced two
amplification SUGGESTIONs that the reviewers verified produce correct
behavior. Locking the contract:
* test_string_cypher_executes_freeform_intermediate_reentry_match_with_multi_carried_aliases
— covers `WITH a, b MATCH (c)-[:T]->(d)` shape (multi-carried-aliases admit).
* test_string_cypher_executes_freeform_intermediate_reentry_match_with_empty_prefix
— covers `_compiled_query_freeform_reentry_state`'s empty-prefix
early-return path.
Refs #1263
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c069e8f commit 3077b36
15 files changed
Lines changed: 707 additions & 35 deletions
File tree
- graphistry
- compute
- gfql/call
- io
- tests
- compute
- validate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
780 | 781 | | |
781 | 782 | | |
782 | 783 | | |
783 | | - | |
784 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
785 | 788 | | |
786 | 789 | | |
787 | 790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
1883 | 1884 | | |
1884 | 1885 | | |
1885 | 1886 | | |
1886 | | - | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1887 | 1895 | | |
1888 | 1896 | | |
1889 | 1897 | | |
| |||
1898 | 1906 | | |
1899 | 1907 | | |
1900 | 1908 | | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1901 | 1915 | | |
| 1916 | + | |
1902 | 1917 | | |
1903 | 1918 | | |
1904 | 1919 | | |
1905 | | - | |
| 1920 | + | |
| 1921 | + | |
1906 | 1922 | | |
1907 | 1923 | | |
1908 | 1924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
95 | 118 | | |
96 | 119 | | |
97 | 120 | | |
| |||
311 | 334 | | |
312 | 335 | | |
313 | 336 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 337 | + | |
321 | 338 | | |
322 | 339 | | |
323 | 340 | | |
324 | 341 | | |
325 | 342 | | |
326 | 343 | | |
327 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
328 | 348 | | |
329 | 349 | | |
330 | 350 | | |
| |||
390 | 410 | | |
391 | 411 | | |
392 | 412 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
| 413 | + | |
400 | 414 | | |
401 | 415 | | |
402 | 416 | | |
403 | 417 | | |
404 | 418 | | |
405 | 419 | | |
406 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
407 | 424 | | |
408 | 425 | | |
409 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
608 | 612 | | |
609 | 613 | | |
610 | 614 | | |
611 | | - | |
| 615 | + | |
612 | 616 | | |
613 | 617 | | |
614 | 618 | | |
| |||
633 | 637 | | |
634 | 638 | | |
635 | 639 | | |
636 | | - | |
| 640 | + | |
637 | 641 | | |
638 | 642 | | |
639 | 643 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
| |||
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| 260 | + | |
| 261 | + | |
254 | 262 | | |
255 | 263 | | |
256 | 264 | | |
| |||
350 | 358 | | |
351 | 359 | | |
352 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
353 | 370 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
2374 | 2375 | | |
2375 | 2376 | | |
2376 | 2377 | | |
2377 | | - | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
2378 | 2386 | | |
2379 | | - | |
| 2387 | + | |
2380 | 2388 | | |
2381 | 2389 | | |
2382 | 2390 | | |
| |||
2396 | 2404 | | |
2397 | 2405 | | |
2398 | 2406 | | |
2399 | | - | |
| 2407 | + | |
2400 | 2408 | | |
2401 | 2409 | | |
2402 | 2410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
389 | 437 | | |
390 | 438 | | |
0 commit comments