Run a planning document end to end
Contract: intent 1.0 · result family 1.1 · native policy planning-v1.1 · C ABI 1.
This recipe runs the actual native engine and independently validates its result and draw projection. The input contains invented aircraft performance, weather, elevations and a small inline navigation network. It demonstrates contract behavior, not a flight recommendation.
Prerequisites
Use an Aeronautiql source checkout with Rust and Python 3.11 or newer. The native crate uses other engine owners in the monorepo. The downloadable example is inspectable source, not a standalone SDK; repository access is currently required to build the engine and run the reader.
cargo build --locked --manifest-path modules/planning/rust/planning_engine/Cargo.toml
python3 -m venv /tmp/aeronautic-example-venv
/tmp/aeronautic-example-venv/bin/pip install jsonschema==4.26.0
/tmp/aeronautic-example-venv/bin/python \
modules/planning/examples/document-lifecycle/run.py \
--output /tmp/aeronautic-example
The script exits nonzero if any assertion fails. On success it prints a PASS receipt and
writes intent.json, request.json, result.json, snapshot.json and draw.json.
Download the input,
script and
execution notes.
The happy path
This excerpt is included directly from the executed example:
request = json.loads(Path(__file__).with_name('request.json').read_text())
assert call('validate', request['intent']) == {'valid': True}
assert call('check-support', request['intent']) == {'valid': True}
request = prepare(request)
pending = call('resolve', request)
assert pending['evaluation']['state'] == 'pending'
publication(request, [pending])
result = call('evaluate', request)
assert admit_result(result, request['job']['dependencyKey'], request['intent'], request['resources']) == 'accepted'
bundle = publication(request, [result])
assert bundle['snapshot']['planState'] == 'complete'
validate accepts a structurally valid draft. check-support applies the native submission
and route-support checks; it does not prove data coverage. capture-resources derives resource
identity from the supplied bytes. prepare-key binds intent, revisions and captured resources.
resolve produces geometry with evaluation pending. evaluate supplies the calculation.
publish produces the matched snapshot and map projection; the independent reader verifies both.
Exercise the failure paths
The same script tests unavailable weather, repeated-fix insertion/replacement/deletion, stale gestures, a stale result, an unsupported schema version, duplicate occurrence IDs, reuse with retained proof, and reuse expiry after a resource change. A file round trip preserves the portable intent and output exactly as JSON values.
App persistence and cloud conflict handling use the coordinator, rather than this script's file output. Continue with the document lifecycle for those host responsibilities, or the API reference to embed the engine.