Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ not always match the Git tags; section versions follow the tags.

## [Unreleased]

### Added

- `integrity-lineage-models`: a `ComputationRegistration` can record when it ran
and which OpenTelemetry span it was, through `ComputationStatement::create_with_span`
and `ComputationSpan`. `startTime` and `endTime` are when the work began and ended,
separate from the registration `timestamp`. `span` and `parentSpan` identify the
computation's span and the span it ran inside, as `urn:uuid` version 5 UUIDs of
`"{traceId}/{spanId}"` in `OTEL_SPAN_NAMESPACE` (`otel_span_urn`,
`ComputationSpan::from_otel`). A computation names its parent rather than its
children, so each one can be registered as soon as its own span ends, on any node;
the nesting is read back by matching each `parentSpan` to a `span`.
- `integrity-jsonld`: the computation context
(`urn:cid:bafkr4iduavib2lgjcmx5n4ydefbbc62ngyannzi566zv5fsozgbwwfw27u`,
`ig_computation_context_link`), which extends the common context with those
four terms. Only statements that use them reference it; every other
`ComputationRegistration` keeps the common context and its CID.

## [0.0.19] - 2026-10-16

### Added
Expand Down
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions integrity-jsonld/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ pub fn ig_common_context_link() -> String {
format!("urn:cid:{cid}").trim_end().to_owned()
}

/// Returns the computation context link as a CID URN.
///
/// This context extends the IG common context with the `startTime`, `endTime`,
/// `span` and `parentSpan` terms of a `ComputationRegistration`. Statements that
/// use none of those terms keep the common context, so their CIDs are unchanged.
///
/// # Returns
/// URN string in format `urn:cid:{cid}` for the computation context.
pub fn ig_computation_context_link() -> String {
let cid: &'static str = "bafkr4iduavib2lgjcmx5n4ydefbbc62ngyannzi566zv5fsozgbwwfw27u";

format!("urn:cid:{cid}")
}

/// Computes RDFC CID for JSON-LD data.
///
/// Converts JSON-LD to N-Quads, canonicalizes using URDNA2015, and computes a CID.
Expand Down
4 changes: 2 additions & 2 deletions integrity-jsonld/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ mod tests {
.keys()
.filter(|k| k.starts_with("urn:cid:"))
.count(),
25,
"expected all 25 urn:cid: contexts to be embedded"
26,
"expected all 26 urn:cid: contexts to be embedded"
);

// A representative CID context (also returned by `ig_common_context_link`).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"@context": [
"urn:cid:bafkr4icploa577ziqnb57jlpoj7l2hi5kgt3knxpdtunlttjd3q33zeqpy",
{
"@protected": true,

"startTime": {
"@id": "https://eqtylab.io/terms/startTime",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},

"endTime": {
"@id": "https://eqtylab.io/terms/endTime",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},

"span": {
"@id": "https://eqtylab.io/terms/span",
"@type": "@id"
},

"parentSpan": {
"@id": "https://eqtylab.io/terms/parentSpan",
"@type": "@id"
}
}
]
}
1 change: 1 addition & 0 deletions integrity-lineage-models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ serde_jcs = "0.2.0"
serde_json = "1.0"
ssi = { version = "0.16", default-features = false, features = ["w3c", "ed25519", "secp256k1", "secp256r1"] }
utoipa = { version = "3", features = ["axum_extras", "openapi_extensions"] }
uuid = { version = "1.4", features = ["v5"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
blake3 = "1.5"
Expand Down
Loading
Loading