Skip to content

Commit c4cb850

Browse files
frawarecursoragent
andcommitted
PCS bench producer contract for qc_release reproducibility.
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 122ebfa commit c4cb850

36 files changed

Lines changed: 1781 additions & 147 deletions

.github/workflows/pcs.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
- "examples/pcs_qc_release/**"
1212
- "tests/pcs/**"
1313
- "docs/pcs*.md"
14+
- "docs/pcs-bench-producer-contract.md"
15+
- "scripts/sync_pcs_bench_labtrust_suite.py"
16+
- "scripts/publish_pcs_bench_fixtures.py"
17+
- "tests/fixtures/pcs_bench_reproducibility/**"
18+
- "examples/pcs_qc_release/scripts/ci_validate_pcs_producer_contract.py"
1419
- "docs/pcs-workflow-implementation-guide.md"
1520
- "docs/pcs-reference-implementation.md"
1621
- "policy/schemas/pcs/RegenerationReport.v0.schema.json"
@@ -37,6 +42,11 @@ on:
3742
- "examples/pcs_qc_release/**"
3843
- "tests/pcs/**"
3944
- "docs/pcs*.md"
45+
- "docs/pcs-bench-producer-contract.md"
46+
- "scripts/sync_pcs_bench_labtrust_suite.py"
47+
- "scripts/publish_pcs_bench_fixtures.py"
48+
- "tests/fixtures/pcs_bench_reproducibility/**"
49+
- "examples/pcs_qc_release/scripts/ci_validate_pcs_producer_contract.py"
4050
- "docs/pcs-workflow-implementation-guide.md"
4151
- "docs/pcs-reference-implementation.md"
4252
- "policy/schemas/pcs/RegenerationReport.v0.schema.json"
@@ -66,16 +76,21 @@ jobs:
6676
with:
6777
repository: SentinelOps-CI/pcs-core
6878
path: pcs-core
79+
- uses: actions/checkout@v4
80+
with:
81+
repository: SentinelOps-CI/pcs-bench
82+
path: pcs-bench
6983
- name: Apply LabTrust RuntimeReceipt profile to pcs-core schemas
7084
run: |
7185
cp policy/schemas/pcs/runtime_receipt.v0.schema.json \
7286
pcs-core/schemas/RuntimeReceipt.v0.schema.json
7387
- uses: actions/setup-python@v5
7488
with:
7589
python-version: "3.11"
76-
- name: Install pcs-core and LabTrust-Gym
90+
- name: Install pcs-core, pcs-bench, and LabTrust-Gym
7791
run: |
7892
pip install -e "pcs-core/python"
93+
pip install -e "pcs-bench"
7994
pip install -e ".[dev,pcs]"
8095
- name: PCS tests
8196
run: python -m pytest tests/pcs -q
@@ -138,6 +153,17 @@ jobs:
138153
run: python examples/pcs_qc_release/scripts/ci_validate_benchmark_ingest_golden.py
139154
- name: Offline pcs-bench ingest fixture (producer gate)
140155
run: python examples/pcs_qc_release/scripts/ci_validate_pcs_bench_ingest_fixture.py
156+
- name: Materialize offline pcs-bench producer fixtures
157+
run: python scripts/generate_pcs_bench_ingest_fixture.py
158+
- name: LabTrust producer contract (fixture + pcs-bench validate-ingest)
159+
run: |
160+
python examples/pcs_qc_release/scripts/ci_validate_pcs_producer_contract.py
161+
labtrust validate-pcs-producer \
162+
--dir tests/fixtures/pcs_bench_reproducibility \
163+
--pcs-core pcs-core
164+
pcs-bench validate-ingest \
165+
--input tests/fixtures/pcs_bench_reproducibility/pcs_bench_ingest.v0.json \
166+
--pcs-core pcs-core
141167
- name: Benchmark packet fixtures
142168
run: python examples/pcs_qc_release/scripts/generate_benchmark_packet.py
143169
- name: Verify LabTrust release protocol package

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ _tmp_repro2/
136136
_tmp_repro_*/
137137
_tmp_suite_test/
138138
benchmark_runs/
139+
!tests/fixtures/pcs_bench_reproducibility/artifact_refs/benchmark_runs/
140+
!tests/fixtures/pcs_bench_reproducibility/artifact_refs/benchmark_runs/**
139141
reports/
140142

141143
# OS

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# make verify: full verification battery (lint, typecheck, policy, tests, risk-register gate, docs).
44
# make paper OUT=<dir>: package-release paper_v0.1 then verify-release (requires OUT= output dir).
55

6-
.PHONY: test golden bench-smoke lint format typecheck policy-validate no-placeholders e2e-artifacts-chain verification-battery verify paper pcs-bench-producer
6+
.PHONY: test golden bench-smoke lint format typecheck policy-validate no-placeholders e2e-artifacts-chain verification-battery verify paper pcs-bench-producer pcs-bench-sync-suite pcs-fixtures pcs-bench-publish-fixtures
77

88
# Default: run fast test suite (no env optional deps for golden/policy)
99
test:
@@ -65,3 +65,22 @@ BENCH_RUN_DIR ?= benchmark_runs/labtrust_reproducibility
6565

6666
pcs-bench-producer:
6767
python scripts/pcs_bench_producer.py
68+
69+
PCS_BENCH_OUT ?= ../pcs-bench/benchmarks/labtrust_qc_release
70+
71+
pcs-bench-sync-suite:
72+
python scripts/sync_pcs_bench_labtrust_suite.py --pcs-bench-out $(PCS_BENCH_OUT)
73+
74+
pcs-fixtures:
75+
python scripts/generate_pcs_bench_ingest_fixture.py
76+
77+
pcs-bench-publish-fixtures:
78+
python scripts/publish_pcs_bench_fixtures.py --pcs-bench $(PCS_BENCH)
79+
80+
pcs-verify: pcs-fixtures
81+
python examples/pcs_qc_release/scripts/ci_validate_pcs_bench_ingest_fixture.py
82+
python examples/pcs_qc_release/scripts/ci_validate_pcs_producer_contract.py
83+
@if [ -d "$(PCS_CORE)" ]; then \
84+
labtrust validate-pcs-producer --dir tests/fixtures/pcs_bench_reproducibility --pcs-core $(PCS_CORE); \
85+
pcs-bench validate-ingest --input tests/fixtures/pcs_bench_reproducibility/pcs_bench_ingest.v0.json --pcs-core $(PCS_CORE); \
86+
fi

docs/contracts/cli_contract.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ This document defines the contract for all LabTrust-Gym CLI commands: exit codes
7373
| regenerate-release-chain | alias for `regenerate-release-protocol` | 0 | same as above | examples/pcs_qc_release/RUNBOOK.md |
7474
| generate-failure-gallery | `--workflow <id\|property_id>`; `--out <dir>`; optional `--release-dir`; `--workflow-profile` | 0 | Per-case `failure_case_manifest.json`, `README.md`, `artifacts/`, legacy `expected_failure.json` / `repair_hint.json` | examples/pcs_qc_release/failures/ |
7575
| generate-benchmark-cases | `--workflow <id\|property_id>`; `--out <dir>`; `--seed` (default 42); optional `--release-dir`, `--workflow-profile`; `--pcs-bench-layout`; `--suite-fixture-root`; `--validate-pcs-core-output <pcs-core>`; `--pcs-core-registry <path>` | 0 | Flat: `benchmark_index.json` + per-case dirs. pcs-bench: `suite.yaml`, `benchmark_manifest.v0.json`, `valid/`, `invalid/`, `coverage_report.v0.json` | docs/labtrust-benchmark-profile.md |
76-
| benchmark-reproducibility | `--workflow` (default hospital_lab.qc_release; aliases e.g. `qc-release` resolve to canonical `hospital_lab.qc_release`); `--out <dir>`; `--runs` (default 5); `--seed`; `--mode full_regeneration` (default) or `hash_stability`; optional `--pcs-core`, `--release-dir`, `--certifyedge-bin`, `--validate-pcs-core-output <pcs-core>`; `--release-grade` / `--no-release-grade` (default: release when mode is `full_regeneration`) | 0 | `benchmark_run.v0.json`, `coverage_report.v0.json`, `benchmark_manifest.v0.json` (`evidence_grade`, `certifyedge_live`, `pcs_core_validation`), `benchmark_report.v0.json`, `regeneration_reports/`, `hash_stability_report.v0.json`, `pcs_bench_ingest.v0.json` (embedded runs + `artifact_refs` for all sidecars) | docs/pcs-benchmark-producer.md |
76+
| benchmark-reproducibility | `--workflow` (default hospital_lab.qc_release; aliases e.g. `qc-release` resolve to canonical `hospital_lab.qc_release`); `--out <dir>`; `--runs` (default 5); `--seed`; `--mode full_regeneration` (default) or `hash_stability`; optional `--pcs-core`, `--release-dir`, `--certifyedge-bin`, `--validate-pcs-core-output <pcs-core>`; `--release-grade` / `--no-release-grade` (default: release when mode is `full_regeneration`) | 0 | `benchmark_run.v0.json`, `coverage_report.v0.json`, `benchmark_manifest.v0.json` (`evidence_grade`, `certifyedge_live`, `pcs_core_validation`, `canonical_hashes_stable`), `benchmark_report.v0.json`, `regeneration_reports/`, `hash_stability_report.v0.json`, `pcs_bench_ingest.v0.json` (embedded runs + `artifact_refs` for all sidecars) | docs/pcs-bench-producer-contract.md |
77+
| validate-pcs-producer | `--dir <reproducibility-out>`; `--pcs-core` (required) | 0 | Validates ingest contract, pcs-core schemas, on-disk sidecar digests, release-grade manifest when applicable | docs/pcs-bench-producer-contract.md |
7778
| verify-benchmark-cases | `--benchmark-dir <dir>`; optional `--pcs-core` (auto-detect); `--validate-pcs-core-output <pcs-core>`; `--json` | 0 | (stderr OK labels) | docs/labtrust-benchmark-profile.md |
7879

7980
**PCS CI scripts (not `labtrust` subcommands):** `run_pcs_ci_local.{sh,ps1}` runs `pytest tests/pcs`, `ci_validate_workflow_profile.py`, `ci_validate_formalization.py`, export/release validation, `check-status-policy`, failure gallery generate/verify, and optional `verify-release-protocol` (matches `.github/workflows/pcs.yml`). `materialize_workflow_profile.py` refreshes `workflow_profile.v0.json` digest. `materialize_formalization_artifacts.py` rebuilds formalization JSON from an existing `release/` tree. `generate_golden.py` regenerates `expected/` in deterministic mode.

docs/labtrust-benchmark-profile.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,11 @@ unavailable (`examples/pcs_qc_release/scripts/ci_benchmark_reproducibility.py`).
151151
1. `labtrust generate-benchmark-cases --pcs-bench-layout` emits `suite.yaml`, `benchmark_manifest.v0.json`, `valid/`, `invalid/`, and `coverage_report.v0.json`.
152152
2. Each case uses `input_artifacts.release_directory` = `input_artifacts/` (flat) or pcs-core fixture paths after layout patch.
153153
3. Valid cases use pcs-core null failure fields; invalid cases ship `expected_failure.json` and repair hints.
154-
4. `labtrust benchmark-reproducibility --mode full_regeneration` (default) writes `benchmark_run.v0.json`, `coverage_report.v0.json`, `hash_stability_report.v0.json`, `regeneration_reports/`, `pcs_bench_ingest.v0.json`, and `benchmark_manifest.v0.json`.
155-
5. `--validate-pcs-core-output ../pcs-core` validates `BenchmarkRun.v0`, `CoverageReport.v0`, and `PcsBenchIngest.v0` (and `BenchmarkReport.v0` when present).
156-
6. Generated cases validate against pcs-core when a checkout is provided.
157-
7. pcs-bench ingests `pcs_bench_ingest.v0.json` from reproducibility runs directly.
154+
4. `make pcs-bench-producer` runs `full_regeneration` (five runs, live CertifyEdge) and `pcs-bench validate-ingest --release-grade`.
155+
5. `pcs_bench_ingest.v0.json` embeds pcs-core runs/coverage and lists all reproducibility sidecars in `artifact_refs` (see [pcs-bench-producer-contract.md](pcs-bench-producer-contract.md)).
156+
6. `--validate-pcs-core-output ../pcs-core` validates nested pcs-core schemas; LabTrust checks sidecar digests on disk.
157+
7. `make pcs-bench-sync-suite` refreshes `../pcs-bench/benchmarks/labtrust_qc_release`.
158+
8. pcs-bench producer gate consumes `benchmark_runs/labtrust_reproducibility/pcs_bench_ingest.v0.json` without fixture fallback when the producer target succeeds.
158159

159160
## pcs-bench integration
160161

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# LabTrust PCS bench producer contract
2+
3+
LabTrust-Gym is the reference scientific workflow producer for the hospital lab QC
4+
release benchmark. It emits a canonical `pcs_bench_ingest.v0.json` aligned with
5+
[pcs-core](https://github.com/SentinelOps-CI/pcs-core) `PcsBenchIngest.v0` and
6+
consumable by [pcs-bench](https://github.com/SentinelOps-CI/pcs-bench) without
7+
fixture fallback.
8+
9+
## Canonical workflow identity
10+
11+
All PCS exports use:
12+
13+
```text
14+
workflow_id = hospital_lab.qc_release
15+
```
16+
17+
CLI aliases (`qc_release`, `qc-release`, `labtrust_qc_release`, `hospital_lab_qc_release`,
18+
`labtrust.qc_release_v0.1`) resolve to this property id before any artifact is written.
19+
20+
## Release-grade producer target
21+
22+
```bash
23+
make pcs-bench-producer
24+
```
25+
26+
This runs:
27+
28+
1. `labtrust benchmark-reproducibility` with `full_regeneration`, five runs, live
29+
CertifyEdge, pcs-core validation, and release-grade gates.
30+
2. `pcs-bench validate-ingest --release-grade` on the canonical ingest path.
31+
32+
Environment:
33+
34+
| Variable | Default |
35+
|----------|---------|
36+
| `PCS_CORE` | `../pcs-core` |
37+
| `PCS_BENCH` | `../pcs-bench` |
38+
| `BENCH_RUN_DIR` | `benchmark_runs/labtrust_reproducibility` |
39+
40+
Manual equivalent:
41+
42+
```bash
43+
labtrust benchmark-reproducibility \
44+
--workflow hospital_lab.qc_release \
45+
--mode full_regeneration \
46+
--pcs-core ../pcs-core \
47+
--certifyedge-bin certifyedge \
48+
--runs 5 \
49+
--out benchmark_runs/labtrust_reproducibility \
50+
--validate-pcs-core-output ../pcs-core \
51+
--release-grade
52+
53+
pcs-bench validate-ingest \
54+
--input benchmark_runs/labtrust_reproducibility/pcs_bench_ingest.v0.json \
55+
--pcs-core ../pcs-core \
56+
--release-grade
57+
```
58+
59+
## Release-grade semantics
60+
61+
A producer output is **release-grade** only when:
62+
63+
| Gate | Requirement |
64+
|------|-------------|
65+
| Mode | `full_regeneration` |
66+
| Runs | `>= 5` |
67+
| CertifyEdge | `certifyedge_call_success_rate == 1.0` |
68+
| Per run | `release_protocol_validation_passed`, `status_policy_validation_passed`, `pcs_core_validation_passed` |
69+
| Stability | `canonical_hashes_stable` and `release_validation_stable` (from `hash_stability_report.v0.json` when `full_regeneration` runs hash-stability copies) |
70+
| Commit | Real 40-character git `source_commit` (not all zeros) |
71+
| Embedded objects | Non-empty `benchmark_runs`, non-empty `coverage_reports`, non-empty `commands` |
72+
| Validation | pcs-core schema + `pcs-bench validate-ingest --release-grade` |
73+
74+
`benchmark_manifest.v0.json` records release evidence:
75+
76+
```json
77+
{
78+
"evidence_grade": "release",
79+
"mode": "full_regeneration",
80+
"runs": 5,
81+
"certifyedge_live": true,
82+
"pcs_core_validation": true,
83+
"canonical_hashes_stable": true
84+
}
85+
```
86+
87+
## Emitted artifacts
88+
89+
Under `benchmark_runs/labtrust_reproducibility/`:
90+
91+
| File | Schema / role |
92+
|------|----------------|
93+
| `pcs_bench_ingest.v0.json` | pcs-core `PcsBenchIngest.v0` (embedded runs + coverage + `artifact_refs`) |
94+
| `benchmark_run.v0.json` | LabTrust aggregate reproducibility summary |
95+
| `coverage_report.v0.json` | LabTrust reproducibility coverage |
96+
| `benchmark_report.v0.json` | pcs-core `BenchmarkReport.v0` |
97+
| `benchmark_manifest.v0.json` | `ReproducibilityBenchmarkManifest.v0` |
98+
| `hash_stability_report.v0.json` | `HashStabilityReport.v0` |
99+
| `regeneration_reports/*.json` | `RegenerationReport.v0` per run |
100+
| `artifact_refs/benchmark_runs/*.v0.json` | pcs-core run sidecars |
101+
| `artifact_refs/coverage_reports/*.v0.json` | pcs-core coverage sidecar |
102+
| `runs/run_*` | Regenerated release protocol trees |
103+
104+
### Ingest `artifact_refs`
105+
106+
Embedded pcs-core objects each have a matching sidecar under `artifact_refs/`.
107+
LabTrust reproducibility sidecars are also listed in ingest `artifact_refs`:
108+
109+
| Path | `artifact_type` | `role` |
110+
|------|-----------------|--------|
111+
| `benchmark_run.v0.json` | `LabtrustBenchmarkRunSummary.v0` | `reproducibility_evidence` |
112+
| `coverage_report.v0.json` | `LabtrustReproducibilityCoverage.v0` | `producer_export` |
113+
| `benchmark_report.v0.json` | `BenchmarkReport.v0` | `native_report` |
114+
| `benchmark_manifest.v0.json` | `ReproducibilityBenchmarkManifest.v0` | `producer_export` |
115+
| `hash_stability_report.v0.json` | `HashStabilityReport.v0` | `reproducibility_evidence` |
116+
| `regeneration_reports/*.json` | `RegenerationReport.v0` | `regeneration_report` |
117+
| `pcs_bench_ingest.v0.json` | `PcsBenchIngest.v0` | `canonical_ingest` |
118+
119+
Extended refs are provenance only; pcs-core `BenchmarkRun.v0` and `CoverageReport.v0`
120+
remain embedded in the ingest body.
121+
122+
## pcs-bench consumption
123+
124+
pcs-bench producer gate resolves:
125+
126+
```text
127+
benchmark_runs/labtrust_reproducibility/pcs_bench_ingest.v0.json
128+
```
129+
130+
`pcs-bench validate-ingest` checks:
131+
132+
1. pcs-core `PcsBenchIngest.v0` schema (pcs-core-compatible `artifact_refs` only).
133+
2. Semantic rules (commit, embedded arrays, digest alignment for embedded types).
134+
3. Release-grade adequacy (non-empty runs, real commit, sidecar files on disk).
135+
4. Nested `BenchmarkRun.v0` / `CoverageReport.v0` schemas.
136+
137+
Normalized output feeds the cross-producer gate without using the offline fixture
138+
when the producer target succeeds.
139+
140+
## Refresh LabTrust pcs-bench fixture suite
141+
142+
```bash
143+
make pcs-bench-sync-suite
144+
```
145+
146+
Equivalent manual flow:
147+
148+
```bash
149+
labtrust generate-benchmark-cases \
150+
--workflow hospital_lab.qc_release \
151+
--out ../pcs-bench/benchmarks/labtrust_qc_release \
152+
--pcs-bench-layout \
153+
--seed 42 \
154+
--validate-pcs-core-output ../pcs-core
155+
156+
cd ../pcs-bench
157+
pcs-bench validate-cases --suite labtrust-qc-release --pcs-core ../pcs-core
158+
```
159+
160+
Produces `suite.yaml`, `valid/`, `invalid/`, `benchmark_manifest.v0.json`, and
161+
`coverage_report.v0.json` under the pcs-bench benchmarks tree.
162+
163+
## Offline CI fixture
164+
165+
`tests/fixtures/pcs_bench_reproducibility/` is a full developer-grade producer tree
166+
(ingest, sidecars under `artifact_refs/`, manifest, reports). Regenerate and publish:
167+
168+
```bash
169+
make pcs-fixtures
170+
make pcs-verify # regenerate + validate fixture + pcs-bench validate-ingest
171+
make pcs-bench-publish-fixtures # copies into ../pcs-bench/tests/fixtures and runs/
172+
```
173+
174+
The committed tree is sidecar-only (no `runs/` scratch); ingest `commands` use repo-relative `--out` paths.
175+
176+
Legacy single-file mirror: `tests/fixtures/pcs_bench_ingest/labtrust/pcs_bench_ingest.v0.json`.
177+
178+
See also [pcs-benchmark-producer.md](pcs-benchmark-producer.md) for command tables
179+
and CI script references.

docs/pcs-benchmark-producer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ LabTrust is the reference producer for the hospital lab QC release PCS benchmark
44
machine-readable outputs align with pcs-core v0 schemas and normalize into
55
`PcsBenchIngest.v0` for pcs-bench.
66

7+
See [pcs-bench-producer-contract.md](pcs-bench-producer-contract.md) for the full
8+
producer contract, release-grade gates, artifact ref roles, and pcs-bench gate paths.
9+
710
## Producer surfaces
811

912
| Command | Output |

examples/pcs_qc_release/scripts/ci_validate_pcs_bench_ingest_fixture.py

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,46 @@
1212

1313
from labtrust_gym.pcs.bench_schemas import (
1414
resolve_pcs_core_schema_root,
15-
validate_producer_ingest_contract,
15+
validate_pcs_core_reproducibility_outputs,
1616
)
1717

18-
FIXTURE = ROOT / "tests" / "fixtures" / "pcs_bench_ingest" / "labtrust" / "pcs_bench_ingest.v0.json"
18+
FIXTURE_TREE = ROOT / "tests" / "fixtures" / "pcs_bench_reproducibility"
19+
LEGACY_INGEST = ROOT / "tests" / "fixtures" / "pcs_bench_ingest" / "labtrust" / "pcs_bench_ingest.v0.json"
1920

2021

2122
def main() -> int:
22-
if not FIXTURE.is_file():
23-
print(f"FAIL missing fixture: {FIXTURE}", file=sys.stderr)
23+
tree = FIXTURE_TREE if (FIXTURE_TREE / "pcs_bench_ingest.v0.json").is_file() else None
24+
if tree is None and not LEGACY_INGEST.is_file():
25+
print(
26+
"FAIL missing fixture: run python scripts/generate_pcs_bench_ingest_fixture.py",
27+
file=sys.stderr,
28+
)
2429
return 1
2530

26-
doc = json.loads(FIXTURE.read_text(encoding="utf-8"))
2731
pcs_core = resolve_pcs_core_schema_root(ROOT.parent / "pcs-core")
28-
checks = validate_producer_ingest_contract(
29-
doc,
30-
ingest_path=FIXTURE,
31-
policy_root=ROOT,
32-
pcs_core_root=pcs_core,
33-
)
34-
for label in checks:
35-
print(f" OK {label}")
36-
print(f"pcs-bench ingest fixture OK ({FIXTURE.relative_to(ROOT)})")
32+
if tree is not None:
33+
if pcs_core is None:
34+
print("FAIL pcs-core required for fixture tree validation", file=sys.stderr)
35+
return 1
36+
checks = validate_pcs_core_reproducibility_outputs(
37+
tree, pcs_core_root=pcs_core, policy_root=ROOT
38+
)
39+
for label in checks:
40+
print(f" OK {label}")
41+
print(f"pcs-bench reproducibility fixture OK ({tree.relative_to(ROOT)})")
42+
elif LEGACY_INGEST.is_file() and pcs_core is not None:
43+
from labtrust_gym.pcs.bench_schemas import validate_producer_ingest_contract
44+
45+
doc = json.loads(LEGACY_INGEST.read_text(encoding="utf-8"))
46+
checks = validate_producer_ingest_contract(
47+
doc,
48+
ingest_path=LEGACY_INGEST,
49+
policy_root=ROOT,
50+
pcs_core_root=pcs_core,
51+
)
52+
for label in checks:
53+
print(f" OK {label}")
54+
print(f"legacy ingest fixture OK ({LEGACY_INGEST.relative_to(ROOT)})")
3755
return 0
3856

3957

0 commit comments

Comments
 (0)