Repository navigation
openadapt-flow 4.0.0
·
315 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Breaking Changes
- Encryption at rest is now enabled by default (
#2423): recordings,
compiled bundles, and run directories are written as sealed-set v3
encrypted containers unlessOPENADAPT_ENCRYPT_AT_REST=0or--no-encrypt
is set. Releasedopenadaptlauncher1.23.0(openadapt-flow<4) reads
run files via plain paths, so this major bump keeps1.23.0on Flow 3.4.0
while pairing Flow 4.0.0 withopenadapt 1.24.0(>=4.0.0,<5.0.0). - Requires
openadapt-types>=0.24.2,<0.25.0. Flow 4.0.0 imports
modules and names that first ship in types 0.24.2 (evidence_scope,
run_ledger,receipt,exception_card, and newcheck_levelnames). The old>=0.24.0floor let an install resolve
types 0.24.0 and fail on import.
Encryption at rest by default
- Recordings (web, the quickstart and tutorial, and desktop once converted),
compiled bundles and every run directory (report, step screenshots, crops,
frames, evidence,REPORT.md) are now encrypted at rest by default, with
no setup, as sealed-set version 3: a data key per set, wrapped with HPKE
(P-256, HKDF-SHA256, AES-256-GCM) to a per-set bucket key, and files as
Tink AES-256-GCM-HKDF 1 MiB streams. The bucket key is wrapped to the
device runtime key (only while the set is written; bundles keep it), the
device viewer key, organization keys and a recovery key. - Organization mode, from a machine policy (MDM profile, Group Policy, a
root-owned/etc/openadapt/policy.json): organization recipients (P-256
or RSA-OAEP-3072) and a key archive are required, and recording stops
without them. Solo users can make a recovery key
(openadapt-flow at-rest recovery create). openadapt-flow at-rest statusshows the keys and policy;
at-rest shreddestroys a set's tracked bucket-key copies.- The device key is a software P-256 key in the OS keychain through
keyring(a 0600 file with a warning where there is none). Secure
Enclave, TPM, Touch ID and Windows Hello providers are interfaces with test
doubles, not built yet. - A configured
OPENADAPT_BUNDLE_KEYorOPENADAPT_RECORDING_KEYstill wins
outside organization mode (deprecated), and~/.openadapt/keys/at-rest.key
keeps working. Version 1 and 2 sets and plaintext folders still read. OPENADAPT_ENCRYPT_AT_REST=0, or--no-encryptonrecord,compile,
runandreplay, turns it off with a one-line warning and a ledger line.- Receipts (
seal.json,receipt.*,public-seal.json) stay plaintext and
are now written for encrypted runs too; their digests are over the
plaintextreport.json.seal verify,inspect report-run, the receipt
page and the quickstart read encrypted runs. The receipt page embeds the
report, so beside an encrypted run it is logged as a plaintext copy. - Core dependency:
cryptography>=50(HPKE). The keychain store useskeyring, whichpip install openadaptincludes; a bareopenadapt-flowinstall needs thekeychainextra, and otherwise keeps the device key in a 0600 file with a warning. - Fail-closed key lifecycle: an organization key archive counts as
reachable only with its.openadapt-key-archivemarker, each record and
header names the archive it went to, and shredding authenticates the
header first and reports complete only once every tracked copy and store
file is gone. Organization mode requiresrecords: archive. Durable
checkpoints in an encrypted run are keyed from the run's own data key.
--no-encryptlasts for one command, and the Python recorders follow the
at-rest policy by default. A solo set opens silently only with the device
key that wrote it; a backup that only the recovery code opens needs
openadapt-flow at-rest restore DIR --yes. Rollback records in an
encrypted run stay inside its sealed set.
Features
- One verification ladder on every path.
openadapt_types.check_levelis
the only source of check levels;verify-run, the runtime's report and
thetxengine derive their tables from it and name each check with one
receipt word:VERIFIED(levels 3 and 4 only, always with a basis:
separate_session,system_api,activity_log,db_frameor
owned_connection),SHOWN,CONFIRMED,ATTESTEDorRECORDED.
Run receipts (record/run/v1),verify-runandtxreceipts carry an
additiveevidence_scopeblock
(openadapt.evidence-scope/v1) that states the level, basis, wire scope,
read-back time, recheck window and what the check did not cover. Receipts
without the block still verify. A run receipt whose report shows a save
checked below level 3 isUNKNOWN(below_verified_level), never
VERIFIED; no built-in profile produces such a run. - Links, tabs and menu items can be steps (
openadapt_flow.gui.steps). Each
demonstrated click gets its role from what the backend counted: a commit
when it wrote, a navigation when the screen changed with no write. A live
commit holds only on exactly the demonstrated writes.openadapt_flow.gui
is a neutral view of a screen (role, name, state, containers) with adapters
for a browser page, an accessibility tree and aform_txsnapshot. - One verdict kernel,
openadapt_flow.verdict, for every check that turns
evidence into held, refuted or not checked. It fixes the obligations from
the plan first, settles results against them, and never passes an empty
set, a truncated or short read, a probe that raised, a result bound to
another run, two results that disagree, or a code nobody listed.
Result.nothing_elseholds a "nothing else changed" claim only on a
complete read. Functions marked@verdict_siteare run by a fail-open
harness (tests/failopen) with 15 generic mutations, which checks the
verdict at three levels (refuted, not checked, held), not as one bit. It
flags 14 fail-open bugs rebuilt from this repository's history (pinned
pre-fix copies) and one live connector site, and passes their fixes.
scripts/check_verdict_folds.pyfails CI when the repository-wide count of
a hand-written fold kind rises, including a broadexceptthat logs and
falls through and a "nothing else changed" test over a set that may be a
partial read. Seedocs/FAIL_CLOSED.md. - The hard-invariant layer, the frame's version check,
verify-run's effect
folds and the receipt's line judge and tally are built on the kernel. - A sign-in that asks for a second factor (a code by text message or email,
an authenticator code, or a push approval) no longer has to stop the
program. Asecond_factorstep (one_timeiscodeorapproval) waits
for a person through the configured source (OPENADAPT_SECOND_FACTOR_URL
for a hosted or customer-run runner's control plane, or a local
OPENADAPT_SECOND_FACTOR_COMMAND). Before anyone is asked, the focused
field must be an emptyautocomplete="one-time-code"input, and the page
is made to draw it as dots. After the answer the same field must still have
focus and be empty. The code is then filled once into that element, never
retried, and kept nowhere: not in a model's page listing, a screenshot, a
log, a receipt or the recording. No source, an answer after the deadline, a
decline, a multi-line or malformed answer, a field that changed while the
person answered, an API binding on the step, or a backend that can't bind
the field stops the step before typing, with a closedsecond_factor_*
code. The action is new, so an older runtime refuses the bundle instead of
skipping an approval. Over the control plane the code is sealed in the
person's browser to a one-step P-256 key, and a cached run's child process
gets the run token only with the control-plane URL. The wrap recorder turns
a field markedautocomplete="one-time-code"into such a step. A code-only
form's submit counts as a sign-in only once, right after a
username-and-password sign-in. A field split into one box per character
is refused. See docs/SECOND_FACTOR.md. - An interactive run (a terminal on stdin and stderr) asks for a sign-in's
second factor at that terminal when no control plane or command is set. A
code is read without echo, under the step's deadline, in the calling
thread; echo comes back on when the read ends, including on a timeout, and
input typed before the prompt is discarded. On Windows the console is read
one key at a time withmsvcrt.getwch, which never echoes, under the same
deadline and discard rules. A run without a terminal never
prompts and still stops before typing.OPENADAPT_SECOND_FACTOR_PROMPT=off
turns the prompt off. - Effect locations (
openadapt.effect-location/v1,
openadapt_flow/effect_location/): the place a careful person would look
again to see an intended value, stored as pack data. Each record holds the
demonstration path and start condition (same_screen,fresh_navigation,
new_session,other_channel), a locator (label, row key or region), the
expected value, a codec (including atemplatecodec that reads one
summary row as two values and asplit_datecodec), the expected count
and an optional baseline.evaluate_alljudges every planned value as
held,refutedornot_checked. A location that can't be reached,
found or read isnot_checked, never a pass. The check level comes from
the start condition; the receipt word comes from
check_level.outcome_wordwhen it is available. The engine holds no
application vocabulary: month names, yes and no words, currency signs and
tables come from the pack. See docs/EFFECT_LOCATION.md.
Changes
- Network captures no longer write raw bodies by default.
record --capture-networkkeeps only the--paramand--identifiervalues of
each request and response body, plus a per-capture keyed hash of every
other value and of each HTML, text or binary body; undeclared URL query
values are hashed too.dump_harandsave_hardo the same with the wire
policy's id and version fields.--capture-network-bodies raw(and
raw_bodies=True) keeps the redacted bodies, which API step and undo
proposals need, and is refused unless the recording is encrypted or
OPENADAPT_FLOW_PLAINTEXT_AT_RESTexplicitly allows plaintext. Binary
bodies, files and non-text responses are sized and hashed from their
bytes as sent; the recording'sapp_urlquery is minimized too; an
explicitapplication/octet-streambody is never parsed as JSON (a
missing content type still is); andload_harrefuses a HAR marked
minimized that carries a raw body.
Fixes
verify-runwithminimum_effect_strength: independent_sessionnow
verifies on a separate-session read (check level 3), as the runtime
already did. Before, the two disagreed and verify-run never verified on
it. The default minimum is unchanged (independent_system_of_record).- The
txengine no longer caps every verdict atUNCERTAINwithout a
SQLite row authority. A post-commit API read sent with cache-bypass
headers, showing no cache in its response, and whose record version is
exactly one past the before-image's isCONFIRMEDwith basis
system_api. Anything else staysUNCERTAIN. verify-run: an effect list that is empty, or tiers that don't pair one to
one with the effects, isINDETERMINATE,unknownandunchecked, not
CONFIRMED,presentandindependent_readback. The receipt model already
refuses an empty list, so no run changes outcome today.verify-run: the effect folds settle against the planned effects, so a
planned effect with no verdict isINDETERMINATE, and an observed-effect
code nobody listed isunknownrather thanpresent.- The frame's version check: a duplicate version row, a version history
that lost a row, or a changed target with no new version no longer hides a
version saved by another user. The frame is refuted instead of not checked. - Receipts: a line check nobody listed keeps the run from
VERIFIEDand is
counted as not checked, so the three line counts add up to the lines. - The form transaction layer (
form_tx, an unreleased prototype until this
release) reads back every field it typed, selected or kept. Each one gets
apassed,failedornot_checkedverdict; a field it cannot read back
(no read-back declared, the summary control missing or ambiguous, a failed
lookup, a value entered only in a popup) isnot_checkedand never
passed. A submit with anynot_checkedfield endsreadback_incomplete,
neververified_done, and gets no receipt. Before, fields typed in a popup
estimator had no verdict at all and such a run could end verified.
Popup inputs are also re-read just before the popup's apply button, and a
mismatch stops the run before apply. The side panel shows refuted and
incomplete runs as needing action. Measured on four held-out synthetic
quote portals:benchmark/form_tx_heldout_run/RESULTS.md. - A wrapped sign-in no longer compiles a pixel check that freezes a withheld
credential field. The recorder blacks out a withheld field in every frame
that still shows it, so aREGION_STABLEcrop that overlapped one held a
black rectangle that never matched the unredacted screenshot at replay
time, failing a step whose region overlapped a credential box during the
run, for example the click into the password field. Such a check is now
clipped to the part of its region clear of the box and re-cropped from the
same frame. When no usable part is left, it is dropped and recorded in
param_hygiene.json. This applies to mined checks and to the
focused-field pass. - A FHIR searchset Bundle's
OperationOutcomeentry (search.mode: outcome) is no longer read as a marker match. Packs can declare
search_matchon the entry parent (Medplum usespath: search.mode,
equals: match). A non-informational outcome is an error, not a
found id, so recovery cannot adopt a write that never landed and an
outcome id does not count towardduplicate_write. - File, document, document-hash and email checks no longer claim
system_of_record(tier 1) for every file. Their strength now follows who
produced the artifact, set by the neweffects.artifact_producer:
acting_sessionand the default,unknown, are at mostsame_screen;
separate_sessionis at mostseparate_session;system_of_recordkeeps
tier 1. A store that overlapseffects.acting_roots, the user's Downloads
folder or a Playwright download folder is graded as the acting session's.
Under a declaredseparate_sessionorsystem_of_recordproducer, a scan
that lists a file in a Playwright download folder beneath the store, or a
file whose real path leaves the store, is refused:
the verdict is INDETERMINATE and names why. Each verdict records the
producer, and whether it was declared or observed, in
read_evidence.provenance. Breaking: a deployment that relied on the old
tier 1 for these kinds must now declareartifact_producer: system_of_record(one line in itseffects:orverifier:section,
including arecord --verifyfile); until it does, runs that need a
separate-session or system-of-record check are notVERIFIED. Verifier
identities of configs that leave both new fields unset are unchanged.