Repository navigation
fix(gfql): degree facts build on real graphs — density was my requirement, not the math's - #1872
Merged
Merged
Conversation
…ement, not the math's The builder refused gapped id spaces. Real node spaces are gapped (the board's is: ids [1,107438], nunique 107434), so degree facts built on every fixture and on ZERO real graphs -- answers stayed correct via the scan, so nothing failed. A 1-minute engagement probe caught it before a multi-hour lane receipted 'degrees do not help' as a false negative. Density is not required for the ARRAYS: ids absent from the span contribute zero to the dot, so sum_i indeg[i]*outdeg[i] over the span equals the gather-sum regardless of gaps. Only the kernel's DOMAIN proof needs density, and it already does that itself. Degrees now build over each edge partition's own endpoint span (from the per-type facts already in hand), bounded by the existing span cap. Considered and REJECTED: per-label block intervals (dense per-label on this board) -- one shuffle un-denses all of them; that is generator layout, not a graph property, and keying to it would be benchmark hacking. Probe on real board data, labeled dev-container, not a receipt: facts 0 -> 5, consult engaged, values identical; q8@100k 13.72 -> 2.84ms. The receipted lane follows the merge. Fixtures now interleave ids by default; the gapped-space pin flips from 'builds nothing' to 'builds and stays exact'; 29 pins pass. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
Review audit found two gaps. (1) The consult's span check had only its positive
side: nothing pinned that a fact covering a NARROWER span than the domain is
refused -- and using one would slice out of range and miscount. Now pinned
against the no-fact oracle. (2) The interleaved test's name went stale ('build
no facts') after the span fix; measured contract is facts BUILD (2), kernel does
NOT consult (its own dense-domain proof fails on scattered ids first), answer
correct -- all three now asserted, so a future change that makes scattered
domains provable flips the pin deliberately rather than silently.
Perf numbers audit: none in product code or tests; probe figures live in the
commit/PR text labeled dev-container, receipts owed to pyg-bench post-merge.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1871's degree facts built on every test fixture and on zero real graphs: the builder refused gapped id spaces, and real node spaces are gapped — the benchmark's own is (ids [1,107438], nunique 107434). Answers stayed correct via the scan, so nothing failed; a 1-minute engagement probe caught it before a multi-hour lane receipted "degrees don't help" as a false negative.
The fix is removing a requirement, not adding a mechanism
Density is not required for the arrays: ids absent from the span contribute zero to the dot, so
sum_i indeg[i]*outdeg[i]equals the gather-sum regardless of gaps. Only the kernel's domain proof needs density — and it already does that itself. My builder was strictly tighter than the kernel it served.Degrees now build over each edge partition's own endpoint span (already in hand from the per-type facts), bounded by the existing span cap.
Considered and rejected: per-label block intervals
Per-label intervals are dense on this board — and one shuffle un-denses every one of them. That's the generator's file layout, not a property of graphs; keying to it would flip the board while users see nothing. Owner called it what it is.
Probe (dev-container, labeled, not a receipt)
The receipted lane follows the merge; no verdict is claimed here.
Pins
Fixtures now interleave ids by default (block-contiguous fixtures are how 13 pins passed while the real board built nothing). The gapped-space pin flips from 'builds nothing' to 'builds and stays exact'. 29 pass, whole-tree mypy clean apart from the two pre-existing
degrees.pyerrors.🤖 Generated with Claude Code
https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi