SPEC: Execution and Runtime Contract
6.2 Streaming Execution Engine
Primary interfaces:
- execution sink
- runtime
- cancellation
Per-line motion execution contract
G1is normalized into a line-scoped linear-move command- the engine emits the normalized command to the sink
- the engine submits the same command to the runtime
- runtime returns:
readypendingerror
Blocked/resume rules:
- on
pending, execution becomes blocked pendingmeans the runtime accepted responsibility for the commandpendingdoes not mean the library should resubmit the same command laterresume(token)means the wait for that exact token is already satisfiedresume(token)continues the blocked state and must not resubmit the original command- queue-backed runtimes should return
pendingquickly and resume only after the held command has actually been pushed downstream
Runtime read contract
System-variable reads may return:
- ready value
- pending token
- error
Execution-contract fixtures support:
- fixed ready-valued
runtime.system_variables - ordered
runtime.system_variable_reads
Ordered read scripts support per-attempt outcomes:
readypendingerror
Tracing rule:
- every read attempt emits a
system_variable_readevent - if resume retries the same read, the retry emits a fresh read event
Supported runtime-backed public cases include:
if_system_variable_false_branchG1 X=$P_ACT_XG1 X=$AA_IM[X]
Current name support:
- simple
$NAME - single-selector
$NAME[part]
Deferred:
- multi-selector forms
- feed expressions
- arc-word expressions
Public session status
ExecutionSession supports:
- buffered text input
- line-by-line parse/lower/execute
- explicit
finish,pump,resume, andcancel - editable suffix recovery after rejected lines
Public-session behavior currently includes:
- supported motion execution
- cross-line
GOTO - baseline structured
IF/ELSE/ENDIF - baseline system-variable conditions through runtime reads
Execution-contract fixture baseline
Persistent public fixture files live under:
testdata/execution_contract/core/
Observable fixture options include:
filenameactive_skip_levelstool_change_modeenable_iso_m98_calls
Driver actions currently supported:
finishresume_blockedcancel_blocked
Linear-move result scripting currently supports:
readypendingwith explicit wait token
System-variable read scripting currently supports:
outcome: readywithvalueoutcome: pendingwithtokenoutcome: errorwithmessage
Reference-vs-actual comparison is exact semantic equality.
Generated actual traces are written under:
output/execution_contract_review/
Generated review HTML can be published under:
docs/book/execution-contract-review/
Additional runtime boundaries
The current public execution model also includes explicit contracts for:
- M-function execution policy
- subprogram call and return boundaries
- tool selection and tool change behavior
- combined motion/runtime and condition/runtime integrations through
IExecutionRuntime
The detailed architecture remains in the development design docs. This page is the product-facing summary of the supported runtime contract.