Expand description
Engine error surfaces — both build-time and runtime.
This module defines two intentionally separate enums so callers can match on the surface they actually expect to see:
-
EngineConstructionError— build-time configuration defects surfaced byEngine::new(rewrite cycles, unannotated custom axes, unknown / conflicting rule overrides). The integrator resolves these before shipping; runtime lint / fix never emits them. -
EngineError— runtime conditions raised byEngine::lint_with_options/Engine::fix_with_options(spec 005). Variants:DeadlineExceeded { partial_lint }andInvalidThreshold(_).#[non_exhaustive]so future runtime conditions (memory budgets, per-rule deadlines, cancellation tokens) can land non-breaking. Phase 1 status: the type surface ships, butDeadlineExceededcannot currently fire —fix_with_optionsignoresopts.deadlineuntil Phase 2 wiring lands (tasks T010–T012). OnlyInvalidThresholdis observable today.
Keeping the two enums separate means matching on one does not force callers to pattern against variants they could never encounter at the corresponding lifecycle stage.
EngineConstructionError’s RewriteCycle and
UnannotatedCustomAxes variants are emitted by the Phase 3
scheduler (Engine::new runs Kahn’s algorithm over
PageRewrite::reads / writes); UnknownRuleOverride and
ConflictingRuleOverride come from the rule-override
canonicalization pass that runs immediately afterward.
Enums§
- Engine
Construction Error - Errors that will be raised while constructing an
Engine. - Engine
Error - Runtime errors from
Engine::lint_with_options/Engine::fix_with_options(spec 005).