Skip to content

Commit aaeed60

Browse files
committed
docs: document reference product golden path
1 parent 2a89a9a commit aaeed60

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
python-version: ${{ matrix.python-version }}
2323
- run: python -m pip install -e .
2424
- run: python -m unittest discover -s tests -v
25+
- run: python -m unittest discover -s tests -p test_reference_product.py -v
2526
- run: python -m cas_evals.cli benchmarks/v0.2/golden.json
2627
- run: python -m cas_evals.cli benchmarks/v0.2/adversarial.json
2728
- run: python -m cas_evals.release --check

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ The CLI exits non-zero when any mandatory metric fails, making each suite usable
2222

2323
Windows users can run the complete verification path with `.\scripts\verify.ps1`. The checked-in [v0.2 benchmark report](docs/benchmark-report-v0.2.md) and [`releases/v0.2.0/`](releases/v0.2.0/) artifacts record the reproducible public baseline.
2424

25+
## Reference Product Golden Path
26+
27+
The default CLI remains fully offline. To evaluate actual output from a running
28+
local `cas-reference-product` workflow:
29+
30+
```powershell
31+
python -m cas_evals.cli benchmarks/reference-product/v0.1/golden.json --reference-product-url
32+
python -m cas_evals.cli benchmarks/reference-product/v0.1/adversarial.json --reference-product-url
33+
```
34+
35+
The opt-in adapter preserves lifecycle metadata, fails closed on metadata drift,
36+
scores the returned workflow output, and persists deterministic evidence with
37+
normalized timing. See [the reference-product integration guide](docs/reference-product-integration.md).
38+
2539
## Metrics
2640

2741
| Metric | v0.1 evidence | Gate |
@@ -43,6 +57,7 @@ See [`schemas/evaluation-suite.schema.json`](schemas/evaluation-suite.schema.jso
4357

4458
```text
4559
benchmarks/v0.2/ Representative golden and adversarial fixtures
60+
benchmarks/reference-product/ Opt-in local workflow integration fixtures
4661
releases/v0.2.0/ Reproducible benchmark release artifacts
4762
schemas/ Machine-readable suite evidence contract
4863
vendor/cas-contracts/ Pinned published shared contracts
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# CAS Reference Product Integration
2+
3+
CAS Evals includes an opt-in deterministic adapter for the local
4+
`cas-reference-product` `POST /api/v1/workflows` endpoint. The existing offline
5+
evaluator remains the default and never requires a service, network access, or
6+
secrets.
7+
8+
## Run The Golden Path
9+
10+
Start `cas-reference-product` in local mode from its own repository:
11+
12+
```powershell
13+
.\scripts\run-local.ps1
14+
```
15+
16+
Then run both reference-product corpora from `cas-evals`:
17+
18+
```powershell
19+
python -m cas_evals.cli benchmarks/reference-product/v0.1/golden.json `
20+
--reference-product-url `
21+
--output artifacts/reference-product-golden.json
22+
23+
python -m cas_evals.cli benchmarks/reference-product/v0.1/adversarial.json `
24+
--reference-product-url `
25+
--output artifacts/reference-product-adversarial.json
26+
```
27+
28+
Pass an explicit URL after `--reference-product-url` when the endpoint is not
29+
`http://127.0.0.1:8080/api/v1/workflows`.
30+
31+
## Evidence Guarantees
32+
33+
For every case, the adapter:
34+
35+
- creates deterministic `correlationId`, `promptId`, `runId`, and W3C trace context;
36+
- requires every returned lifecycle event to preserve those values;
37+
- evaluates the actual returned `output`, not the fixture's reference response;
38+
- records the source fixture digest and returned-output digest;
39+
- removes server timestamps and endpoint-specific addresses from persisted evidence;
40+
- uses fixture-observed normalized latency so identical service output produces byte-identical evidence.
41+
42+
The adapter fails closed for unavailable endpoints, invalid JSON, oversized
43+
responses, empty outputs, invalid response shapes, or lifecycle metadata drift.
44+
The HTTP timeout controls transport behavior but is not written into evidence.
45+
46+
## CI Boundary
47+
48+
CI runs the adapter contract against a local deterministic HTTP server. This
49+
proves the executable HTTP path on Windows and Linux without coupling the
50+
offline repository to another checkout or a hosted service. The full sibling
51+
repository golden path is an explicit local integration check.

0 commit comments

Comments
 (0)