Repository navigation
Description
Summary
TriG-star GRAPH blocks lower their reifier bundles through two separate constructions of the same f:reifies* shape:
- Shared builder:
fluree_db_transact::generate::flakes::reified_triple_bundlewrapsEdgeKey::to_reifies_facts_jsonld_compatible.FlakeSink/ImportSink(Turtle) andimport_trig_commit(TriG bulk import) use it. - Hand-built copy:
fluree-db-api/src/tx.rs,convert_named_graphs_to_templates(the// TriG-star: one f:reifies* bundle per reifier attachmentblock). This is the transactional TriG path, used byupsert_turtlewith GRAPH blocks. It pushes thef:reifiesGraph/Subject/Predicate/Lang/Objecttemplates itself, in its own order and with its own rule for whenf:reifiesLangis included.
If one copy changes and the other doesn't, the two paths drift apart. trig_star_in_graph_block_matches_jsonld_named_graph_annotation (fluree-db-api/tests/it_edge_annotations.rs) is the only test comparing the transactional bundle with JSON-LD @annotation flake by flake. Dropping the f:reifiesGraph push in tx.rs makes it fail, but a new field or a changed rule for leaving out f:reifiesDatatype only gets caught if that test's fixture happens to exercise it. The import path is covered separately by imported_trig_star_bundle_carries_its_graph_and_cascades (#1832).
Why the copy exists
The transactional path emits TripleTemplates, not Flakes. Its reifier, subject and object can still be unresolved blank nodes (TemplateTerm::BlankNode), which are skolemized at staging. reified_triple_bundle needs resolved Sids and a FlakeValue, so tx.rs can't call it.
Possible shape
Move the bundle layout into one place that works for either term type: a function that yields the ordered (reifies predicate, object, datatype constraint) rows for an edge, generic over its term type, or an equivalent EdgeKey-level description. to_reifies_facts_jsonld_compatible would build flakes from it and convert_named_graphs_to_templates would build templates from it. Both surfaces would then read the omission rules (f:reifiesDatatype omitted, f:reifiesLang only for language-tagged objects, f:reifiesGraph only for named graphs) from one definition.
Done when
tx.rsno longer lists thef:reifies*predicates itself.- The existing parity test still passes, and changing the bundle shape in the shared definition changes both surfaces.
- The
reified_triple_bundledoc comment (updated in RDF 1.2: rdf:reifies triple terms on the text ingest paths, and TriG-star inside GRAPH blocks #1832 to name the second builder) is updated again.
Follow-up from #1832 review.
Activity
bplatz commentedon Nov 20, 2026
Fixed on
nextby #2017 (merged 2026-10-06, a25d446), which removes both constructions of thef:reifies*bundle: annotations are nowrdf:reifieslinks, andreified_triple_bundleno longer exists there. Ships in 5.0;main(4.2.x) keeps the old code. The PR'sFixeskeyword didn't close this because its base wasnext.