Add TGK/1 spec and align TGK references
This commit is contained in:
parent
063a1835b9
commit
950a601fbe
|
|
@ -1,3 +1,5 @@
|
||||||
|
NOTE: Superseded by `tier1/tgk-1.md` (TGK/1). Kept for historical context.
|
||||||
|
|
||||||
Absolutely — here’s a **draft for ENC-ASL-TGK-INDEX**, carefully merging ASL artifact indexes and TGK edge indexes while respecting the **separation of concerns** and **snapshot determinism**.
|
Absolutely — here’s a **draft for ENC-ASL-TGK-INDEX**, carefully merging ASL artifact indexes and TGK edge indexes while respecting the **separation of concerns** and **snapshot determinism**.
|
||||||
|
|
||||||
This design keeps **ENC-ASL-CORE** and **ENC-TGK-CORE** authoritative, and only merges **index references and acceleration structures**.
|
This design keeps **ENC-ASL-CORE** and **ENC-TGK-CORE** authoritative, and only merges **index references and acceleration structures**.
|
||||||
|
|
@ -220,4 +222,3 @@ This design supports billions of references while avoiding semantic collisions b
|
||||||
If you want, the next step could be **drafting a unified query execution model** over this merged index, connecting **artifact lookups** and **TGK graph traversals** in a snapshot-safe, deterministic way.
|
If you want, the next step could be **drafting a unified query execution model** over this merged index, connecting **artifact lookups** and **TGK graph traversals** in a snapshot-safe, deterministic way.
|
||||||
|
|
||||||
Do you want me to do that next?
|
Do you want me to do that next?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
NOTE: Superseded by `tier1/tgk-1.md` (TGK/1). Kept for historical context.
|
||||||
|
|
||||||
Below is a **formal draft of TGK-INDEX**, written to **exactly mirror the ASL-INDEX-ACCEL framework** and to cleanly integrate TGK into the overall model without inventing new semantics.
|
Below is a **formal draft of TGK-INDEX**, written to **exactly mirror the ASL-INDEX-ACCEL framework** and to cleanly integrate TGK into the overall model without inventing new semantics.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -273,4 +275,3 @@ If you want, the next logical step would be to:
|
||||||
|
|
||||||
* Draft **ENC-TGK-INDEX** (exact on-disk encoding)
|
* Draft **ENC-TGK-INDEX** (exact on-disk encoding)
|
||||||
* Or write a **unified query model** spanning ASL + TGK lookups
|
* Or write a **unified query model** spanning ASL + TGK lookups
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
NOTE: Integrated into `tier1/asl-system-1.md`. This note is retained for
|
||||||
|
historical context and may drift.
|
||||||
|
|
||||||
## 1. Introduction
|
## 1. Introduction
|
||||||
|
|
||||||
This document specifies a unified system for deterministic, federated, snapshot-safe storage and execution of artifacts, execution receipts (PERs), and TGK edges. The system integrates:
|
This document specifies a unified system for deterministic, federated, snapshot-safe storage and execution of artifacts, execution receipts (PERs), and TGK edges. The system integrates:
|
||||||
|
|
@ -213,4 +216,3 @@ This unified system specification ensures:
|
||||||
* **Integration of PER artifacts with TGK edges**
|
* **Integration of PER artifacts with TGK edges**
|
||||||
* **Provenance and auditability at scale**
|
* **Provenance and auditability at scale**
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
NOTE: Superseded by `tier1/tgk-1.md` (TGK/1). Kept for historical context.
|
||||||
|
|
||||||
# ENC-TGK-INDEX
|
# ENC-TGK-INDEX
|
||||||
|
|
||||||
### Encoding Specification for TGK Edge Index References
|
### Encoding Specification for TGK Edge Index References
|
||||||
|
|
@ -201,4 +203,3 @@ ENC-TGK-INDEX:
|
||||||
|
|
||||||
This design **fully respects layering** and **prevents accidental semantic duplication**, while allowing scalable, high-performance indexing.
|
This design **fully respects layering** and **prevents accidental semantic duplication**, while allowing scalable, high-performance indexing.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ Tags: [deterministic, index, semantics]
|
||||||
* `ENC-ASL-CORE-INDEX` — bytes-on-disk encoding profile (`tier1/enc-asl-core-index.md`)
|
* `ENC-ASL-CORE-INDEX` — bytes-on-disk encoding profile (`tier1/enc-asl-core-index.md`)
|
||||||
* `ASL/INDEX-ACCEL/1` — acceleration semantics (routing, filters, sharding)
|
* `ASL/INDEX-ACCEL/1` — acceleration semantics (routing, filters, sharding)
|
||||||
* `ASL/LOG/1` — append-only semantic log (segment visibility)
|
* `ASL/LOG/1` — append-only semantic log (segment visibility)
|
||||||
|
* `TGK/1` — TGK edge visibility and traversal alignment
|
||||||
|
* `ASL/SYSTEM/1` — unified system view (PEL/TGK/federation alignment)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,10 @@ Tags: [deterministic, log, snapshot]
|
||||||
**Informative references:**
|
**Informative references:**
|
||||||
|
|
||||||
* `ASL/1-CORE-INDEX` — index semantics
|
* `ASL/1-CORE-INDEX` — index semantics
|
||||||
|
* `TGK/1` — TGK edge visibility and traversal alignment
|
||||||
* `ENC-ASL-LOG` — bytes-on-disk encoding profile (if defined)
|
* `ENC-ASL-LOG` — bytes-on-disk encoding profile (if defined)
|
||||||
* `ENC-ASL-CORE-INDEX` — index segment encoding (`tier1/enc-asl-core-index.md`)
|
* `ENC-ASL-CORE-INDEX` — index segment encoding (`tier1/enc-asl-core-index.md`)
|
||||||
|
* `ASL/SYSTEM/1` — unified system view (PEL/TGK/federation alignment)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@ It specifies:
|
||||||
|
|
||||||
It **does not define encoding** (see ENC-ASL-CORE-INDEX at `tier1/enc-asl-core-index.md`) or semantic mapping (see ASL/1-CORE-INDEX).
|
It **does not define encoding** (see ENC-ASL-CORE-INDEX at `tier1/enc-asl-core-index.md`) or semantic mapping (see ASL/1-CORE-INDEX).
|
||||||
|
|
||||||
|
**Informative references:**
|
||||||
|
|
||||||
|
* `ASL/SYSTEM/1` — unified system view (PEL/TGK/federation alignment)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2. Scope
|
## 2. Scope
|
||||||
|
|
|
||||||
158
tier1/asl-system-1.md
Normal file
158
tier1/asl-system-1.md
Normal file
|
|
@ -0,0 +1,158 @@
|
||||||
|
# ASL/SYSTEM/1 — Unified ASL + TGK + PEL System View
|
||||||
|
|
||||||
|
Status: Draft
|
||||||
|
Owner: Architecture
|
||||||
|
Version: 0.1.0
|
||||||
|
SoT: No
|
||||||
|
Last Updated: 2025-01-17
|
||||||
|
Tags: [deterministic, federation, pel, tgk, index]
|
||||||
|
|
||||||
|
**Document ID:** `ASL/SYSTEM/1`
|
||||||
|
**Layer:** L2 — Cross-cutting system view (no new encodings)
|
||||||
|
|
||||||
|
**Depends on (normative):**
|
||||||
|
|
||||||
|
* `ASL/1-CORE`
|
||||||
|
* `ASL/1-CORE-INDEX`
|
||||||
|
* `ASL-STORE-INDEX`
|
||||||
|
* `ASL/LOG/1`
|
||||||
|
* `ENC-ASL-CORE-INDEX`
|
||||||
|
|
||||||
|
**Informative references:**
|
||||||
|
|
||||||
|
* `ASL/INDEX-ACCEL/1`
|
||||||
|
* `TGK/1` — Trace Graph Kernel semantics
|
||||||
|
* PEL draft specs (program DAG, execution receipts)
|
||||||
|
* Federation and domain policy drafts
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. Conventions
|
||||||
|
|
||||||
|
The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHOULD**, and **MAY** are
|
||||||
|
to be interpreted as in RFC 2119.
|
||||||
|
|
||||||
|
ASL/SYSTEM/1 is an integration view. It does not define new encodings or
|
||||||
|
storage formats; those remain in the underlying layer specs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Purpose & Scope
|
||||||
|
|
||||||
|
This document aligns the cross-cutting semantics of:
|
||||||
|
|
||||||
|
* ASL index and log behavior
|
||||||
|
* PEL deterministic execution
|
||||||
|
* TGK edge semantics and traversal
|
||||||
|
* Federation visibility and replay
|
||||||
|
|
||||||
|
It ensures a single, consistent model for determinism, snapshot bounds, and
|
||||||
|
domain visibility.
|
||||||
|
|
||||||
|
Non-goals:
|
||||||
|
|
||||||
|
* New on-disk encodings
|
||||||
|
* New execution operators
|
||||||
|
* Domain policy or governance rules
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Core Objects (Unified View)
|
||||||
|
|
||||||
|
* **Artifact**: immutable byte value (ASL/1-CORE).
|
||||||
|
* **PER**: PEL Execution Receipt stored as an artifact.
|
||||||
|
* **TGK Edge**: immutable edge record linking artifacts and/or PERs.
|
||||||
|
* **Snapshot + Log Prefix**: boundary for deterministic visibility and replay.
|
||||||
|
* **Domain Visibility**: internal vs published visibility embedded in index
|
||||||
|
records (ENC-ASL-CORE-INDEX).
|
||||||
|
|
||||||
|
All of these objects are addressed and stored via the same index semantics.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Determinism & Snapshot Boundaries
|
||||||
|
|
||||||
|
For a fixed `(SnapshotID, LogPrefix)`:
|
||||||
|
|
||||||
|
* Index lookup is deterministic (ASL/1-CORE-INDEX).
|
||||||
|
* TGK traversal is deterministic when bounded by the same snapshot/log prefix.
|
||||||
|
* PEL execution is deterministic when its inputs are bounded by the same
|
||||||
|
snapshot/log prefix.
|
||||||
|
|
||||||
|
PEL MUST read only snapshot-scoped artifacts and receipts. It MUST NOT depend
|
||||||
|
on storage layout, block packing, or non-snapshot metadata.
|
||||||
|
|
||||||
|
PEL outputs (artifacts and PERs) become visible only through normal index
|
||||||
|
admission and log ordering.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. One PEL Principle (Resolution)
|
||||||
|
|
||||||
|
There is exactly one PEL: a deterministic, snapshot-bound, authority-aware
|
||||||
|
derivation language mapping artifacts to artifacts.
|
||||||
|
|
||||||
|
Distinctions such as "PEL-S" vs "PEL-P" are not separate languages. They are
|
||||||
|
policy decisions about how outputs are treated:
|
||||||
|
|
||||||
|
* **Promotion** (truth vs view) is a domain policy decision.
|
||||||
|
* **Publication** (internal vs published) is a visibility decision encoded in
|
||||||
|
index metadata.
|
||||||
|
* **Retention** (store, cache, discard, recompute) is a store policy decision.
|
||||||
|
|
||||||
|
Implementations MUST NOT fork PEL semantics into separate dialects. Any
|
||||||
|
classification of outputs MUST be expressed via policy, publication flags, or
|
||||||
|
receipt annotations, not by changing the execution language.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. PEL, PERs, and TGK Integration
|
||||||
|
|
||||||
|
* PEL programs consume artifacts and/or PERs.
|
||||||
|
* PEL execution produces artifacts and a PER describing the run.
|
||||||
|
* TGK edges may reference artifacts, PERs, or projections derived from them.
|
||||||
|
|
||||||
|
TGK remains a semantic graph layer; it does not alter PEL determinism and does
|
||||||
|
not bypass the index.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Federation Alignment
|
||||||
|
|
||||||
|
Federation operates over the same immutable artifacts, PERs, and TGK edges.
|
||||||
|
Cross-domain visibility is governed by index metadata:
|
||||||
|
|
||||||
|
* `domain_id` identifies the owning domain.
|
||||||
|
* `visibility` marks internal vs published.
|
||||||
|
* `cross_domain_source` preserves provenance for imported artifacts.
|
||||||
|
|
||||||
|
Deterministic replay across nodes MUST respect:
|
||||||
|
|
||||||
|
* Snapshot boundaries
|
||||||
|
* Log order
|
||||||
|
* Domain visibility rules
|
||||||
|
|
||||||
|
Federation does not change PEL semantics. It propagates artifacts and receipts
|
||||||
|
that were already deterministically produced.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Index Alignment
|
||||||
|
|
||||||
|
The index is the shared substrate:
|
||||||
|
|
||||||
|
* Artifacts, PERs, and TGK edges are all indexed via the same lookup semantics.
|
||||||
|
* Sharding, SIMD, and filters (ASL/INDEX-ACCEL/1) are advisory and MUST NOT
|
||||||
|
change correctness.
|
||||||
|
* Tombstones and shadowing remain the only visibility overrides.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Summary
|
||||||
|
|
||||||
|
ASL/SYSTEM/1 provides a single, consistent view:
|
||||||
|
|
||||||
|
* One PEL, with policy-based output treatment
|
||||||
|
* TGK and PEL both bounded by snapshot + log determinism
|
||||||
|
* Federation mediated by index-level domain metadata
|
||||||
|
* Index semantics remain the core substrate for all objects
|
||||||
134
tier1/tgk-1.md
Normal file
134
tier1/tgk-1.md
Normal file
|
|
@ -0,0 +1,134 @@
|
||||||
|
# TGK/1 — Trace Graph Kernel Semantics
|
||||||
|
|
||||||
|
Status: Draft
|
||||||
|
Owner: Architecture
|
||||||
|
Version: 0.1.0
|
||||||
|
SoT: No
|
||||||
|
Last Updated: 2025-11-30
|
||||||
|
Tags: [tgk, determinism, index, federation]
|
||||||
|
|
||||||
|
**Document ID:** `TGK/1`
|
||||||
|
**Layer:** L1 — Semantic graph layer over ASL artifacts and PERs (no encodings)
|
||||||
|
|
||||||
|
**Depends on (normative):**
|
||||||
|
|
||||||
|
* `ASL/1-CORE`
|
||||||
|
* `ASL/1-CORE-INDEX`
|
||||||
|
* `ASL/LOG/1`
|
||||||
|
* `ASL/SYSTEM/1`
|
||||||
|
|
||||||
|
**Informative references:**
|
||||||
|
|
||||||
|
* `ENC-TGK1-EDGE` (core edge encoding, if present)
|
||||||
|
* `ENC-TGK-INDEX` (index encoding draft)
|
||||||
|
* `ASL/INDEX-ACCEL/1`
|
||||||
|
* `ENC-ASL-CORE-INDEX`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. Conventions
|
||||||
|
|
||||||
|
The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHOULD**, and **MAY** are to be interpreted as in RFC 2119.
|
||||||
|
|
||||||
|
TGK/1 defines semantic meaning only. It does not define storage formats, on-disk encodings, or execution operators.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Purpose & Scope
|
||||||
|
|
||||||
|
TGK/1 defines the **semantic layer** for Trace Graph Kernel (TGK) edges that relate ASL artifacts and PERs.
|
||||||
|
It keeps TGK thin and deterministic by reusing ASL index and log semantics.
|
||||||
|
|
||||||
|
Non-goals:
|
||||||
|
|
||||||
|
* New encodings for edges or indexes
|
||||||
|
* Query operators or execution plans
|
||||||
|
* Federation protocols or transport
|
||||||
|
* Re-definition of ASL or PEL semantics
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. TGK Objects
|
||||||
|
|
||||||
|
### 2.1 TGK Edge
|
||||||
|
|
||||||
|
A TGK Edge is an **immutable record** representing a directed relationship between ASL artifacts and/or PERs.
|
||||||
|
TGK edges are semantic overlays and **MUST NOT** redefine or bypass ASL identity.
|
||||||
|
TGK/1-CORE defines the EdgeBody structure with ordered `from`/`to` lists; TGK/1
|
||||||
|
does not further constrain cardinality.
|
||||||
|
|
||||||
|
### 2.2 Canonical Edge Key
|
||||||
|
|
||||||
|
Each TGK edge has a **Canonical Edge Key** that uniquely identifies it.
|
||||||
|
The Canonical Edge Key MUST be derived from the logical `EdgeBody` defined in
|
||||||
|
`TGK/1-CORE`, preserving list order and multiplicity:
|
||||||
|
|
||||||
|
* `from`: ordered list of source node identifiers (MAY be empty)
|
||||||
|
* `to`: ordered list of destination node identifiers (MAY be empty)
|
||||||
|
* `payload`: reference carried by the edge
|
||||||
|
* `type`: edge type identifier
|
||||||
|
* Projection context (for example, PER or execution identity) when not already
|
||||||
|
captured by the edge payload or type profile
|
||||||
|
|
||||||
|
Classification attributes (edge type keys, labels) **MUST NOT** affect canonical identity.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Index and Visibility (Normative)
|
||||||
|
|
||||||
|
TGK edges are **indexed objects** and inherit visibility from the ASL index and log:
|
||||||
|
|
||||||
|
1. A TGK edge becomes visible only when its index record is admitted by a sealed segment and log order (ASL/LOG/1).
|
||||||
|
2. TGK traversal and lookup **MUST NOT** bypass index visibility or log ordering.
|
||||||
|
3. For a fixed `{Snapshot, LogPrefix}`, TGK edge lookup and shadowing **MUST** be deterministic (ASL/1-CORE-INDEX).
|
||||||
|
4. Tombstones and shadowing semantics follow ASL/1-CORE-INDEX and ASL/LOG/1 replay order.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Deterministic Traversal (Normative)
|
||||||
|
|
||||||
|
TGK traversal operates over a snapshot/log-bounded view:
|
||||||
|
|
||||||
|
* Inputs: `{Snapshot, LogPrefix}` and a seed set (nodes or edges).
|
||||||
|
* Outputs: only edges visible under the same `{Snapshot, LogPrefix}`.
|
||||||
|
* Traversal **MUST** be deterministic and replay-compatible with ASL/LOG/1.
|
||||||
|
|
||||||
|
Deterministic ordering for traversal output MUST be:
|
||||||
|
|
||||||
|
1. `logseq` ascending
|
||||||
|
2. Canonical Edge Key as tie-break
|
||||||
|
|
||||||
|
Acceleration structures MAY be used but MUST NOT change semantics.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Federation Alignment (Normative)
|
||||||
|
|
||||||
|
Federation does not change TGK semantics. It only propagates edges and artifacts that are already visible under index rules.
|
||||||
|
|
||||||
|
* Domain visibility and publication status are enforced via index metadata (ENC-ASL-CORE-INDEX).
|
||||||
|
* TGK edges keep canonical identity across domains.
|
||||||
|
* Cross-domain propagation MUST preserve snapshot/log determinism.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Non-Goals
|
||||||
|
|
||||||
|
TGK/1 does not define:
|
||||||
|
|
||||||
|
* Edge encoding or storage layout
|
||||||
|
* Index segment formats
|
||||||
|
* Query languages or execution plans
|
||||||
|
* Acceleration rules beyond ASL/INDEX-ACCEL/1
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Normative Invariants
|
||||||
|
|
||||||
|
Conforming implementations MUST enforce:
|
||||||
|
|
||||||
|
1. TGK edges are immutable and indexed objects.
|
||||||
|
2. No TGK visibility without index admission and log ordering.
|
||||||
|
3. Traversal is snapshot/log bounded and deterministic.
|
||||||
|
4. Federation does not alter TGK semantics; it only propagates visible edges.
|
||||||
|
5. Edge classification is not part of canonical identity.
|
||||||
Loading…
Reference in a new issue