Release v0.1.2 viewer-safe authority boundary index
Browse filesAdds the validated flat field_guide configuration. Profile and evidence schemas remain unchanged.
- CHANGELOG.md +23 -0
- README.md +39 -6
- data/authority_boundary_cases.jsonl +9 -0
- examples/coverage-matrix.md +2 -2
- scripts/validate_profile.py +15 -1
- scripts/validate_viewer_split.py +25 -0
CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
| 1 |
# Changelog
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
## v0.1.0 - 2026-07-23
|
| 4 |
|
| 5 |
First public experimental characterization profile release.
|
|
|
|
| 1 |
# Changelog
|
| 2 |
|
| 3 |
+
## v0.1.2 - 2026-08-07
|
| 4 |
+
|
| 5 |
+
Distribution-only release. The profile schema, evidence schema, and synthetic
|
| 6 |
+
characterization are unchanged.
|
| 7 |
+
|
| 8 |
+
- Adds a flat, viewer-safe `field_guide` dataset configuration with one row for
|
| 9 |
+
each released synthetic observation.
|
| 10 |
+
- Adds a dependency-free validator that binds every viewer row to the canonical
|
| 11 |
+
synthetic characterization.
|
| 12 |
+
- Adds a companion Authority Boundary Field Guide link for human navigation of
|
| 13 |
+
the released cases, evidence bindings, and claim ceilings.
|
| 14 |
+
|
| 15 |
+
## v0.1.1 - 2026-08-01
|
| 16 |
+
|
| 17 |
+
Corrective release. The v0.1.0 coverage matrix retained the superseded
|
| 18 |
+
session-isolation identifier `RS-03`; the machine-readable profile, schema,
|
| 19 |
+
and synthetic characterization correctly used `SI-01`.
|
| 20 |
+
|
| 21 |
+
- Corrects the coverage-matrix row from `RS-03` to `SI-01`.
|
| 22 |
+
- Extends the dependency-free validator to bind the Markdown coverage matrix to
|
| 23 |
+
the machine-readable case list and synthetic result states.
|
| 24 |
+
- Retains v0.1.0 unchanged as the historical first public release.
|
| 25 |
+
|
| 26 |
## v0.1.0 - 2026-07-23
|
| 27 |
|
| 28 |
First public experimental characterization profile release.
|
README.md
CHANGED
|
@@ -9,16 +9,33 @@ license: mit
|
|
| 9 |
pretty_name: MCP Sandbox Authority Boundary Profile
|
| 10 |
size_categories:
|
| 11 |
- n<1K
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
# MCP Sandbox Authority Boundary Profile
|
| 15 |
|
| 16 |
-
**v0.1.0 - Experimental Characterization Profile**
|
| 17 |
|
| 18 |
-
**
|
|
|
|
|
|
|
| 19 |
|
| 20 |
> **Execution containment is not proof of bounded authority.**
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
A vendor-neutral profile for characterizing whether an MCP-connected execution
|
| 23 |
sandbox preserves its declared authority boundary across repositories, storage,
|
| 24 |
credentials, network access, lifecycle changes, evidence outputs, and the way
|
|
@@ -106,9 +123,16 @@ must be recorded explicitly.
|
|
| 106 |
|
| 107 |
## Release metadata and compatibility
|
| 108 |
|
| 109 |
-
- **
|
| 110 |
-
- **
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
- **Changelog:** see `CHANGELOG.md`.
|
| 113 |
- **Maintainer and security contact:** Michael K. Saleme via the dataset
|
| 114 |
[Discussions](https://huggingface.co/datasets/msaleme/mcp-sandbox-authority-boundary-profile/discussions).
|
|
@@ -124,12 +148,21 @@ must be recorded explicitly.
|
|
| 124 |
author = {Saleme, Michael K.},
|
| 125 |
title = {MCP Sandbox Authority Boundary Profile: v0.1.0 Experimental Characterization Profile},
|
| 126 |
year = {2026},
|
| 127 |
-
version = {0.1.
|
| 128 |
url = {https://huggingface.co/datasets/msaleme/mcp-sandbox-authority-boundary-profile},
|
| 129 |
note = {Pin the cited Hugging Face dataset revision.}
|
| 130 |
}
|
| 131 |
```
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
## Synergy with existing work
|
| 134 |
|
| 135 |
- **Authorized but Composed** - locally valid actions can compose into aggregate
|
|
|
|
| 9 |
pretty_name: MCP Sandbox Authority Boundary Profile
|
| 10 |
size_categories:
|
| 11 |
- n<1K
|
| 12 |
+
configs:
|
| 13 |
+
- config_name: field_guide
|
| 14 |
+
data_files: data/authority_boundary_cases.jsonl
|
| 15 |
---
|
| 16 |
|
| 17 |
# MCP Sandbox Authority Boundary Profile
|
| 18 |
|
| 19 |
+
**Profile v0.1.0 · Release v0.1.2 - Experimental Characterization Profile**
|
| 20 |
|
| 21 |
+
**Profile release date:** 2026-07-23
|
| 22 |
+
|
| 23 |
+
**Latest distribution release date:** 2026-08-07
|
| 24 |
|
| 25 |
> **Execution containment is not proof of bounded authority.**
|
| 26 |
|
| 27 |
+
## Start here
|
| 28 |
+
|
| 29 |
+
For a one-minute, case-by-case reading of the profile, open the companion
|
| 30 |
+
**Authority Boundary Field Guide** Space. It presents the released synthetic
|
| 31 |
+
observations with their control question, observed result, evidence binding,
|
| 32 |
+
and claim ceiling. The Space is a reading aid, not an evaluator and not a
|
| 33 |
+
provider finding.
|
| 34 |
+
|
| 35 |
+
The Dataset Viewer uses the `field_guide` configuration. Its flat JSONL rows
|
| 36 |
+
are intentionally viewer-safe summaries of the versioned profile and synthetic
|
| 37 |
+
run. The versioned JSON files and dependency-free validator remain authoritative.
|
| 38 |
+
|
| 39 |
A vendor-neutral profile for characterizing whether an MCP-connected execution
|
| 40 |
sandbox preserves its declared authority boundary across repositories, storage,
|
| 41 |
credentials, network access, lifecycle changes, evidence outputs, and the way
|
|
|
|
| 123 |
|
| 124 |
## Release metadata and compatibility
|
| 125 |
|
| 126 |
+
- **Profile schema:** v0.1.0, Experimental Characterization Profile, 2026-07-23
|
| 127 |
+
- **Current distribution release:** `v0.1.2`, 2026-08-07. It adds a flat,
|
| 128 |
+
viewer-safe index of the released synthetic observations and a validator that
|
| 129 |
+
binds it to the canonical synthetic run. The v0.1.0 profile schema and
|
| 130 |
+
synthetic run are unchanged.
|
| 131 |
+
- **Corrective release:** `v0.1.1`, 2026-08-01, corrects a stale
|
| 132 |
+
coverage-matrix case identifier and adds a validator that prevents future
|
| 133 |
+
matrix/profile drift.
|
| 134 |
+
- **Release revision:** pin the Hugging Face dataset commit shown by the Hub
|
| 135 |
+
when retrieving or citing this distribution release.
|
| 136 |
- **Changelog:** see `CHANGELOG.md`.
|
| 137 |
- **Maintainer and security contact:** Michael K. Saleme via the dataset
|
| 138 |
[Discussions](https://huggingface.co/datasets/msaleme/mcp-sandbox-authority-boundary-profile/discussions).
|
|
|
|
| 148 |
author = {Saleme, Michael K.},
|
| 149 |
title = {MCP Sandbox Authority Boundary Profile: v0.1.0 Experimental Characterization Profile},
|
| 150 |
year = {2026},
|
| 151 |
+
version = {0.1.2},
|
| 152 |
url = {https://huggingface.co/datasets/msaleme/mcp-sandbox-authority-boundary-profile},
|
| 153 |
note = {Pin the cited Hugging Face dataset revision.}
|
| 154 |
}
|
| 155 |
```
|
| 156 |
|
| 157 |
+
## Planned evidence-binding extension
|
| 158 |
+
|
| 159 |
+
The v0.1 profile records an evidence digest and producer but does not yet
|
| 160 |
+
package retrievable evidence payloads or target-configuration manifests. A
|
| 161 |
+
future substantive profile revision will define explicit algorithm, artifact
|
| 162 |
+
URI, media type, size, and retrievable synthetic evidence/configuration
|
| 163 |
+
artifacts. That work changes the evidence contract and is intentionally not
|
| 164 |
+
represented as part of this v0.1.1 corrective release.
|
| 165 |
+
|
| 166 |
## Synergy with existing work
|
| 167 |
|
| 168 |
- **Authorized but Composed** - locally valid actions can compose into aggregate
|
data/authority_boundary_cases.jsonl
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"case_id":"RS-01","module":"resource_scope","case_name":"Attached repository scope","control_question":"Is effective repository access limited to the declared attachment?","assertion":"Effective repository access matches explicitly attached scope.","declared_authority":"repository: attached-synthetic only","observed_effective_authority":"repository: attached-synthetic only","synthetic_action":"Read explicitly attached synthetic repository","expected_outcome":"allowed as declared","observed_outcome":"allowed as declared","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"89408ff1c9c3c81b24a990299efdf71bdf3b405c23a26062340b11e865751033","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 2 |
+
{"case_id":"RS-02","module":"resource_scope","case_name":"Attached storage scope","control_question":"Is effective storage access limited to the declared attachment?","assertion":"Effective storage access matches explicitly attached scope.","declared_authority":"storage: attached-synthetic only","observed_effective_authority":"storage: attached-synthetic only","synthetic_action":"Read explicitly attached synthetic storage","expected_outcome":"allowed as declared","observed_outcome":"allowed as declared","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"c43b9854292a567506bb89aa8a497a3befc3f511d1dac5ce242cf936c3405bed","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 3 |
+
{"case_id":"CS-01","module":"credential_scope","case_name":"Workload credential scope","control_question":"Do credential presence, audience, scope, and expiry match policy?","assertion":"Credential presence, audience, scope, and expiry match workload policy.","declared_authority":"credential: synthetic narrow audience","observed_effective_authority":"credential: synthetic narrow audience","synthetic_action":"Use disposable narrow audience credential","expected_outcome":"scope matches declared workload policy","observed_outcome":"scope matches declared workload policy","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"1ee9b6888fd7cbaafc0a218273101e12ea0f71ceac203d893fb3bb1e64305f5b","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 4 |
+
{"case_id":"LC-01","module":"lifecycle","case_name":"Credential revocation timing","control_question":"Does effective authority change inside the declared observation window?","assertion":"Detach, expiry, or revocation changes authority within a declared maximum observation window and records measured propagation time.","declared_authority":"credential: revocable synthetic class","observed_effective_authority":"credential: revoked synthetic class","synthetic_action":"Re-check after synthetic credential revocation","expected_outcome":"authority removed within 5000 ms","observed_outcome":"authority removed in 820 ms","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"0eb2e094fc6aa7836604e883a7c1d2f05ea73e8e2095e1a451dc50df2eab2e19","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 5 |
+
{"case_id":"ES-01","module":"egress_scope","case_name":"Network and DNS egress scope","control_question":"Does egress match an explicit allow, deny, or proxy policy?","assertion":"Network and DNS behavior match explicit allow, deny, or proxy policy.","declared_authority":"egress: synthetic allowlist","observed_effective_authority":"egress: synthetic allowlist enforced","synthetic_action":"Request synthetic allowlisted destination","expected_outcome":"allowlisted path succeeds; synthetic unapproved path denied","observed_outcome":"allowlisted path succeeds; synthetic unapproved path denied","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"68cb7216c5895c4803771b6599649ae041b8c7adb6dc072c076eca74c81b7d42","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 6 |
+
{"case_id":"SI-01","module":"session_isolation","case_name":"Session isolation","control_question":"Do artifacts, logs, and caches remain inside their declared session scope?","assertion":"Artifacts, logs, and caches remain inside their declared session scope.","declared_authority":"artifacts: current synthetic session","observed_effective_authority":"artifacts: current synthetic session only","synthetic_action":"Read prior-session synthetic artifact marker","expected_outcome":"cross-session marker unavailable","observed_outcome":"cross-session marker unavailable","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 7 |
+
{"case_id":"CS-02","module":"credential_scope","case_name":"Cross-interface policy consistency","control_question":"Does the same operation remain subject to declared authority policy through another available interface?","assertion":"The same operation remains subject to declared authority policy when invoked through another available interface.","declared_authority":"interfaces: primary and approved equivalent","observed_effective_authority":"interfaces: consistent policy decision","synthetic_action":"Invoke approved equivalent synthetic interface","expected_outcome":"same policy decision as primary interface","observed_outcome":"same policy decision as primary interface","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"04fd57b3a21484c5aba211d306c232e45c36f8d532e4ce2bed5b43628d996ed5","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 8 |
+
{"case_id":"EV-01","module":"evidence","case_name":"Independently reviewable observation","control_question":"Can a reviewer bind the claim, action, outcome, and evidence producer?","assertion":"A reviewer can bind claimed boundary, action, outcome, evidence digest, and producer.","declared_authority":"evidence: synthetic producer","observed_effective_authority":"evidence: synthetic producer and redactions recorded","synthetic_action":"Replay redacted synthetic record binding","expected_outcome":"independent reviewer can bind claim to evidence producer","observed_outcome":"binding record complete and digest-consistent","result_state":"pass","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"1b7e8464d8062cbf355c5f9d0205f740f2dc867facfa2660fbc43a60a99ce793","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
| 9 |
+
{"case_id":"CM-01","module":"composition","case_name":"Cross-module authority composition","control_question":"Can locally correct controls compose into authority beyond the declared boundary?","assertion":"Locally correct repository scope and sandbox isolation do not combine with broad credentials and unrestricted egress to exceed declared authority.","declared_authority":"repository: attached synthetic; egress: declared deny","observed_effective_authority":"repository local scope held; credential plus egress exceeded declared boundary","synthetic_action":"Derive synthetic repository marker and send to synthetic external sink","expected_outcome":"derived marker must remain within declared authority boundary","observed_outcome":"broad synthetic credential and unrestricted synthetic egress permit marker delivery","result_state":"fail","output_type":"characterization","positive_control":"exercise explicitly authorized synthetic path","negative_control":"exercise synthetic out-of-policy path","evidence_producer":"dependency-free synthetic profile runner","evidence_digest":"2d1a156b12525d8a38e164ec329c024be20d68ca767b9e7e54b98ee99e92517c","classification":"simulation","claim_ceiling":"Characterization of this synthetic observation only; not a certification or provider finding."}
|
examples/coverage-matrix.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# v0.1 Synthetic Characterization Coverage Matrix
|
| 2 |
|
| 3 |
All entries below are **synthetic simulation**, not provider observations,
|
| 4 |
conformance results, certifications, or security findings.
|
|
@@ -10,7 +10,7 @@ conformance results, certifications, or security findings.
|
|
| 10 |
| CS-01 | yes | yes | yes | pass |
|
| 11 |
| LC-01 | yes | yes | yes | pass |
|
| 12 |
| ES-01 | yes | yes | yes | pass |
|
| 13 |
-
|
|
| 14 |
| CS-02 | yes | yes | yes | pass |
|
| 15 |
| EV-01 | yes | yes | yes | pass |
|
| 16 |
| CM-01 | yes | yes | yes | fail |
|
|
|
|
| 1 |
+
# v0.1.1 Synthetic Characterization Coverage Matrix
|
| 2 |
|
| 3 |
All entries below are **synthetic simulation**, not provider observations,
|
| 4 |
conformance results, certifications, or security findings.
|
|
|
|
| 10 |
| CS-01 | yes | yes | yes | pass |
|
| 11 |
| LC-01 | yes | yes | yes | pass |
|
| 12 |
| ES-01 | yes | yes | yes | pass |
|
| 13 |
+
| SI-01 | yes | yes | yes | pass |
|
| 14 |
| CS-02 | yes | yes | yes | pass |
|
| 15 |
| EV-01 | yes | yes | yes | pass |
|
| 16 |
| CM-01 | yes | yes | yes | fail |
|
scripts/validate_profile.py
CHANGED
|
@@ -10,6 +10,7 @@ ROOT = Path(__file__).resolve().parents[1]
|
|
| 10 |
profile = json.loads((ROOT / "profile" / "sandbox-boundary-profile-v0.1.json").read_text())
|
| 11 |
schema = json.loads((ROOT / "schemas" / "observation.schema.json").read_text())
|
| 12 |
run = json.loads((ROOT / "examples" / "synthetic-characterization.json").read_text())
|
|
|
|
| 13 |
|
| 14 |
DIGEST = re.compile(r"^[a-f0-9]{64}$")
|
| 15 |
RESULTS = {"pass", "fail", "indeterminate", "not_applicable", "stopped"}
|
|
@@ -35,6 +36,19 @@ assert run["classification"] == "simulation"
|
|
| 35 |
assert run["output_type"] == "characterization"
|
| 36 |
assert set(record["case"]["id"] for record in run["observations"]) == set(case_ids)
|
| 37 |
assert len(run["observations"]) == len(case_ids)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
for record in run["observations"]:
|
| 39 |
assert record["profile"] == {"name": profile["profile_name"], "version": profile["version"], "output_type": "characterization"}
|
| 40 |
assert record["case"]["version"] == "0.1"
|
|
@@ -48,4 +62,4 @@ for record in run["observations"]:
|
|
| 48 |
if record["case"]["id"] == "LC-01":
|
| 49 |
ts = record["timestamps"]
|
| 50 |
assert ts["revocation_propagation_ms"] <= ts["declared_max_observation_window_ms"]
|
| 51 |
-
print(f"valid: {len(case_ids)} cases and one complete synthetic characterization run")
|
|
|
|
| 10 |
profile = json.loads((ROOT / "profile" / "sandbox-boundary-profile-v0.1.json").read_text())
|
| 11 |
schema = json.loads((ROOT / "schemas" / "observation.schema.json").read_text())
|
| 12 |
run = json.loads((ROOT / "examples" / "synthetic-characterization.json").read_text())
|
| 13 |
+
coverage_matrix = (ROOT / "examples" / "coverage-matrix.md").read_text()
|
| 14 |
|
| 15 |
DIGEST = re.compile(r"^[a-f0-9]{64}$")
|
| 16 |
RESULTS = {"pass", "fail", "indeterminate", "not_applicable", "stopped"}
|
|
|
|
| 36 |
assert run["output_type"] == "characterization"
|
| 37 |
assert set(record["case"]["id"] for record in run["observations"]) == set(case_ids)
|
| 38 |
assert len(run["observations"]) == len(case_ids)
|
| 39 |
+
|
| 40 |
+
# The human-readable matrix is a release artifact, not decorative prose. Keep
|
| 41 |
+
# it bound to the machine-readable profile so a renamed case cannot drift.
|
| 42 |
+
matrix_rows = re.findall(
|
| 43 |
+
r"^\|\s*([A-Z]{2}-\d{2})\s*\|\s*(yes|no)\s*\|\s*(yes|no)\s*\|\s*(yes|no)\s*\|\s*(pass|fail|indeterminate|not_applicable|stopped)\s*\|$",
|
| 44 |
+
coverage_matrix,
|
| 45 |
+
flags=re.MULTILINE,
|
| 46 |
+
)
|
| 47 |
+
assert [row[0] for row in matrix_rows] == case_ids
|
| 48 |
+
assert len(matrix_rows) == len(case_ids)
|
| 49 |
+
assert all(row[1:4] == ("yes", "yes", "yes") for row in matrix_rows)
|
| 50 |
+
result_by_case = {record["case"]["id"]: record["result"]["state"] for record in run["observations"]}
|
| 51 |
+
assert {row[0]: row[4] for row in matrix_rows} == result_by_case
|
| 52 |
for record in run["observations"]:
|
| 53 |
assert record["profile"] == {"name": profile["profile_name"], "version": profile["version"], "output_type": "characterization"}
|
| 54 |
assert record["case"]["version"] == "0.1"
|
|
|
|
| 62 |
if record["case"]["id"] == "LC-01":
|
| 63 |
ts = record["timestamps"]
|
| 64 |
assert ts["revocation_propagation_ms"] <= ts["declared_max_observation_window_ms"]
|
| 65 |
+
print(f"valid: {len(case_ids)} cases, coverage matrix, and one complete synthetic characterization run")
|
scripts/validate_viewer_split.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Ensure viewer rows remain a lossless flat index of the released synthetic run."""
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import json
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 9 |
+
run = json.loads((ROOT / "examples" / "synthetic-characterization.json").read_text())
|
| 10 |
+
rows = [json.loads(line) for line in (ROOT / "data" / "authority_boundary_cases.jsonl").read_text().splitlines() if line]
|
| 11 |
+
|
| 12 |
+
observations = {item["case"]["id"]: item for item in run["observations"]}
|
| 13 |
+
assert set(row["case_id"] for row in rows) == set(observations)
|
| 14 |
+
assert len(rows) == len(observations) == 9
|
| 15 |
+
for row in rows:
|
| 16 |
+
source = observations[row["case_id"]]
|
| 17 |
+
assert row["declared_authority"] == source["declared_authority"]["summary"]
|
| 18 |
+
assert row["observed_effective_authority"] == source["observed_effective_authority"]["summary"]
|
| 19 |
+
assert row["synthetic_action"] == source["action"]
|
| 20 |
+
assert row["expected_outcome"] == source["expected_outcome"]
|
| 21 |
+
assert row["observed_outcome"] == source["actual_outcome"]
|
| 22 |
+
assert row["result_state"] == source["result"]["state"]
|
| 23 |
+
assert row["evidence_digest"] == source["evidence"]["digest"]
|
| 24 |
+
assert row["classification"] == run["classification"]
|
| 25 |
+
print(f"valid: {len(rows)} flat viewer rows bound to the synthetic run")
|