Skip to content
Draft
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
40 changes: 40 additions & 0 deletions packages/flow/docs/BUNDLE_SCHEMA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Bundle schema and sealed identity

`Workflow.load` checks the original bundle's manifest-free canonical payload
before upgrading its schema or constructing the current model. Each supported
schema has one canonical projection. A digest mismatch refuses the bundle.
Schema 2's reviewed default omissions apply only at explicit IR ownership
positions; arbitrary request bodies and mappings remain sealed content.

A missing schema version means legacy schema 1. Upgrades run one registered
step at a time on a copy. Malformed versions, future versions and missing
upgrade steps refuse loading. A breaking format change requires a schema bump,
a canonical format rule and an explicit upgrader.

Loading preserves the original files and content identity. The loaded object
retains the original canonical bytes plus a fingerprint of the upgraded model
and its integrity-manifest fields. Later verification checks both representations
and the sealed assets. Changing the workflow, asset hashes, integrity manifest
or asset bytes requires a new seal. Loading with `verify_integrity=False` does
not make a broken original seal pass a later integrity check.

Admission and authorization use `content_identity_digest` to retain a verified
original identity across model upgrades. It checks the loaded model, original
payload, integrity manifest and supplied asset hashes before returning that
identity. Callers checking live assets must hash their bytes or call
`verify_integrity` as well.

`Workflow.save(..., seal_manifest=True)` creates a seal over the current
serialization; this is also the default save behavior. Saving a loaded sealed
object with `seal_manifest=False` refuses. A format upgrade can change the new
seal's identity, so existing admissions must be evaluated against the new seal.
`compute_content_digest` continues to calculate current-format content for new
seals.

The frozen compatibility fixtures cover synthetic linear and program bundles
produced and self-verified by the pinned 2.2.0, 2.5.0 and 2.6.0 source releases.
Their original bytes and provenance were frozen before testing the current
loader. The fixture README records the historical environment limitations.
Current controls verify loading, integrity, tamper refusal and one exact input
in an owned synthetic headless Chromium page. Content digests provide integrity;
run authorization still applies its policy, identity and effect checks.
47 changes: 47 additions & 0 deletions packages/flow/docs/showcase-openemr/bundle/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"schema_version": 2,
"content_digest": "6b41860d6e3b78cdba8511ffceabd0aeb11c6571ea870820b8f6cfa352aacfe3",
"file_hashes": {
"templates/identifiers/step_005.png": "ab6795dd012009449c7bc346ffec33db8a2c54c53cfbf47f5172b9d02e50f167",
"templates/identifiers/step_008.png": "8143294215bc1fc9fc09674c15e76c57b3949992e14b4d156f06c3daf2313c3f",
"templates/identifiers/step_014.png": "883eb0b5d10bf27fbf5b4a2892560787f89f811b06f00c0c9d6d15ec795a6afb",
"templates/layout_fingerprint.json": "240259c63576a467d974ea547f37b5c02ae955ff11e8ec5ffb9d88de2ef58446",
"templates/step_000.png": "f1828b7d1644fbe316c20d5e85904149f582bc851516a4f57ab87854e09d91f6",
"templates/step_000_expect.png": "a191ba28eaf2691ea2bdbde6043f87eeea0bda377ed1dbd92ed8f99e4645c38e",
"templates/step_001_expect.png": "a368fb929154c409069b8529c4159e95009de1cd90847ef8c9e6e7217383112e",
"templates/step_002.png": "edc6f6ff053c14c201f17cca8b46ae4b91b8e80858c203f8f47425552f4a2aea",
"templates/step_002_expect.png": "b588f9b3a2ac3c47e9f3b5482cb73e841bb1fceda2dcec1f25d76639c2d7885b",
"templates/step_003_expect.png": "5d0d7095f8556037dca2486a9f65b811afc778e56424c60596f2701e749d8d20",
"templates/step_004.png": "e92c4f9a9641f85ab09240761747f296a259514da6f0fa5dcb553f4cd24973c3",
"templates/step_005.png": "e21c6ca4622199cd03c4ec569d79992e275321dd633a532a8e95f9839692cd7c",
"templates/step_005_expect.png": "c5667abd0a4634138fe14c45fb9e9db24915730f9833b380a468c192b9705553",
"templates/step_006_expect.png": "f7e7bea1e80633fdfb6d59c0fe8a21e555258467771a4aae77e04e0ae5638237",
"templates/step_007_expect.png": "b00f01ef23bb84596f854e770197f88b4a573dc595dec10f4641d5853dfae8f6",
"templates/step_008.png": "daa4ed0af4be54f6c834124d428c3cc53782bf47f078e2aed3ac66b1821cc001",
"templates/step_008_expect.png": "eb616c03c24974233e5926db0ce325efd28ba09bf7d7294b2654182056a64001",
"templates/step_013.png": "44bcea01c29ffce089359a39defec0e9e54083af01410e9c4a3f7c0d25eb3cab",
"templates/step_013_expect.png": "49573416a7ebe7aff262d82ee44dd54ee21cb4a76ba99a07e666e46b5a721446",
"templates/step_014.png": "7feb81b1126ebf4da47b3d3cde66852d45df9c5c0de92271fd5967aa2191befb",
"templates/step_014_expect.png": "4b82d961d0ab7706325dc0aaae70e0432eb7f6130871cd9bbd48fe8b26a11774",
"templates/step_015.png": "a525c1b81d24176746463b435cfa870f27ae8851918ace8d667a91cbd429c58e",
"templates/step_015_expect.png": "5e7fba0ba58b1d27497f4a1148934be51886a92c94edaa50582ac3045642f74f",
"templates/step_017.png": "1952c2c78b8fbea7f97276e5ceb9a80a1f559deadca13ebb8e1526f272c8935f",
"templates/step_017_expect.png": "3bb8ad7cd2002f295c44a7d5e57a268d7dc2c712519bccb169cf8ca8f50392b7"
},
"provenance": {
"compiler_version": "2.6.0",
"source_recording_sha256": null,
"sanitized_from_digest": null,
"compiler_config_sha256": "d3748d5c9304e9880719b005ec461ddfd6c1ad586139bb7ae870333099d7ae86",
"created_at": "2026-11-06T04:51:24.260972+00:00",
"policy_name": null,
"certified": false,
"certification_status": null,
"certified_at": null,
"expires_at": null,
"certification_invalidated_at": null,
"certification_invalidation_reason": null,
"governed_authorization_template": null
},
"encrypted": false
}
139 changes: 139 additions & 0 deletions packages/flow/docs/showcase-openemr/bundle/sections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"schema": "openadapt.flow.sections/v1",
"note": "Display metadata: named groups of steps for program maps. Execution and the outcome classifier ignore this file, and it is outside the content digest and the workflow contract hash.",
"workflow_contract_sha256": "93afd9d58a95ecbe1a09a99b822a110f7be535a182759887d1b6e9d3dc3beef8",
"sections": [
{
"id": "fields-step_000",
"title": "1 field: text",
"title_source": "fields",
"kind": "fields",
"steps": [
"step_000",
"step_001",
"step_002",
"step_003",
"step_004",
"step_005",
"step_006",
"step_007"
],
"fields": [
"text"
],
"params": []
},
{
"id": "save-step_008",
"title": "+ Add",
"title_source": "ui",
"kind": "save",
"steps": [
"step_008",
"step_009",
"step_010",
"step_011",
"step_012",
"step_013",
"step_014"
],
"fields": [],
"params": []
},
{
"id": "fields-step_015",
"title": "1 field: note",
"title_source": "fields",
"kind": "fields",
"steps": [
"step_015",
"step_016"
],
"fields": [
"note"
],
"params": [
"note"
]
},
{
"id": "save-step_017",
"title": "Save as new message",
"title_source": "ui",
"kind": "save",
"steps": [
"step_017"
],
"fields": [],
"params": []
}
],
"compiled": [
{
"id": "fields-step_000",
"title": "1 field: text",
"title_source": "fields",
"kind": "fields",
"steps": [
"step_000",
"step_001",
"step_002",
"step_003",
"step_004",
"step_005",
"step_006",
"step_007"
],
"fields": [
"text"
],
"params": []
},
{
"id": "save-step_008",
"title": "+ Add",
"title_source": "ui",
"kind": "save",
"steps": [
"step_008",
"step_009",
"step_010",
"step_011",
"step_012",
"step_013",
"step_014"
],
"fields": [],
"params": []
},
{
"id": "fields-step_015",
"title": "1 field: note",
"title_source": "fields",
"kind": "fields",
"steps": [
"step_015",
"step_016"
],
"fields": [
"note"
],
"params": [
"note"
]
},
{
"id": "save-step_017",
"title": "Save as new message",
"title_source": "ui",
"kind": "save",
"steps": [
"step_017"
],
"fields": [],
"params": []
}
],
"edits": [],
"context": {}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading