refactor(storage): add bounded managed mutation capabilities - #2186
Merged
Jurij89 merged 13 commits intoAug 9, 2026
Merged
Conversation
Jurij89
force-pushed
the
feat/2162-bounded-managed-capabilities
branch
from
August 9, 2026 05:49
bf3950c to
805d11d
Compare
Jurij89
force-pushed
the
feat/2162-bounded-managed-capabilities
branch
from
August 9, 2026 06:21
805d11d to
fb83d61
Compare
This was referenced Aug 9, 2026
Jurij89
added a commit
that referenced
this pull request
Aug 9, 2026
* refactor(storage): add bounded managed mutations * fix(agent): drain bounded join retention backlog * test(agent): exercise unified projection mutation * fix(storage): harden structured mutation boundary * fix(agent): preserve update-only join moderation * fix(storage): forward structured capability truthfully * fix(agent): chunk large RS heal projections * refactor(storage): centralize bounded operation probes * fix(storage): preserve bounded update compatibility * refactor(agent): unify join retention policy * fix(storage): preserve blob-backed bounded replacements * refactor(storage): centralize structured quad rewriting * fix(storage): retain update-only linked-record pruning --------- Co-authored-by: Jurij Skornik <jurij.skornik@gmail.com>
Jurij89
added a commit
that referenced
this pull request
Aug 9, 2026
* refactor(storage): migrate exact managed mutations * test(publisher): cover unsupported atomic materialization * refactor(storage): add bounded managed mutation capabilities (#2186) * refactor(storage): add bounded managed mutations * fix(agent): drain bounded join retention backlog * test(agent): exercise unified projection mutation * fix(storage): harden structured mutation boundary * fix(agent): preserve update-only join moderation * fix(storage): forward structured capability truthfully * fix(agent): chunk large RS heal projections * refactor(storage): centralize bounded operation probes * fix(storage): preserve bounded update compatibility * refactor(agent): unify join retention policy * fix(storage): preserve blob-backed bounded replacements * refactor(storage): centralize structured quad rewriting * fix(storage): retain update-only linked-record pruning --------- Co-authored-by: Jurij Skornik <jurij.skornik@gmail.com> * refactor(storage): reuse canonical capability walk * fix(agent): guard RS heal write boundaries * test(storage): prove constrained capabilities and stale heal --------- Co-authored-by: Jurij Skornik <jurij.skornik@gmail.com>
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
TripleStore.structuredMutation()capability whose six bounded variants cover subject-set deletion, ranked-subject retention, linked-record closure retention, predicate replacement, staged projection replacement, and byte-stable subject projection copy.update()and mutatingquery()on ownership-leased stores.Related
Diagrams
Managed structured mutation
Before:
sequenceDiagram participant Caller participant Decorators participant Store as TripleStore adapter participant Backend Caller->>Caller: Build raw SPARQL program Caller->>Decorators: update(program, touchedGraphs hint) Decorators->>Store: Forward opaque program Store->>Backend: Dispatch caller-authored mutation Backend-->>Caller: ResultAfter:
sequenceDiagram participant Caller participant Capability as structuredMutation union participant Decorators participant Store as TripleStore adapter participant Backend Caller->>Capability: Typed variant plus graph-explicit descriptor Capability->>Capability: Validate RDF scope, counts, and byte limits Capability->>Decorators: One normalized capability call Decorators->>Store: Account guarded and touched graphs Store->>Store: Build one bounded SPARQL update Store->>Backend: Dispatch adapter-authored mutation Backend-->>Caller: ResultRS repair projection copy
Before:
sequenceDiagram participant Heal as RS repair participant Store participant Backend loop Every root Heal->>Store: Raw INSERT WHERE Store->>Backend: One update per root end Heal->>Store: Raw marker/meta updatesAfter:
sequenceDiagram participant Heal as RS repair participant Store participant Backend Heal->>Heal: Preflight ordered root chunks under both 4 MiB limits Heal->>Store: Clear materialized-version marker Store->>Backend: Atomic predicate transition loop Every ordered root chunk Heal->>Store: structuredMutation(copy-subject-projection) Store->>Backend: One bounded server-side copy end Heal->>Store: Copy metadata Store->>Backend: Bounded server-side copy Heal->>Store: Stamp materialized version Store->>Backend: Atomic predicate transitionFiles changed
packages/storage/src/triple-store.tspackages/storage/src/bounded-structured-mutation.tspackages/storage/src/atomic-graph-replace.tspackages/storage/src/adapters/{oxigraph,oxigraph-worker,sparql-http,blazegraph}.tspackages/storage/src/{graph-set-index-store,changelog-store,shared-memory-literal-blob-store}.tspackages/agent/src/{dkg-agent-base,dkg-agent-join,join-request-retention,curator-meta-refresh,dkg-agent-swm-host}.tspackages/publisher/src/{catalog-persistence,agent-registry-meta-retention,metadata}.tspackages/{storage,agent,publisher}/test/**Test plan
pnpm --filter @origintrail-official/dkg-storage buildpnpm --filter @origintrail-official/dkg-storage exec vitest run --maxWorkers=1 --no-file-parallelism— 948 passed, 26 skipped integration tests.OxigraphWorkerStoreRPC coverage executes all six mutation variants through the worker boundary.pnpm --filter @origintrail-official/dkg-publisher buildpnpm --filter @origintrail-official/dkg-agent build— includes type and package-root checks.structuredMutationsupport.node scripts/sparql-scale-lint.mjs --diff c28d9a25177b941f09c7122c1825efc44f2d9504 HEAD— 0 new blocking findings; two intentionally bounded shapes acknowledged in source.store.update()caller and no mutatingstore.query()caller remains.git diff --check; no generated deployment output, ignored plan,.gitignore, or local-only files are included.