Select behavior before parsing or writing

Flyology_CBOR.Profiles defines explicit versioned identities for syntax, Unicode, acceptance, and output behavior. No default or factory exists.

Construct every profile field

The current parser supports RFC_8949 version 1, Unicode_Scalars version 1, and Well_Formed_CBOR version 1. The writer supports RFC 8949 version 1, Unicode Scalars version 1, and Ordinary_Compact version 1.

Initialization validates and freezes the complete profile before input consumption or destination begin. An unsupported or incompatible profile fails before the parser consumes input or the writer begins its destination transaction.

Use zero-based diagnostic coordinates

Flyology_CBOR.Errors distinguishes source bytes, writer token bytes, staged output bytes, and CBOR call ordinals. Parser failures report the first proving byte or the first missing byte.

Some syntax failures also expose a construct offset. This second coordinate identifies the head, payload, missing child, or retained UTF-8 lead associated with the failure.

Retain the primary failure

Cleanup never replaces an earlier primary diagnostic. When abort cleanup also fails, the cleanup error is secondary. A pending parser failure preserves the consumed count and eligible provisional event prefix. The next admitted Step or Drain call reports that failure and moves the parser from Failure_Pending to Failed.

Reject invalid lifecycle calls without hidden progress

Rejected parser calls consume no input and produce no eligible events. Writer lifecycle failures do not make staged bytes eligible. Reset starts a new operation from Failure_Pending or a terminal state.