refactor(agent): decompose dormant profile record stack - #2174
Merged
Jurij89 merged 12 commits intoAug 8, 2026
Merged
Conversation
otReviewAgent
left a comment
There was a problem hiding this comment.
Review Agent completed this review and found no issues.
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
Related
integration/2052-system-record-syncstack branch; it does not close the broader Reconnect-triggered background sync amplification can starve foreground catch-up #2052 work.Diagrams
Producer publication flow
Before:
sequenceDiagram participant Caller participant Producer participant Preparation participant Signers participant Inventory participant Store Caller->>Producer: complete(confirmed publication) Note over Producer,Preparation: preparation and authority checks are inlined Producer->>Store: snapshot and resolve prior authority Producer->>Signers: sign head and inventory root Note over Producer,Inventory: inventory and closure work is inlined Producer->>Store: reserve expected snapshot Producer->>Store: install verified projection Producer->>Store: commit advertisement Producer-->>Caller: publication resultAfter:
sequenceDiagram participant Caller participant Producer participant Preparation participant Signers participant Inventory participant Store Caller->>Producer: complete(confirmed publication) Producer->>Preparation: build exact authority and publication plan Preparation->>Store: snapshot and resolve prior authority Producer->>Signers: sign and verify exact head Producer->>Inventory: plan inventory, artifacts, and closure Inventory->>Store: resolve retained authority artifacts Producer->>Store: reserve expected snapshot Producer->>Store: install verified projection Producer->>Store: commit advertisement Producer-->>Caller: publication resultProfile schema ownership
Before:
sequenceDiagram participant Author participant Schema participant Verifier Author->>Author: construct RDF from local vocabulary and subject strings Note over Schema: predicate policy split across Core modules Verifier->>Verifier: validate with parallel predicate, type, term, and link tablesAfter:
sequenceDiagram participant Author participant Schema participant Verifier Author->>Schema: resolve canonical terms and derived subject shapes Schema-->>Author: frozen V1 policy Verifier->>Schema: resolve subject and predicate policy Schema-->>Verifier: term kind, type, link, binding, and derivation rulesFiles changed
packages/core/src/agent-profile-schema-model-v1.tspackages/core/src/system-record-objects-v1.tspackages/core/src/agent-profile-projection-schema-v1.tspackages/core/test/system-record-policy-helpers-v1.test.tspackages/core/test/system-record-package-export-v1.mjspackages/agent/src/profile.tspackages/agent/src/system-records/agent-profile-producer-api-v1.tspackages/agent/src/system-records/agent-profile-producer-artifacts-v1-internal.tspackages/agent/src/system-records/agent-profile-producer-preparation-v1.tspackages/agent/src/system-records/agent-profile-producer-signing-v1.tspackages/agent/src/system-records/agent-profile-producer-inventory-v1.tspackages/agent/src/system-records/agent-profile-producer-commit-v1.tspackages/agent/src/system-records/agent-profile-producer-v1.tspackages/agent/test/system-record-agent-profile-producer-*-v1.test.tspackages/agent/test/agent-profile-producer-phase-boundaries.typecheck.tspackages/agent/package.jsonpackages/agent/scripts/test-package-root.mjsTest plan
pnpm --filter @origintrail-official/dkg-agent... buildpnpm --filter @origintrail-official/dkg-core test:system-recordpnpm --filter @origintrail-official/dkg-core test:system-record-exportpnpm exec vitest run test/system-record-agent-profile-producer-*-v1.test.ts test/system-record-provider-v1.test.ts test/profile-preparation-v1.test.ts --maxWorkers=1 --no-file-parallelismpnpm exec vitest run test/system-record-verified-replacement-v1.test.ts test/system-record-next-state-v1.test.ts test/system-record-atomic-apply-executor-v1.test.ts --maxWorkers=1 --no-file-parallelismgit diff --check