Skip to content
Open
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
11 changes: 9 additions & 2 deletions CAPABILITIES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ safe_agent = openadapt.wrap(your_agent, wal=WriteAheadSagaLog("session.wal"))

### Try It in 30 Seconds

Run the quickstart against a bundled demo app (no account or API key required). It shows a task once, runs the compiled program and checks the save in the app's database, then stops the runner partway through a batch and restarts it: the restart skips the note that was already saved and saves only the next one.
Run the quickstart against a bundled demo app (no account or API key required). A script records a task in a demo clinic app, OpenAdapt compiles it into a program, and the program runs three ways. A normal save is VERIFIED after OpenAdapt checks the screen and reopens the record. A save to a faulty server, which drops the note but reports success, is STOPPED for a person to check. In a batch whose runner is killed after note 1 and restarted, note 1 is skipped and each note is saved once.

```bash
uvx --python 3.12 openadapt@latest quickstart
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| Check each quickstart save the way a person would: on MockMed the program is compiled from a copy of the demonstration with no database snapshots, certified under the shipped `screen-write` policy (record-write without the idempotency-key rule; the run's at-most-once ledger holds off repeated saves), and run with the on-screen read-back as its only verifier. A run is VERIFIED only when the screen after the save shows the form closed and no error, and the reopened record shows every typed value under its label. A second run on an app that drops the note but still says it saved stops at the reopened record (0 of 1 typed values), is not marked done, and is left for a person; nothing reads the app's database | PR [#2883](https://github.com/OpenAdaptAI/OpenAdapt/pull/2883) | Synthetic (MockMed; real headless runs on macOS, unit tests with fakes and a plain-output snapshot) | `openadapt quickstart`; [screen_check.py](openadapt/quickstart/screen_check.py), [screen-write.yaml](packages/flow/openadapt_flow/policies/screen-write.yaml) |
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| See a crash and a restart in the quickstart: on MockMed, Act 3 runs a batch of two new notes in a separate worker process, stops it with SIGKILL after note 1's save is checked, and restarts the batch with the same on-disk write ledger (`IdempotencyLedger`); the replayer finds note 1's key and sends no save for it (its report: idempotent replay, 0 actions), then saves note 2; each note's database is read afterwards. Each note has its own copy of the clinic's database, as in Act 2 | On main ([#2840](https://github.com/OpenAdaptAI/OpenAdapt/pull/2840)) | Synthetic (MockMed; real headless runs on macOS, unit tests with fakes) | `openadapt quickstart`; [restart.py](openadapt/quickstart/restart.py) |
| See a crash and a restart in the quickstart: on MockMed, Act 3 runs a batch of two new notes in a separate worker process, stops it with SIGKILL after note 1's save is checked, and restarts the batch with the same on-disk write ledger (`IdempotencyLedger`); the replayer finds note 1's key and sends no save for it (its report: idempotent replay, 0 actions), then saves note 2; each patient's chart is reopened in a browser afterwards and the encounters showing the note are counted. Each note has its own copy of the clinic app, as in Act 2 | On main ([#2840](https://github.com/OpenAdaptAI/OpenAdapt/pull/2840)) | Synthetic (MockMed; real headless runs on macOS, unit tests with fakes) | `openadapt quickstart`; [restart.py](openadapt/quickstart/restart.py) |
2 changes: 1 addition & 1 deletion capabilities/CAPABILITIES.md.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6b0c7d386eb68b516766993b4afb1ffe6a0ea4461851850db38a845a47648b81
7cd6868b9e4d87a3b91cc56012fcb3ae35c03b2eb59ddbf3b4baaf3eafa3393f
2 changes: 1 addition & 1 deletion docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ After the tutorial run, the quickstart starts a batch of two notes in a
separate worker process and stops that process with SIGKILL after note 1 is
saved and checked. It restarts the batch with the same write ledger on disk.
The restart finds note 1 in the ledger and sends no save for it, then saves
note 2. Each note is in its database once.
note 2. Reopening each chart shows each note once.

## Run the manual demo lifecycle

Expand Down
34 changes: 22 additions & 12 deletions docs/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,40 @@
the quickstart ran before) against the new quickstart, three rounds each,
interleaved, from `scripts/quickstart_timing.py`.

## The three acts on MockMed
## The quickstart on MockMed

```bash
uvx --python 3.12 openadapt@latest quickstart
```

- **Act 1, show it once.** A demonstration in MockMed, a synthetic clinic
app, compiled into a program.
- **Act 2, run it.** The program on a new note, checked in the app's
- **Record the task, then compile a program.** A script records the task in
MockMed, a synthetic clinic app, and OpenAdapt compiles the recording.
- **Run it on a new note.** The save is checked twice: the screen after the save (the form closed, no
error shown), then the record reopened with the typed note read back under
its label. The program is compiled from a copy of the demonstration with no
database snapshots, certified under the `screen-write` policy, and run with
the on-screen read-back as its only verifier; nothing reads the app's
database.
- **Act 3, stop it mid-batch, then restart.** A batch of two new notes runs
- **Run it against a faulty server.** The demo server keeps the encounter
but drops its note and still reports success. The screen after the save
looks right and shows the note; the reopened record doesn't have it.
OpenAdapt stops, doesn't mark the save done, and leaves the record for a
person to check.
- **Kill the runner mid-batch, then restart it.** A batch of two new notes runs
in a separate worker process. Each note's run reserves its key in the
engine's write ledger (`IdempotencyLedger`, in `restart/ledger/` under the
output folder) before its first action and records the outcome after the
record check. When note 1 is saved and checked, the quickstart stops the
check. When note 1 is saved and checked, the quickstart stops the
worker with SIGKILL, before note 2 starts. It then runs the batch again in
its own process with the same ledger: the replayer finds note 1's key and
sends no save for it (its report shows an idempotent replay with 0
actions), and note 2 runs and saves. Last, it reads each note's database
and counts the note there. That count alone would not catch a resend:
MockMed's demo save carries a fixed key the app de-duplicates on. The
evidence that no second save was sent is note 1's restart report. Each note has its own copy of the
clinic's database, as in Act 2, because the tutorial program writes one
record per patient. `--no-restart` skips this act.
actions), and note 2 runs and saves. Last, it reopens each patient's chart
in a browser and counts the encounters showing the note. That count alone
would not catch a resend: MockMed's demo save carries a fixed key the app
de-duplicates on. The evidence that no second save was sent is note 1's
restart report. Each note has its own copy of the clinic app, as in Act 2,
because the program reads the first encounter on the chart.
`--no-restart` skips this act.

## On a real app: `--app openemr`

Expand Down
Loading
Loading