Data Plane and Operation Identity
FRAME_SUBMIT creates one operation. The operation identity and frame identity are related but not interchangeable:
operation_id: u64is the stable lifecycle identity used by cancellation, scheduling, progress, partial results, route hints, object references, trace correlation, and drop reasons.header.frame_id: u32is the ordered data-plane work-unit identity used to correlate submit, terminal result, replay, and frame-oriented profile data.
An implementation MUST preserve the pair for the complete operation lifetime. It MUST NOT derive operation_id from a local handle, truncate it to frame_id, or silently set the two values equal. Opaque SDK/FFI handles are process-local resources and never become wire identities.
FRAME_SUBMIT Metadata
Preview4 freezes the fixed metadata at 72 bytes:
| Offset | Field | Type | Rule |
|---|---|---|---|
| 0 | src_width | u16 | Tensor field; zero for non-tensor payloads. |
| 2 | src_height | u16 | Tensor field; zero for non-tensor payloads. |
| 4 | tile_width | u16 | Tensor field. |
| 6 | tile_height | u16 | Tensor field. |
| 8 | tile_count | u16 | Tensor field. |
| 10 | section_count | u16 | Number of declared tensor sections. |
| 12 | frame_class | u8 | Profile-defined frame class. |
| 13 | input_profile | u8 | Standard input profile registry value. |
| 14 | tile_index_mode | u8 | Tile-index encoding. |
| 15 | reserved0 | u8 | MUST be zero. |
| 16 | latency_budget_ms | u16 | Submit latency budget. |
| 18 | target_fps_x100 | u16 | Optional frame-rate target. |
| 20 | retry_of_frame | u32 | Prior frame identity, or zero. |
| 24 | tile_base_id | u32 | First tile identity. |
| 28 | camera_bytes | u32 | Declared camera block length. |
| 32 | tile_index_bytes | u32 | Declared tile-index block length. |
| 36 | reserved1 | u32 | MUST be zero. |
| 40 | operation_id | u64 | Non-zero lifecycle identity for this submit. |
| 48 | reserved2 | u32 | MUST be zero. |
| 52 | submit_mode | u8 | inline, reference, or mixed. |
| 53 | budget_policy | u8 | Frozen budget-policy bitmask. |
| 54 | loss_tolerance_policy | u8 | Frame policy or 0xff to inherit. |
| 55 | reserved3 | u8 | MUST be zero. |
| 56 | object_ref_mask | u32 | Standard referenced-object slots. |
| 60 | dependency_frame_id | u32 | Dependency frame, or zero. |
| 64 | payload_kind_bitmap | u32 | Declared payload families. |
| 68 | payload_frame_count | u16 | Number of typed payload frames. |
| 70 | reserved4 | u16 | MUST be zero. |
The tile_index_bytes field occupies bytes 32..35. Bytes 36..39 are reserved; they do not overlap the tile-index length. operation_id occupies bytes 40..47 and is part of every valid Preview4 FRAME_SUBMIT.
Body-Region Length Rules
The current NNRP/1 body prelude keeps the inherited 32-byte field layout but applies the current descriptor sizes:
object_reference_bytesMUST be an integer multiple of the 24-byte object-reference block.typed_payload_descriptor_bytesMUST be an integer multiple of the current 24-byte typed payload descriptor. ForFRAME_SUBMITandRESULT_PUSH, it MUST equalpayload_frame_count * 24.extension_descriptor_bytesMUST be an integer multiple of the 16-byte extension descriptor.
The Preview2 16-byte typed-payload descriptor is a historical layout and is not accepted by the current Preview4 wire format.
RESULT_PUSH Result Class and Reuse
RESULT_PUSH.result_class describes the primary delivery class, while result_flags contains composable properties. A partial result may therefore reuse an earlier frame, subject to these rules:
result_class=stale_reuseorresult_flags.stalerequires a non-zeroreused_frame_id.reused_frame_idMUST be zero when stale semantics are not declared.- For tensor payloads,
result_class=partialorresult_flags.partialrequires a non-zerodropped_tile_count, andcovered_tile_count + dropped_tile_countMUST equaltile_count. Non-tensor payloads keep all tensor coverage fields zero and express partial ranges through their typed-payload descriptor and profile-specific metadata. - Partial and stale semantics may be combined. The combined form uses
result_class=partial, sets both thepartial | staleflags, and carries a non-zeroreused_frame_id.
Runtime Correlation
- A client allocates both identities before encoding the submit.
- A server records both identities when it accepts the submit and binds them to its local operation handle.
- Partial results and operation-scoped control frames use
operation_idin fixed metadata. - Every operation-scoped message MUST carry the
header.frame_idbound to its metadataoperation_id; a receiver MUST reject an unknown operation or a mismatched pair. RESULT_PUSHandRESULT_DROPretainheader.frame_idcorrelation.- A terminal result releases lifecycle state only after the corresponding terminal event has been delivered or durably recorded.
TRACE_CONTEXTis the exception whose fixed metadata does not repeatoperation_id.header.frame_id=0is session-scoped; a non-zero value MUST equal the active operation's recorded submit frame id and is resolved back to the preserved operation pair.