feat(agent): add exact active System Record receiver - #2202
Merged
Jurij89 merged 18 commits intoAug 9, 2026
Conversation
Contributor
Author
|
@otReviewAgent Please review the current head for merge readiness. This is the first default-unused Stack D receiver kernel; it does not register or activate sync, and its local resource/fail-closed gates plus live managed-ownership CI are green. |
Contributor
Author
|
@otReviewAgent Please review current head f94b34d for convergence. The latest commit pins exact verifier head/bundle/signal inputs, exposes an active-head envelope at the candidate boundary, and verifies full multi-subject handoff; Agent build/type/package checks and 65/65 focused tests pass. |
8 tasks
Contributor
Author
|
@otReviewAgent Please review the current head after the empty retrigger commit; evaluate the exact active receiver kernel for convergence. |
added 9 commits
August 9, 2026 22:42
Jurij89
force-pushed
the
fix/2052-agent-profile-sync
branch
from
August 9, 2026 20:49
3e5d036 to
7c79c98
Compare
10 tasks
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
integration/2052-system-record-syncheadd11f10b9f9fdf9e4fc8d1ae8859385cfb9a3cc2e.prepareCandidateApplyphase: the lifecycle bridge finishes asynchronous preparation and returns authenticated monotonic timing plus an apply closure; the receiver rechecks cancellation and signed wall-clock freshness, clamps the deadline tomin(existingDeadline, monotonicNow + remainingMs), and synchronously invokes that closure exactly once.Related
integration/2052-system-record-syncatd11f10b9f9fdf9e4fc8d1ae8859385cfb9a3cc2e, including merged refactor(cli): split managed Oxigraph supervisor ownership #2201.Diagrams
Active profile verification and apply kernel
Before:
sequenceDiagram participant Coordinator participant Receiver participant Repository participant BundleVerifier participant Materializer Coordinator-->>Receiver: No callable active-row kernel Note over Receiver,Materializer: Repository, verifier, and materializer are not connectedAfter:
sequenceDiagram participant Coordinator participant Receiver participant Repository participant BundleVerifier participant CoreParser participant Materializer Coordinator->>Receiver: Already-admitted ordinary active row Receiver->>Repository: Snapshot and bind exact current head Receiver->>Receiver: Reject non-active or expired current head Receiver->>Repository: Resolve bounded authority closure and current bundle Receiver->>BundleVerifier: Accept exact current bundle once on a copy BundleVerifier-->>Receiver: Boolean acceptance Receiver->>CoreParser: Parse exact retained projection lines CoreParser-->>Receiver: Syntactically canonical storage-ready graphless quads Receiver->>Repository: Resolve and bind exact owned-subject table Receiver->>Materializer: Prepare verified candidate apply Materializer-->>Receiver: Existing deadline, fresh monotonic now, apply closure Receiver->>Receiver: Recheck cancellation and wall expiry; clamp deadline Receiver->>Materializer: Invoke apply once with clamped monotonic deadline Materializer-->>Receiver: Apply outcome Receiver-->>Coordinator: Preserve committed outcome after point of no returnThe receiver remains unregistered and default-unused in production lifecycle code.
Files changed
packages/agent/src/system-records/receiver-v1.tspackages/core/src/cg-shared-projection.tsparseCanonicalGraphlessProjectionStorageQuadsV1, a bounded syntactic canonical graphless parser whose explicit storage-quad type documents IRI normalization, literal lexical preservation, and the empty graph, with no authority, digest, count, seal, or schema proof; cg-shared verification consumes the same strict line walker.packages/agent/test/system-record-receiver-v1.test.tspackages/agent/test/support/agent-profile-receiver-v1-fixture.tspackages/core/test/cg-shared-projection.test.tsTest plan
pnpm --filter @origintrail-official/dkg-core run buildpnpm --filter @origintrail-official/dkg-storage run buildpnpm --filter @origintrail-official/dkg-agent run build(includes Agent type tests and package-root gate)pnpm --filter @origintrail-official/dkg-core run test:system-record-export(269 exact exports)test/system-record-objects-v1.test.ts(33 passed, 1 intentionally skipped)git diff --check