Repository navigation
(SPARQL) Full W3C Suite in CI w/ Registers for Skip/Ignore - #1437
Merged
Merged
Conversation
Audit found CI compiled the testsuite but never ran it, eval categories were all #[ignore]d, and the harness had fallen behind the engine (UPDATE execution, TriG/named graphs). This makes the whole rdf-tests submodule enforceable: - implement mf:UpdateEvaluationTest end-to-end over the public sparql_update transact surface (load ut:data/ut:graphData, apply, compare resulting default + named graph state isomorphically; 24 -> 67 passing) - load qt:graphData/ut:graphData as real named graphs (TriG GRAPH blocks via the transact builder) instead of dumping them into the default graph; fix labeled graphData blank nodes being silently dropped (never read ut:graph) - add CSV/TSV expected-result parsing with CSV-space projection (0 -> 5 of 6) - register the SPARQL 1.2 suites (254 tests) and the un-versioned Positive/NegativeUpdateSyntaxTest types used by them - move every suite's skip list to tests/registers/mod.rs, grouped by root cause; drop 14 stale property-path entries (13 features since landed + pp06 caught by the new check) - police registers in both directions in check_testsuite: unexpected failures AND stale entries (registered tests that now pass) fail the suite - drop the duplicate combined-manifest test fns; de-#[ignore] everything; CI now runs cargo test (36 suites, ~1420 tests, all green, ~15s wall) - document the audit, failure taxonomy, and perf-safe burn-down plan in docs/audit/2026-07-sparql-testsuite-audit.md; refresh docs/contributing/sparql-compliance.md and the Makefile for the new model
… plan
Corrects the empirical placeholder: RDF 1.2 annotation syntax ({| |}, ~,
<<( )>> restricted to rdf:reifies) is parsed, lowered to
Pattern::EdgeAnnotation, executed, and durably stored via the reified-edge
model. Actual 1.2 gaps: triple-term functions, bare triple-terms-as-values
(design decision needed), Turtle-star ingest (map onto the existing
edge_annotations reifier pipeline), CONSTRUCT annotation projection. Also
records SERVICE as Fluree-only by design and confirms UPDATE Modify parses
WITH/USING.
SPARQL, JSON-LD query, and Cypher share the IR and execution engine. Every W3C burn-down fix must classify as IR/engine-level (implicit parity, still add a JSON-LD regression test) or surface-syntax addition (SPARQL-possible => JSON-LD-possible in the same effort; Cypher assessed against the openCypher support matrix). The W3C submodule only guards the SPARQL surface — JSON-LD/Cypher regression tests are authored with each fix.
We own the JSON-LD query syntax, so SPARQL-possible => JSON-LD-possible stands with regression tests per fix. Cypher is openCypher — not our grammar to extend — so SPARQL compliance work carries no Cypher syntax obligations; it benefits from shared IR/engine fixes automatically.
Address the review's findings — all verified real; all make the harness's green trustworthy rather than changing what it covers: - (review #1) the 'no unexpected named graph' guard was dead code: the engine binds GRAPH ?g as a plain literal, so the Iri-only filter in list_named_graphs always produced []. Accept literal and IRI bindings (excluding the alias-named default graph) so the guard survives the eventual engine fix. Verified live: an update leaving a stray graph with no expected graphs now fails with 'Unexpected non-empty named graph'. - (review #2) bail when a manifest yields zero tests — a submodule restructure or manifest-parser regression must not report green. - (review #3) a registered test that dies by timeout/subprocess crash now hard-fails: the register excuses a known wrong answer, not an infra death masking a new hang or panic. - (review #4) UpdateEvaluationTest now rejects an mf:result blank node exposing none of ut:data/ut:graphData/ut:result, instead of degrading to a trivially satisfiable 'expected empty store'. - (review #5) register entries matching no discovered test now fail the suite, so dead entries (typos, upstream renames) cannot accumulate. - notes: tightened the TSV bare-integer heuristic to a single optional leading sign; documented the line-based directive-hoisting assumption; fixed the stale 'CI runs make ci' Makefile comment. Full suite remains green: 36 suites, ~1420 tests, 0 failed, 0 ignored.
…rables) Pre-implementation root-cause audits for every register cluster, produced by parallel deep-dive passes with live reproduction (run-w3c-test probes, CLI repros) rather than register-comment inference. Highlights: - update: ~90 failures collapse to 6 root causes; multi-operation ';' requests silently execute only the first op (production-facing; register comments for insert-05a / same-bnode / delete-insert-01c corrected) - parser-syntax: 62 tests -> 8 accept-more + 6 reject-more rules; four validation passes missing entirely; reject-more = user-visible changes - named-graph/dataset: GRAPH ?g literal binding is a one-line fix; default graph enumeration is the intentional #1279 extension (recommend W3C-by-default); SS5.3 answered: within-ledger datasets (Option A) - expression-semantics: 13 defects; two shallow bugs (DATATYPE/LANG reject expression args; variable-free FILTER drops all rows) explain ~40 tests; ~28 register entries reassigned to other clusters - lexer/formatter: bnode-label dot lexing + canonical xsd:double form - sparql12 wave 1: VERSION already supported (register mislabel); lang-basedir is a cross-stack representation gap; Turtle-star ingest via shared EdgeKey::to_reifies_facts greens only 2/41 eval tests alone - sparql12 wave 2: both triple-term registers are pure syntax suites; D3 decision narrowed to accept-then-defer vs documented divergence - residual-eval: property-path multiplicity framing corrected (sequences already correct + regression-guarded); pp34/35 are mis-filed graph bugs; entailment candidate wins via existing owl2rl materializer + PRAGMA Stage-2 adversarial verification runs before any claim alters registers or published statements.
Stage-2 verification of the eight cluster audits: 55 load-bearing claims attacked by independent skeptics — 40 confirmed, 13 refuted, 2 uncertain — plus a cross-cluster completeness check over every register entry. Material corrections the verification caught before implementation: - the proposed bnode-dot lexer loop breaks spec-valid _:a..b (and doesn't compile); replaced with greedy-scan + trailing-dot-rewind - the harness .rdf DAWG parser bug is real but backwards: Event::Empty state-stack skew keeps unbound solutions and DROPS bound ones - double canonicalization scope was missing export.rs N-Triples/N-Quads sites and R2RML lexical() consumers - named-graph BUG-4 (existence-row drop) is empirically false — graph-exist actually fails on base-relative IRI resolution; phantom PR deleted and replaced with PR-BASE, which fills a genuine ownership vacuum - fluree-db-api swallows parse-error diagnostics whenever an AST survives recovery, so grammar tightening must prevent AST production - EdgeKey::to_reifies_facts full variant would emit orphan flakes; ingest must use the _jsonld_compatible variant, guarded by equivalence tests Slate: 17 firm PRs + 5 decision-gated items + 2 unowned work-streams (algebra/OPTIONAL-scope and output-serialization need a ninth cluster audit). Firm slate removes ~418 of 538 registered entries; end state with all decisions favorable is ~124 remaining (63 not-applicable, 47 entailment, 14 orphans). Decisions D-1..D-12 enumerated for team sign-off; three production bugs queued for immediate issue filing.
…on transparency in PR descriptions
This was referenced Jul 6, 2026
Closed
Closed
…1436) CI runs the PR merge commit, and #1436 landed on main after this branch's baseline: test_21/test_23/test_64 (sub-SELECT placement positives) and subquery12 now pass — removed per the both-way stale-entry policing that flagged them. test_65 (syntax-SELECTscope2) now parses instead of failing for the wrong reason, so it moves to the accepts-invalid class awaiting the SELECT-scope validation pass (burn-down PR-2).
…tion orphans The 14 unowned register entries decompose into six defects, with five corrections to prior assumptions: W-1's fix territory is parser/lowerer + subquery.rs + optional.rs, NOT where_plan.rs filter partitioning (the land-PR-X1-first gate is void; verified disjoint against the pr-x1 diff); quotes-3/4 are pattern-object datatype-drop (PR-X2 D5b), not string escaping; all three optional-complex tests are GRAPH-gated (PR-G1), not just complex-2; construct-3/4 + constructlist fall to ONE generic per-solution bnode-instantiation fix in CONSTRUCT output; nested-opt-1/2 need independent-scope-then-leftjoin OPTIONAL semantics — the one hot-path-risky item, split into its own deferrable PR.
This was referenced Jul 7, 2026
bplatz
reviewed
Jul 8, 2026
bplatz
reviewed
Jul 8, 2026
bplatz
approved these changes
Jul 8, 2026
bplatz
left a comment
Contributor
There was a problem hiding this comment.
A couple comments on this one, great to have additional coverage!
Address bplatz's two inline comments on the update-eval harness. Both make the suite's "green" more trustworthy; neither touches the engine. - (comment 2) list_named_graphs no longer excludes the default graph by string-comparing the ledger alias. The engine leaks the default graph into GRAPH ?g under the alias (burn-down/named-graph-dataset.md BUG-2 / #1279); step 5 now recognizes that leak by CONTENT (its triples equal the default-graph readback), which survives the engine renaming or IRI-expanding the alias, and emits a diagnostic if the default graph ever surfaces under an unexpected name. Dropping the name filter routes the leaked graph through the content check on every default-graph update test, so the full suite staying green proves the recognition works. - (comment 1) Document the register's structural blind spot: the both-way check catches registered-pass (stale) and unregistered-fail (regression) but is blind to an unregistered false-pass. Two leniencies open it — empty-graph non-tracking (CLEAR/DROP/CREATE, all currently registered; must not be silently un-registered when the graph-management grammar lands) and net-zero update vacuity. Enumerated the 12 currently-passing net-zero update-eval tests (rdflib isomorphism of initial vs expected state, intersected with the live pass list) in audit sec 5.4; flagged the WITH/USING no-op cases whose broken siblings are already registered. Full suite: 36 suites, 0 failed, 0 ignored-as-error. cargo fmt/clippy clean.
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.
Summary
This PR makes the entire W3C SPARQL test suite (the
rdf-testssubmodule, ~1,420 tests) an enforced, durable CI gate, and carries the complete, adversarially-verified burn-down plan for the remaining gaps. Before this change, thetestsuite-sparqlCI job rancargo test --no-run— it compiled the harness but never executed a single test — and every evaluation category was#[ignore]d.Now
cargo testintestsuite-sparql/runs all 36 suites green in ~15s, and CI runs exactly that on every PR. Every test either passes or appears in an explicit, root-cause-grouped skip register that is policed in both directions: an unregistered failure fails CI, and a registered test that starts passing also fails CI (stale entry). Registers can only shrink.This PR contains zero engine changes — only the out-of-workspace
testsuite-sparqlcrate, CI config, and docs. Hot-path risk is nil by construction. The engine fixes themselves live on 14 follow-up branches (see "What follows this PR").Reviewer's guide — where to spend attention
Review carefully (the real surface, ~1.5k lines):
testsuite-sparql/src/— harness changes:mf:UpdateEvaluationTestimplemented end-to-end over the publicsparql_updatetransact surface; named graphs loaded as real named graphs (TriG via the transact builder); CSV/TSV expected-result comparison;.rdf/SRX result-parser fixes; the both-way register policing inlib.rs::check_testsuite(unexpected-pass detection, zero-test floor, infra-death rule, dead-entry detection).testsuite-sparql/tests/registers/mod.rs— the skip registers. Each entry carries a root-cause comment and the future PR that owns it..github/workflows/ci.yml— the compile-only step replaced with the real run.Skim (analysis artifacts, ~6k lines):
docs/audit/2026-07-sparql-testsuite-audit.md(taxonomy + perf discipline) anddocs/audit/burn-down/(nine per-cluster root-cause audits +ROADMAP.md, the verified implementation plan: PR slate, sequencing, decision register D-1..D-13, wave outcome records). These documents were produced under a two-stage process — parallel deep audits followed by adversarial verification that refuted 13 of 55 load-bearing claims before anything was implemented; §1.1 of the ROADMAP records every refutation.Notable content decisions
SELECTas a Set-Operation Operand #1436 (sub-SELECT set-op fix) landed mid-effort, the stale-entry gate caught the four affected tests and the re-baseline commit documents exactly what moved — that mechanism working is the point of this PR.Fallout already handled on follow-up branches (not in this PR)
The suite immediately surfaced 10 production bugs, filed as #1438–#1447 with verified mechanisms (multi-op UPDATE silent data loss,
FILTER(true)dropping all rows,DATATYPE()rejecting expressions,GRAPH ?gbinding literals and leaking the default graph, a Turtle lexer rejection of valid_:label., non-canonicalxsd:doubleoutput, and more). Eight of the ten are already fixed on the follow-up branches below.What follows this PR
14 implementation branches (Waves 0–2 of the roadmap, ~230 register entries removed, all suite-green, all bench-gated) stack on this branch and become PRs after it merges, in the documented order:
pr-h1first (register hygiene), then siblings (pr-1,pr-l1,pr-l2,pr-x1,pr-pp,pr-2,pr-3,pr-u1,pr-base,pr-g1,pr-w15), then the two stacked pairs (pr-w2aafterpr-1;pr-u2afterpr-3). Merge choreography, joint-entry rules, and the Wave-3+ plan are indocs/audit/burn-down/ROADMAP.md.Test plan
cd testsuite-sparql && cargo test— 36 suites, 0 failed, 0 ignored (~15 s).cargo fmt --all -- --check,cargo clippy --all-targets -- -D warningsclean.