Skip to content

refactor(storage): split structured mutation modules - #2196

Merged
Jurij89 merged 3 commits into
refactor/2188-storage-owned-mutation-effectsfrom
refactor/2190-structured-mutation-modules
Aug 9, 2026
Merged

refactor(storage): split structured mutation modules#2196
Jurij89 merged 3 commits into
refactor/2188-storage-owned-mutation-effectsfrom
refactor/2190-structured-mutation-modules

Conversation

@Jurij89

@Jurij89 Jurij89 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Split the bounded structured-mutation implementation into focused delete, retention, subject replacement, graph projection, projection copy, and shared primitive modules.
  • Keep one optional TripleStore.structuredMutation() capability, one closed public descriptor union, and the existing compatibility facade; adapters and callers do not gain another probing/forwarding protocol.
  • Preserve validation order, SPARQL bytes, byte/operand bounds, graph accounting, quad rewriting, worker RPC descriptors, and immutable effect capture.
  • Reduce bounded-structured-mutation.ts from the operation grab bag to a small exhaustive dispatcher and compatibility/export boundary.

Related

Diagrams

  • No observable flow changes. The PR only decomposes the existing internal structured-mutation implementation; callers, adapter dispatch, generated SPARQL, effects, and store behavior remain unchanged.

Files changed

File What
packages/storage/src/bounded-structured-mutation.ts Exhaustive facade, dispatcher, quad rewrite, graph/effect model, and compatibility exports.
packages/storage/src/structured-mutation/primitives.ts Shared safe IRI/string/list validation and operand/serialized byte budgets.
packages/storage/src/structured-mutation/delete-subjects.ts Explicit subject-set delete validation and SPARQL.
packages/storage/src/structured-mutation/retention.ts Ranked-subject and linked-record retention operations.
packages/storage/src/structured-mutation/replace-subject-predicates.ts Predicate-scoped atomic replacement and object-rewrite preflight.
packages/storage/src/structured-mutation/replace-projection-from-graph.ts Staging-to-target projection replacement.
packages/storage/src/structured-mutation/copy-subject-projection.ts Bounded exact-root projection copy and ordered chunk planning.

Test plan

  • Storage build after restacking on refactor(storage): own structured mutation commit effects #2194
  • bounded-structured-mutation.test.ts: 19 passed, including all six real worker-RPC variants
  • external-literal-store.test.ts: 12 passed
  • graph-set-index-store.test.ts: 43 passed
  • changelog-store.test.ts: 42 passed
  • Focused total: 116 passed
  • Existing validation/error fixtures pass unchanged
  • Existing graph-index and changelog accounting suites pass unchanged
  • git diff --check; worktree clean

@otReviewAgent otReviewAgent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Agent completed this review and found no issues.

@Jurij89
Jurij89 force-pushed the refactor/2190-structured-mutation-modules branch from 5f57494 to 84facbf Compare August 9, 2026 12:05
@Jurij89

Jurij89 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@otReviewAgent Please run a convergence review against current head 84facbf; the latest automated no-issues review predates the final follow-up commit. CI is green and there are no unresolved threads.

@Jurij89

Jurij89 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@otReviewAgent Please review the current head for convergence. The branch has green CI and no unresolved threads; this request is specifically for the latest head after the storage split follow-up updates.

@Jurij89

Jurij89 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@otReviewAgent Please review the current head after the empty retrigger commit; CI and all prior threads should be evaluated against that head.

@Jurij89
Jurij89 merged commit 2abf4a4 into refactor/2188-storage-owned-mutation-effects Aug 9, 2026
5 checks passed
Jurij89 added a commit that referenced this pull request Aug 9, 2026
…2207)

Recover the reviewed #2187/#2194/#2196/#2197 stack onto the actual integration line, preserve the current integration gates, and close the escaped-hash leased-query bypass found during recovery review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants