2.9 KiB
ASL/FEDERATION-REPLAY/1 -- Cross-Node Deterministic Replay
Status: Draft Owner: Architecture Version: 0.1.0 SoT: No Last Updated: 2025-01-17 Tags: [federation, replay, determinism, tgk, pel]
Document ID: ASL/FEDERATION-REPLAY/1
Layer: L2 -- Federation replay semantics (no transport)
Depends on (normative):
ASL/FEDERATION/1ASL/LOG/1ASL/1-CORE-INDEXTGK/1
Informative references:
ASL/SYSTEM/1-- unified system viewENC-ASL-CORE-INDEX-- domain metadata
0. Conventions
The key words MUST, MUST NOT, REQUIRED, SHOULD, and MAY are to be interpreted as in RFC 2119.
ASL/FEDERATION-REPLAY/1 defines deterministic replay rules for federated propagation. It does not define network protocols or encodings.
1. Purpose
This document defines how artifacts, PERs, and TGK edges are propagated and replayed across federation nodes while preserving deterministic reconstruction.
2. Core Inputs
- ArtifactKey: canonical identifier for artifacts and PERs
- SnapshotID: snapshot boundary for replay
- logseq: append-only ordering within a domain
- Canonical Edge Key: TGK edge identity
3. Propagation Rules
3.1 Artifacts and PERs
- Artifacts and PERs are propagated with their
ArtifactKeyandlogseq. - Only artifacts visible under a published snapshot MAY be propagated.
- Duplicate ArtifactKeys MUST be de-duplicated by identity.
3.2 TGK Edges
- TGK edges are propagated with their canonical edge identity and
logseq. - Edge propagation MUST preserve the same snapshot/log visibility constraints as artifacts.
4. Deterministic Replay Ordering
Replay order MUST be deterministic across nodes:
- Sort by
logseqascending - Tie-break by canonical identity (ArtifactKey or Canonical Edge Key)
This ordering MUST be applied identically by all receivers.
5. Snapshot Bounds
- Replay MUST be bounded by
{SnapshotID, LogPrefix}. - Records with
logseqgreater than the replay prefix MUST be ignored.
6. Conflict Handling
-
ArtifactKey collision
- If bytes match existing artifact: discard duplicate.
- If bytes differ: reject and flag conflict.
-
TGK edge conflicts
- Multiple edges with the same canonical identity are resolved by log order and tombstone rules.
-
PER conflicts
- PERs with identical inputs and program identity but divergent outputs MUST be rejected.
7. Provenance and Audit
Receivers SHOULD maintain:
- Last applied
logseqper peer - Snapshot provenance tables for applied records
This supports deterministic audit and replay verification.
8. Non-Goals
- Transport protocol selection
- Streaming formats
- Compression or batching
9. Summary
ASL/FEDERATION-REPLAY/1 defines a deterministic replay ordering and conflict rules to ensure federation is reproducible across nodes and snapshots.