@@ -29,7 +29,7 @@ representative hot-path numbers.
2929 preserves unknown fields on nested nodes (machine, state, transition, ` Ref ` ,
3030 ` GuardNode ` ) so a document written by a newer build round-trips losslessly
3131 through an older one, and rejects only a higher * major* schema version (the
32- typed ` *ErrUnsupportedSchema ` ). IR encoding is deterministic (stable key order)
32+ typed ` *UnsupportedSchemaError ` ). IR encoding is deterministic (stable key order)
3333 so a definition hashes and diffs reproducibly.
3434- Closed-enum extension policy. Every IR enum that may grow (guard op, state
3535 kind, param type, descriptor kind, effect kind) has a documented
@@ -96,7 +96,7 @@ representative hot-path numbers.
9696 on ` NewEffectRegistry ` ) decodes it back to a concrete effect. Per the
9797 closed-enum extension policy, an unrecognized effect kind is preserved verbatim
9898 on load (surfaced as ` UnknownEffect ` ) and rejected only at dispatch
99- (` EffectRegistry.Dispatchable ` returns the typed ` *ErrUnknownEffectKind ` ), never
99+ (` EffectRegistry.Dispatchable ` returns the typed ` *UnknownEffectKindError ` ), never
100100 silently dropped or applied. Effects remain data the host applies; the kernel
101101 does not execute them. The ` Effect ` alias stays ` any ` , so bare domain effects
102102 are unaffected.
@@ -220,7 +220,7 @@ representative hot-path numbers.
220220 - ** Declarative invoke + service registry.** A state declares
221221 ` Invocation{ID, Src, Input, OnDone, OnError} ` ; service implementations bind by
222222 name through ` Registry.Service ` / ` Builder.Service ` , parallel to guards and
223- actions. An unbound service ref fails ` Quench ` with the typed ` *ErrUnboundRef `
223+ actions. An unbound service ref fails ` Quench ` with the typed ` *UnboundRefError `
224224 (` Kind: "service" ` ), consistent with unbound guards/actions. Authored via the
225225 DSL ` Invoke(src, ...InvokeOption) ` whose outcomes are options —
226226 ` WithInvokeOnDone ` / ` WithInvokeOnError ` — alongside ` WithInput ` ,
@@ -333,8 +333,8 @@ representative hot-path numbers.
333333 (e.g. ` And(Or(g1, g2), Not(g3)) ` ). Evaluation short-circuits exactly like a
334334 plain multi-guard transition: ` And ` stops at the first false, ` Or ` at the
335335 first true. A failing composite reports the failing leaf(s) when cheap, else
336- the composite, preserving the typed ` ErrGuardFailed ` ; a leaf panic still
337- surfaces as ` ErrGuardPanic ` .
336+ the composite, preserving the typed ` GuardFailedError ` ; a leaf panic still
337+ surfaces as ` GuardPanicError ` .
338338 - ** ` stateIn(state) ` .** A first-class, config-aware built-in guard, true when
339339 the instance's active configuration includes the named state (its active
340340 leaves and their ancestor spine), so it is correct for atomic, compound, and
@@ -370,7 +370,7 @@ representative hot-path numbers.
370370 transitions until the configuration is stable, recording each as a Trace
371371 microstep. The internal queue is macrostep-local, so ` Fire ` stays pure. An
372372 unhandled raised event is ignored; a non-settling raise/eventless cycle fails fast
373- with the typed ` ErrMicrostepOverflow ` .
373+ with the typed ` MicrostepOverflowError ` .
374374 - DSL also gains ` Always() ` to author eventless transitions directly (previously
375375 IR-only). The wildcard target, forbidden marker, reenter flag, and raised-event
376376 list serialize in the IR and round-trip losslessly through JSON; ` raise ` is
@@ -460,6 +460,22 @@ representative hot-path numbers.
460460 the service settled and an empty slice when the id is not in flight. A caller
461461 that checked the old ` ok ` bool now checks ` len(results) > 0 ` and reads
462462 ` results[0] ` for the routed result.
463+ - ** BREAKING: the struct error types are renamed from the ` Err* ` prefix to the
464+ idiomatic ` *Error ` suffix.** The ` Err* ` prefix is the Go convention for sentinel
465+ error values, not for struct types a caller inspects with ` errors.As ` ; these are
466+ all struct types with no sentinel vars. ` ErrInvalidTransition ` , ` ErrGuardFailed ` ,
467+ ` ErrGuardPanic ` , ` ErrAssignPanic ` , ` ErrPolicyDenied ` , ` ErrUndeclaredState ` ,
468+ ` ErrUnboundRef ` , ` ErrActionFailed ` , ` ErrMicrostepOverflow ` , ` ErrNoPath ` ,
469+ ` ErrNoInitialState ` , ` ErrUnknownBuiltin ` , ` ErrUnboundActor ` , ` ErrUnsupportedSchema ` ,
470+ ` ErrUnknownEffectKind ` , and ` MultiRegionErr ` become ` InvalidTransitionError ` ,
471+ ` GuardFailedError ` , ` GuardPanicError ` , ` AssignPanicError ` , ` PolicyDeniedError ` ,
472+ ` UndeclaredStateError ` , ` UnboundRefError ` , ` ActionFailedError ` ,
473+ ` MicrostepOverflowError ` , ` NoPathError ` , ` NoInitialStateError ` ,
474+ ` UnknownBuiltinError ` , ` UnboundActorError ` , ` UnsupportedSchemaError ` ,
475+ ` UnknownEffectKindError ` , and ` MultiRegionError ` , matching the already-correct
476+ ` WaitTimeoutError ` , ` SnapshotError ` , ` SnapshotVersionError ` , and ` VerifyError ` .
477+ Behavior and fields are unchanged; update the type name at each ` errors.As `
478+ target, type switch, and struct literal.
463479- The determinism and ordering contract is now explicit and frozen: emission
464480 order is exit → transition → entry across the cascade, declaration order within
465481 a set, fixed parallel-region order, and the run-to-completion interleave for
@@ -468,7 +484,7 @@ representative hot-path numbers.
468484
469485### Fixed
470486
471- - ` Cast ` returns the typed ` *ErrInvalidTransition ` consistently for an event that
487+ - ` Cast ` returns the typed ` *InvalidTransitionError ` consistently for an event that
472488 matches no transition, including inside parallel regions, so a caller can
473489 distinguish "no transition" from other failures uniformly.
474490- On-entry lifecycle effects (` after ` / ` invoke ` / actor ` spawn ` ) are now emitted
0 commit comments