Repository navigation
noir_XPath v0.3.0
Resolves the deferred / future-planned function estate (sq-3kd2g.4, expanded by maintainer directive 2026-07-06; PR #50).
New functions
- SPARQL hash digests
SHA256/SHA384/SHA512—sha256_hex/sha384_hex/sha512_hex(plus*_hex_bytesvariants for([u8; N], len)byte-tuple pipelines), returning the canonical lowercase-hex([u8; 2*D], u32)byte tuple. Digest cores are the official noir-lang libraries, newly vendored with full provenance:vendor/sha256/(tag v0.3.0, MIT) andvendor/sha512/(main @e92ffb4, Apache-2.0 — upstream has no release tags). FIPS 180-4 known-answer vectors verified both on the upstream checkouts and through the wrappers. langMatches—lang_matches, RFC 4647 §3.3.1 basic filtering per SPARQL 17.4.3.6:"*"matches any non-empty tag; otherwise case-insensitive exact match or prefix ending at a-subtag boundary. ASCII case fold (exact per RFC 5646). Empty tag (no language) and empty range match nothing.TZ()—tz_from_datetimeplus the reusabletz_string_from_offset_minutes:"Z"for offset 0,"±HH:MM"otherwise,""for the newTZ_OFFSET_NONE(i16::MIN) no-timezone sentinel. Caveat stated in SPARQL_COVERAGE.md:XsdDateTimecarries no absent-timezone flag, so absence must be encoded via the sentinel; offset-0 values render"Z".GROUP_CONCATstring core —group_concat, joining a bounded member sequence with a separator (empty members keep their positions). Grouping /DISTINCT/ORDER BYremain query-engine concerns, as for all aggregates in this library.SAMPLE—sample_int/sample_int_partial: deterministic FIRST element (a legal implementation-dependent choice per SPARQL 18.5.1.7 — fixed because a prover-chosen nondeterministic sample would not be verifier-re-derivable),(value, present)emptiness convention.
Deliberately NOT added (honesty notes)
- MD5 / SHA1: permanently omitted — both cryptographically broken, no maintained sound Noir implementation exists to vendor, and hand-rolling broken digests into a ZK crypto library is refused by policy. Recorded in SPARQL_COVERAGE.md §17.4.6; these are not stubs counted as implemented.
- Full regex
fn:matches/fn:replace: still deferred (the bounded literal/char-class/anchored subset from sq-y73 remains); a bounded-NFA ZK-regex strategy is tracked as sq-j8shy. xsd:decimalexact arithmetic: still deferred (sq-n5e7p); xs:decimal results remain modelled in IEEE 754 double precision, stated per-row in SPARQL_COVERAGE.md.
Documentation repairs
- Stale coverage rows flipped: the float/double lanes of
abs/round/ceil/floorand the numeric operators have been implemented (vendoredsparq_ieee754) since the float migration — the rows now say so (named unary±lanes remain integer-only and are still marked partial). - Removed the false "ENCODE_FOR_URI deferred" claim (it is implemented).
- Source-of-truth banners updated: README/TESTING/CI no longer direct contributors to the removed in-monorepo
zk/xpathtree. - Collation scope resolved in ARCHITECTURE.md: codepoint collation (the SPARQL requirement) is what
compareimplements; locale/UCA tailoring is out of scope for data-oblivious circuits.
Conformance / CI status
- Test suite (pinned nargo 1.0.0-beta.21): 204
xpathinline tests + 303xpath_unit_tests+ 113/113 real qt3tests-derived packages pass (247 stub-wired excluded by design); KNOWN_FAILING is empty. - New-function tests use computed expected values only: FIPS 180-4 KATs cross-checked against Python hashlib, the SPARQL 1.1 spec's own TZ examples, RFC 4647 cases.
- Security status: unaudited — this is a 0.x release. The vendored digest crates are official noir-lang libraries but have not been independently audited here.
Changes since v0.2.0
Single squashed change: PR #50.
🤖 Released by SPARQ agent (Claude Fable 5) — sq-3kd2g.4 / epic sq-3kd2g (sparq#1591)