This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.

Testing, diagnostics, and delivery

Put authored interaction tests in app.test.contract, beside the app:
contract-test
test "the counter increments"
expect text "count" == "Count: 0"
tap "increment"
expect text "count" == "Count: 1"
expect state count == 1
tap "reset"
expect state count == 0
These steps exercise the first example. Parse a test file with contract test; run it against a built app with the driver:
Terminal
cargo run -q -p contract -- test path/to/app.test.contract
bun scripts/agent.mjs web --test path/to/app.test.contract
Use the correct --app, EXACT_APP_DIR, and host build for your application; without either, the driver uses Caltrain. The driver refuses stale artifacts and prints the needed rebuild. clock settle advances animation deterministically (it reports settled: false while a repeating timer or an infinite animation runs, as in the Clock and Motion examples); clock +1000 advances by a second. Do not replace virtual time with sleeps.
For diagnosis, use build --json, symbols --name <name>, and build -o /tmp/app.plan --map, which writes /tmp/app.plan.map.json. The development source map connects node layout to declarations, component calls, and style origins, and says each source's SHA-256 as compiled (sources), so a reader can tell a file moved since. Then drive the actual app:
Terminal
bun scripts/agent.mjs web tree state logs "screenshot /tmp/app.png"
Compilation, baking, and interaction are different checks. If a view is blank, inspect tree, layout, resource state, and logs before changing random styles. If a resource fails, check the source implementation, its generated types and grants, and its bake behavior. If an event fails, check the captured arguments, payload type, current action binding, and whether the node exists.
app.json also controls delivery policy. From the app, bun exact.mjs deploy is a dry run, which expects a committed tree (or --dirty); publication uses --yes, an origin, a signing key, and the configured signed streams. Before changing trust or publishing, read the reference on EXACT_UPDATE_TRUST (LLP 1030.000). Writing Contract does not require inventing a deployment service. bun exact.mjs push publishes a working-tree edit to installed release binaries immediately; --watch repeats it on save. It needs a production build receipt or existing stream and the signing key. It has no dry run and publishes no web root. To put an iOS app on someone's iPhone, run bun exact.mjs share: it builds the app and prints an AppDrop link that installs it with their own Apple ID.
Is this helpful
Last updated November 30, 2026
Exact Docs