Skip to content

fix(api): a transaction stages a Turtle upsert as it stages the other operations - #2108

Merged
aaj3f merged 1 commit into
mainfrom
fix/txn-turtle-upsert-staging
Oct 14, 2026
Merged

aaj3f merged 1 commit into
mainfrom
fix/txn-turtle-upsert-staging

Conversation

@aaj3f

@aaj3f aaj3f commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

A Transaction stages each operation through the staging lane for its kind: JSON-LD, Turtle insert, Turtle upsert or SPARQL UPDATE. The Turtle upsert lane now receives the transaction's policy context, as the other lanes do.

Changes

  • fluree-db-api: stage_plan's Turtle upsert arm passes the policy context it is given to stage_rdf_text_tracked, like its other arms.
  • Test: every_kind_of_operation_is_checked_against_the_policy (it_transaction) stages each kind of operation (JSON-LD insert, upsert and update, Turtle insert and upsert, SPARQL UPDATE) in a Transaction on a ledger whose config denies writes by default, and expects each one to be refused with the ledger unchanged. It fails without the change.

The builder path is unchanged: a policy-scoped builder request already stages a Turtle upsert with its policy.

#2009 makes the same change as part of its staging rework, with the same test; this lands it on its own first. When #2009 is rebased onto it, the one conflict is that argument list, and #2009's side is the resolution.

Gates

  • fmt;
  • clippy -D warnings on fluree-db-api, all features and default features;
  • grp_transact (which holds it_transaction): 298 passed, with shacl,graphql and with default features;
  • fluree-db-transact: 386 passed.

The new test fails on main without the change and passes with it.

… operations

A `Transaction` stages each operation through the staging lane for its
kind. The Turtle upsert lane now receives the transaction's policy
context, as the JSON-LD, Turtle insert, SPARQL and graph lanes do.

Test: every_kind_of_operation_is_checked_against_the_policy stages each
kind of operation under a ledger whose config denies writes by default,
and expects each to be refused with the ledger unchanged.
@aaj3f aaj3f added bug Something isn't working as expected area:transact Staging, commit, import/bulk-import, novelty, retraction semantics labels Oct 13, 2026
@aaj3f
aaj3f requested a review from bplatz October 13, 2026 17:17

@bplatz bplatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@aaj3f
aaj3f merged commit 2ea306f into main Oct 14, 2026
19 checks passed
@aaj3f
aaj3f deleted the fix/txn-turtle-upsert-staging branch October 14, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:transact Staging, commit, import/bulk-import, novelty, retraction semantics bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants