Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Referral demo runs, with offline Seals

The compiled OpenEMR referral program on the landing page's four referrals,
run on 19 October 2026 on a private copy of the pinned OpenEMR fixture. All
patients are synthetic. No model was called.

| Referral | Patient | Run | Outcome in the report | Read-back |
|---|---|---|---|---|
| 1 | Nadia Brennan | `referral-1-r1-nadia-brennan/engine` | `COMPLETED_UNVERIFIED`, every record check confirmed | 1 new chart, 12 of 12 fields |
| 2 | Marcus Feld | `referral-2-r2-marcus-feld/engine` | `COMPLETED_UNVERIFIED`, every record check confirmed | 1 new chart, 12 of 12 fields |
| 3 | Ines Carvalho | `referral-3-r3-ines-carvalho/engine` | `COMPLETED_UNVERIFIED`, every record check confirmed | 1 new chart, 12 of 12 fields |
| 4 | Rosa Delgado, 1958-03-22 (possible duplicate of the seeded chart born 1958-03-27) | `referral-4-r6-rosa-delgado/engine` | `HALTED` at the duplicate check (`step_039`: "No matches were found." not shown) before saving; transaction outcome `RECONCILIATION_REQUIRED` | no new chart |

- **What ran.** The #1269 harness's own run (`benchmark/openemr_api_tier/feature_e2e.run_one`, engine 93c32e9f), with API steps off (the screen program). The engine's record check reads OpenEMR's REST API through the fixture's read-only oracle client. The runs use no named execution profile, so a confirmed run is recorded as `COMPLETED_UNVERIFIED`, not `VERIFIED`. `VERIFIED` needs the standard profile, whose gate refuses this bundle today.
- **Referral 4 is not `HALTED_BEFORE_EFFECT`.** Nothing was saved, but steps whose risk was never reviewed keep the engine from proving that, so it records `RECONCILIATION_REQUIRED` (see #1331).
- **Seals.** Each `seal.json` is an **offline Seal, signed by this machine's key** (`openadapt.local-seal/v1`, key `seal-ed25519-accd03a9246d29bb`). It covers the exact bytes of the `report.json` beside it and copies that report's outcome; it never upgrades it. It is not an OpenAdapt Cloud Seal. A statement signed by the machine that ran the work is weaker evidence than an independent party's.
- **Referral 4 has a report and its offline Seal, and no receipt.** The local receipt is written only for a `VERIFIED` run.

Verify any run against the pinned public key in `seal-key.json`:

```bash
openadapt-flow local-seal verify referral-1-r1-nadia-brennan/engine --keys seal-key.json
```

It prints `valid offline Seal over report.json, key seal-ed25519-accd03a9246d29bb`. A changed report prints `not valid: subject_mismatch`.

`summary.json` lists each run's outcome, read-back and Seal digest. `result.json` beside each run is the harness's own SQL read-back. Screenshots are not kept. The script is `scoreboard/seals_referral_demo.py`.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"algorithm": "ed25519",
"issued_at": "2026-10-20T01:11:03Z",
"issuer": "local",
"key_id": "seal-ed25519-accd03a9246d29bb",
"outcome": "COMPLETED_UNVERIFIED",
"public_key": "JpfLXYLyY0CVqHz4tHY8eTyC9e7ggpoxLPq6ITgDeHU=",
"run_id": "engine",
"schema": "openadapt.local-seal/v1",
"signature": "LMkyYwygJaPBVzaTIrd4ZO2jE3TSu8YO5ODn+wSIUvsCv5/eV4tdS4Bl9FaoWAeYkuSWKcsfsQH76XDH9IVRDw==",
"subject_kind": "run-report",
"subject_sha256": "be376829e0e3e8276423a8a7f6f151a45f85aab12476226c70faabe73067cf8d"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"arm": "browser",
"ref": "r1-nadia-brennan",
"mismatch": false,
"error": null,
"engine_success": true,
"outcome": "COMPLETED_UNVERIFIED",
"transaction_outcome": "COMPLETED_UNVERIFIED",
"actuation": "dom",
"api_fallback": "API steps are off for this run",
"steps": 41,
"step_errors": [],
"new_charts": 1,
"readback": "12/12",
"correct": true,
"field_check": [
{
"field": "title",
"want": "Ms.",
"got": "Ms.",
"match": true
},
{
"field": "fname",
"want": "Nadia",
"got": "Nadia",
"match": true
},
{
"field": "lname",
"want": "Brennan",
"got": "Brennan",
"match": true
},
{
"field": "DOB",
"want": "1971-04-19",
"got": "1971-04-19",
"match": true
},
{
"field": "sex",
"want": "Female",
"got": "Female",
"match": true
},
{
"field": "street",
"want": "27 WILLOW BEND ROAD",
"got": "27 WILLOW BEND ROAD",
"match": true
},
{
"field": "city",
"want": "EXAMPLETON",
"got": "EXAMPLETON",
"match": true
},
{
"field": "state",
"want": "MA",
"got": "MA",
"match": true
},
{
"field": "postal_code",
"want": "02139",
"got": "02139",
"match": true
},
{
"field": "phone_home",
"want": "555-0121",
"got": "555-0121",
"match": true
},
{
"field": "email",
"want": "nadia.brennan@example.invalid",
"got": "nadia.brennan@example.invalid",
"match": true
},
{
"field": "country_code",
"want": "USA",
"got": "USA",
"match": true
}
],
"wall_s": 24.978,
"setup_s": 1.734,
"engine_s": 21.733,
"readback_s": 1.512
}
Loading
Loading