From 47249d1ab0982e6422ed0b4f7dcb866426b00d8a Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Sun, 26 Apr 2026 13:24:14 -0400 Subject: [PATCH 1/2] feat(spec): add CompressionEvaluation example --- examples/compressionevaluation.json | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 examples/compressionevaluation.json diff --git a/examples/compressionevaluation.json b/examples/compressionevaluation.json new file mode 100644 index 0000000..eb51bcb --- /dev/null +++ b/examples/compressionevaluation.json @@ -0,0 +1,53 @@ +{ + "id": "urn:srcos:compression-eval:ce_0001", + "type": "CompressionEvaluation", + "specVersion": "2.0.0", + "artifact": { + "contentRef": { + "digest": "sha256:artifact_example_digest", + "sizeBytes": 2048, + "mediaType": "application/json", + "uris": ["file:///var/lib/srcos/artifacts/ce_0001.json"] + } + }, + "baseline": { + "dataRef": { + "refType": "dataset", + "id": "urn:srcos:dataset:health_obs" + } + }, + "purpose": "promotion-review", + "estimatorSet": { + "name": "compression-commons-basic", + "version": "0.1.0", + "family": "compression", + "params": { + "window": 4096, + "normalization": "token" + } + }, + "metrics": { + "novelty": 0.82, + "redundancy": 0.14, + "supportingMetrics": { + "support": 0.73, + "stability": 0.91 + }, + "confidence": 0.88, + "warnings": [], + "normalizationVersion": "0.1.0" + }, + "policyDecisionRef": "urn:srcos:decision:aa11bb22", + "runRecordRef": "urn:srcos:run:77cc88dd", + "provenanceRef": "urn:srcos:prov:001", + "truthSurfaceRef": "urn:srcos:truth-surface:ts_0001", + "deltaSurfaceRef": "urn:srcos:delta-surface:ds_0001", + "integrity": { + "evaluationHash": "sha256:evaluation_example_digest", + "signer": "sourceos-compression-evaluator", + "signature": "sig:example_signature", + "signedAt": "2026-04-25T16:00:00Z" + }, + "notes": "Example CompressionEvaluation composed from existing governance, execution, provenance, and reference objects.", + "createdAt": "2026-04-25T16:00:00Z" +} From 9dfca47e8f507e6ad21f22505487806d2a6301c1 Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Sun, 26 Apr 2026 13:24:58 -0400 Subject: [PATCH 2/2] feat(spec): add CompressionEvaluation schema --- schemas/CompressionEvaluation.json | 107 +++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 schemas/CompressionEvaluation.json diff --git a/schemas/CompressionEvaluation.json b/schemas/CompressionEvaluation.json new file mode 100644 index 0000000..0bb8927 --- /dev/null +++ b/schemas/CompressionEvaluation.json @@ -0,0 +1,107 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://schemas.srcos.ai/v2/CompressionEvaluation.json", + "title": "CompressionEvaluation", + "description": "Immutable artifact-versus-baseline evaluation record.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "type", + "specVersion", + "artifact", + "baseline", + "estimatorSet", + "metrics", + "createdAt" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^urn:srcos:compression-eval:", + "description": "Stable URN identifier." + }, + "type": { + "const": "CompressionEvaluation", + "description": "Discriminator constant." + }, + "specVersion": { + "type": "string", + "description": "Spec version string." + }, + "artifact": { + "type": "object", + "description": "Artifact under evaluation.", + "additionalProperties": false, + "properties": { + "contentRef": { "$ref": "ContentRef.json" }, + "dataRef": { "$ref": "DataRef.json" } + }, + "anyOf": [ + { "required": ["contentRef"] }, + { "required": ["dataRef"] } + ] + }, + "baseline": { + "type": "object", + "description": "Baseline used for comparison.", + "additionalProperties": false, + "properties": { + "contentRef": { "$ref": "ContentRef.json" }, + "dataRef": { "$ref": "DataRef.json" } + }, + "anyOf": [ + { "required": ["contentRef"] }, + { "required": ["dataRef"] } + ] + }, + "purpose": { + "type": ["string", "null"], + "description": "Optional declared evaluation purpose." + }, + "estimatorSet": { + "type": "object", + "description": "Versioned estimator configuration.", + "additionalProperties": false, + "required": ["name", "version"], + "properties": { + "name": { "type": "string", "description": "Estimator name." }, + "version": { "type": "string", "description": "Estimator version." }, + "family": { "type": ["string", "null"], "description": "Optional family label." }, + "params": { "type": "object", "additionalProperties": true, "description": "Replayable estimator parameters." } + } + }, + "metrics": { + "type": "object", + "description": "Evaluation outputs.", + "additionalProperties": false, + "required": ["novelty", "redundancy"], + "properties": { + "novelty": { "type": "number", "description": "Primary novelty signal." }, + "redundancy": { "type": "number", "description": "Primary redundancy signal." }, + "confidence": { "type": ["number", "null"], "description": "Optional confidence score." }, + "warnings": { "type": "array", "items": { "type": "string" }, "description": "Optional warnings." } + } + }, + "policyDecisionRef": { + "type": ["string", "null"], + "pattern": "^urn:srcos:decision:", + "description": "Optional policy decision reference." + }, + "runRecordRef": { + "type": ["string", "null"], + "pattern": "^urn:srcos:run:", + "description": "Optional evaluator run reference." + }, + "provenanceRef": { + "type": ["string", "null"], + "pattern": "^urn:srcos:prov:", + "description": "Optional provenance reference." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + } + } +}