Skip to content

Commit 315d3cc

Browse files
lmeyerovclaude
andcommitted
Merge master (#1828, #1811, #1818) into perf/gfql-h3-two-hop-count-lazy
#1828 landed the low-cardinality count(*) gate in gfql_fast_paths.py, which is the same file this branch adds its fused two-hop count lane to, so this needed a real 3-way rather than the CHANGELOG-only resolution the earlier merges took. git merge-file returns rc=0 with zero conflict markers, and the arithmetic checks out: 2687 merged lines = 2538 (branch) + 149 (master-added), so nothing was dropped. Structurally the two additions are disjoint -- this branch dispatches the two-hop lane from _execute_two_hop_count_fast_path, while #1828 gates a SINGLE-hop grouped count on _LOWCARD_COUNT_MAX_GROUPS / _MAX_INPUT_ROWS. They do not gate on the same shape. A clean textual merge is not on its own proof of semantic compatibility -- the sibling PR #1819 hit exactly that trap, where a marker-free merge silently put a new fused lane in front of a guarded twin. Flagging it here so review checks the interaction rather than trusting rc=0; CI is the arbiter. CHANGELOG resolved structurally: master file taken whole, this branch entry re-inserted at the top of the same section it occupied. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYZRXegrALuXd3NHH5evqx
2 parents 6a27684 + b6181d3 commit 315d3cc

15 files changed

Lines changed: 3403 additions & 4164 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Large diffs are not rendered by default.

bin/test-polars.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ POLARS_TEST_FILES=(
4444
graphistry/tests/compute/gfql/test_seeded_typed_hop_fastpath.py
4545
graphistry/tests/compute/gfql/test_residual_polars_native.py
4646
graphistry/tests/compute/gfql/cypher/test_grouped_aggregate_fused_polars.py
47+
graphistry/tests/compute/gfql/cypher/test_grouped_aggregate_lowcard_count.py
4748
# module-level `importorskip("polars")` files that previously ran in no lane at all
4849
graphistry/tests/compute/gfql/test_engine_polars_narrow_combine.py
4950
graphistry/tests/compute/gfql/test_engine_polars_semi_key_dedup.py

docs/.rstcheck.cfg

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ ignore_roles =
2020
py:attr,
2121
py:exc,
2222
py:obj,
23-
py:data
23+
py:data,
24+
bench,
25+
bench-diag
2426

2527
# Ignore Sphinx-specific directives
2628
ignore_directives =
@@ -43,7 +45,9 @@ ignore_directives =
4345
glossary,
4446
productionlist,
4547
include,
46-
graphviz
48+
graphviz,
49+
bench-provenance,
50+
bench-disclosures
4751

4852
# Ignore common informational messages
4953
ignore_messages = (Hyperlink target "[^"]*" is not referenced\.$)
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"contract_version": 1,
3+
"title": "pyg-bench published docs numbers",
4+
"summary": [
5+
"The boundary between this repository and the pygraphistry docs. pyg-bench MEASURES and",
6+
"PUBLISHES; pygraphistry pretty-prints. Everything a consumer is allowed to assume about",
7+
"published/docs-numbers.json is written down here, checked on the producer side before the",
8+
"artifact is written, and re-verified independently on the consumer side before it renders.",
9+
"Two independent implementations of these rules is the point: a shared library would fail",
10+
"the same way on both sides of the boundary."
11+
],
12+
"artifact_path": "published/docs-numbers.json",
13+
"top_level_required": [
14+
"contract_version",
15+
"schema_version",
16+
"generated_by",
17+
"generated_at",
18+
"policy",
19+
"runs",
20+
"cells"
21+
],
22+
"policy_required": ["max_age_days", "managed_docs"],
23+
"run_required": [
24+
"measured_at",
25+
"host",
26+
"perf_lock_held",
27+
"quiet_host",
28+
"reps",
29+
"pygraphistry_commit",
30+
"pyg_bench_commit",
31+
"runtime",
32+
"dataset",
33+
"artifact",
34+
"row_validation"
35+
],
36+
"cell_required": [
37+
"run",
38+
"workload",
39+
"engine",
40+
"value",
41+
"unit",
42+
"decimals",
43+
"status",
44+
"comparison_allowed",
45+
"board_quotable",
46+
"disclosures"
47+
],
48+
"cell_status": ["ok", "partial", "adapter_workaround", "result_mismatch"],
49+
"cell_unit": ["ms", "s", "x"],
50+
"key_pattern": "^[a-z0-9][a-z0-9_]*(\\.[a-z0-9][a-z0-9_]*)+$",
51+
"date_pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
52+
"max_decimals": 4,
53+
"invariants": [
54+
{
55+
"id": "cell_names_a_known_run",
56+
"rule": "every cell.run must be a key of runs",
57+
"why": "a number whose provenance record is absent is an unprovenanced number"
58+
},
59+
{
60+
"id": "quotable_implies_comparable",
61+
"rule": "board_quotable implies comparison_allowed",
62+
"why": "a diagnostic-only figure must never reach a board"
63+
},
64+
{
65+
"id": "quotable_implies_ok",
66+
"rule": "board_quotable implies status == 'ok'",
67+
"why": "partial / adapter_workaround / result_mismatch cells are not results"
68+
},
69+
{
70+
"id": "caveat_travels_with_the_number",
71+
"rule": "status != 'ok' or comparison_allowed is false implies disclosures is non-empty",
72+
"why": "a bare ratio without its asterisk launders the caveat"
73+
},
74+
{
75+
"id": "ratios_are_comparisons",
76+
"rule": "unit 'x' implies comparison_allowed",
77+
"why": "a ratio between two numbers that were never established as comparable is not a speedup"
78+
},
79+
{
80+
"id": "value_is_rounded_as_published",
81+
"rule": "value == round(value, decimals), value is finite and >= 0, 0 <= decimals <= max_decimals",
82+
"why": "the consumer prints value verbatim; rounding must not happen at render time"
83+
},
84+
{
85+
"id": "engine_is_named",
86+
"rule": "cell.engine is a non-empty string",
87+
"why": "pandas and polars are not interchangeable and the reader must be told which one ran"
88+
},
89+
{
90+
"id": "measurement_is_dated",
91+
"rule": "run.measured_at matches date_pattern",
92+
"why": "staleness is checked against the MEASUREMENT date, not the export date"
93+
}
94+
],
95+
"consumer_obligations": [
96+
"Refuse to render a key the artifact does not contain — a missing number is a build failure, never blank text.",
97+
"Refuse to render a cell whose run.measured_at is older than policy.max_age_days.",
98+
"Refuse to render a non-board_quotable cell as a bare number; it may appear only through a role that labels it diagnostic-only.",
99+
"Render every referenced cell's disclosures and its run's provenance on the same page.",
100+
"Re-verify every invariant above before rendering, with an implementation that does not import this repository."
101+
]
102+
}

0 commit comments

Comments
 (0)