You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a deeply immutable, privately trusted structured-mutation snapshot that owns caller isolation, guarded/touched graph effects, and no-op classification while allowing unchanged in-process wrappers to reuse one identity.
Move deferred operand-budget validation and backend update generation into a Storage-internal materializer, with non-normalizing builders so leaf adapters construct update text once without a second O(N) operand copy.
Migrate Agent, GraphSet, Changelog, literal-blob, HTTP, Blazegraph, embedded Oxigraph, and worker-backed paths while preserving each owner's capability, reserved-graph, close/drain, lifecycle, and failure-recovery semantics.
Validate deferred operand budgets for candidates and no-ops before suppressing valid backend/HTTP/worker work, and externalize oversized SWM literals before final bounded materialization.
Trust only nominal local/worker pre-dispatch refusals; operational no-op failures and forged refusal codes still trigger Changelog reconciliation and GraphSet refresh.
Benchmark Storage-identical base dd078f0aa41c7c973b3fa1504050e1caff61db01 (same packages/storage tree as the a5c04c257 baseline artifact) -> f7cbf464c250f30d48888d9b4ca16c094b80a239: CPU -53.37%, retained heap +0.18%, max RSS -6.29%
The repository's literal node scripts/check-managed-store-raw-channels.mjs command cannot map the source module's .js specifier to sparql-lexer.ts under Node's built-in type stripping; the same checked-in script passes through the repository's installed tsx loader as recorded above.
@otReviewAgent Please run a convergence review against exact current head bd9851d97e1559d982e7e13feeba433ea7ba034d. The four prior threads have current-head replies and are resolved: typed deterministic budget refusals remain mutation-free, per-kind modules now own canonical capture/normalization/semantics/materialization, malformed snapshot fixtures cover the production path, and the private WeakMap boundary is retained to preserve the approved unchanged TripleStore contract. Please evaluate correctness, recovery classification, trust/API boundaries, resource bounds, test coverage, and merge readiness on this SHA.
@otReviewAgent Please run a convergence review against exact current head aea83829b5275724825f99c993d99654a9fb8a4d. All current-head findings now have evidence replies and every review thread is resolved. This head adds stable worker refusal categorization, one structured-mutation refusal classifier, discriminated snapshot typing without effect assertions, and direct multi-graph guard plus full worker-stack recovery coverage; the explicit per-kind ownership model is retained intentionally. Please evaluate correctness, worker protocol compatibility, recovery classification, trust/API boundaries, resource bounds, tests, and merge readiness on this SHA.
@otReviewAgent Please run a convergence review against exact current head 3e986c4b10882f036c700ee0c889ccf84aa7e364. Both findings from the prior review are addressed with evidence replies and resolved: worker no-ops now validate deferred budgets before the lifecycle/no-I/O return, and materialization uses explicit per-kind validation plus separate normalized update builders with no boolean mode. Exact-head builds, type contracts, package gates, focused worker/composition coverage, the full 1,052-test Storage suite, and the resource benchmark all pass. Please evaluate correctness, worker protocol/lifecycle behavior, resource bounds, tests, and merge readiness on this SHA.
@otReviewAgent Please run a final convergence review against exact current head f7cbf464c250f30d48888d9b4ca16c094b80a239 on base dd078f0aa41c7c973b3fa1504050e1caff61db01. All review threads now have exact-head evidence replies and are resolved. This head makes clean refusal classification explicit at the materialization/worker-preflight phase: bare late budget errors and forged public codes trigger Changelog reconciliation plus GraphSet refresh, while genuine parent/worker pre-dispatch refusals remain nominal, serialized, and mutation-free. The leaf-choreography and snapshot-aware rewrite suggestions are documented as nonblocking follow-ups because current backend policy ordering and captured identity are intentional and fully covered. Please evaluate correctness, recovery classification, worker protocol/lifecycle behavior, trust/API boundaries, resource bounds, tests, and merge readiness on this SHA.
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
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
Related
dd078f0aa41c7c973b3fa1504050e1caff61db01Diagrams
Structured mutation preparation
Before:
sequenceDiagram participant Caller participant Agent participant Decorators participant Leaf participant Backend Caller->>Agent: mutable descriptor Agent->>Agent: derive effects Agent->>Decorators: original descriptor Decorators->>Decorators: normalize and derive effects again Decorators->>Leaf: copied descriptor Leaf->>Leaf: normalize, validate, build update Leaf->>Backend: dispatch update or no-op requestAfter:
sequenceDiagram participant Caller participant Agent participant Decorators participant Leaf participant Backend Caller->>Agent: mutable descriptor Agent->>Agent: capture immutable snapshot once Agent->>Decorators: trusted snapshot mutation Decorators->>Decorators: reuse snapshot identity Decorators->>Decorators: optional literal rewrite and recapture Decorators->>Leaf: prepared mutation Leaf->>Leaf: deferred validation and one materialization alt executable Leaf->>Backend: dispatch one update else valid no-op Leaf-->>Caller: complete after policy/lifecycle preflight endFiles changed
packages/storage/src/bounded-structured-mutation.tspackages/storage/src/structured-mutation-materialization-internal.tspackages/storage/src/structured-mutation/*.tspackages/storage/src/adapters/*.tspackages/storage/src/{graph-set-index-store,changelog-store,shared-memory-literal-blob-store}.tspackages/agent/src/dkg-agent-base.tspackages/storage/src/index.tsand pack-gate fixturespackages/storage/scripts/benchmark-structured-mutation.mjspackages/storage/test/*structured-mutation*and owner testspackages/agent/test/replace-subject-agent-wrapper.test.tsTest plan
pnpm --filter @origintrail-official/dkg-core buildpnpm --filter @origintrail-official/dkg-storage buildpnpm --filter @origintrail-official/dkg-storage typecheck:type-contractspnpm --filter @origintrail-official/dkg-agent buildpnpm --filter @origintrail-official/dkg-storage test:package-exports(all properties held; all mutants killed)test/oxigraph-worker-resilience.test.ts: 11 tests passedtest/oxigraph-worker-respawn.test.ts: 12 tests passed--testTimeout=15000): 67 files / 1,053 tests passed; 26 configured integration/oracle tests skippedpnpm exec tsx scripts/check-managed-store-raw-channels.mjs(287 reviewed dynamic sites; no raw update or statically mutating query calls)git diff --checkv22.22.0, x64, fixture digest94aeae872655f5489f105a15c2d88c43912adfdcbb55fa3401e94d453fc850f3, 100,000 subjects, 10 warmups, 30 trials, 3 fresh processesdd078f0aa41c7c973b3fa1504050e1caff61db01(samepackages/storagetree as thea5c04c257baseline artifact) ->f7cbf464c250f30d48888d9b4ca16c094b80a239: CPU-53.37%, retained heap+0.18%, max RSS-6.29%The repository's literal
node scripts/check-managed-store-raw-channels.mjscommand cannot map the source module's.jsspecifier tosparql-lexer.tsunder Node's built-in type stripping; the same checked-in script passes through the repository's installedtsxloader as recorded above.