Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

UFO constraints — refusal fixture

Area: Relations Teaches: the negative companion to ufo_constraints_v0 — a metarel endpoint filled with the wrong metatype is refused with OE0631 at ox check, pinning the endpoint-constraint diagnostic. Run: ox check examples/ufo_constraints_bad --codes (must print OE0631 and exit non-zero)

Conformance fixture, not a tutorial. This package is designed to be refused. It exists so CI can prove ox check rejects a metarel-endpoint violation, and so the diagnostic stays pinned. For the feature it guards, read ufo_constraints_v0.

The characterization metarel requires its aspect position (position 1) to be aspect-sorted. This fixture fills that position with Vehicle, a kind — an ability would have to inhere via a vehicle, not via an aspect:

pub characterization inheresVia(bearer: Person, aspect_of: Vehicle);

ox check must refuse this with OE0631 and exit non-zero:

$ ox check examples/ufo_constraints_bad --codes
OE0631
$ echo $?
1

The full diagnostic names the offending position and both metatypes:

× OE0631: in `<anonymous>::inheresVia`, position 1 of relation `inheresVia`
│ is `Vehicle` (a `kind`), but its classifying metarel `characterization`
│ declares that position as `aspect` — an endpoint must be (a sub-metatype
│ of) the metarel's position metatype.

A corpus test (oxc-runtime/tests/examples_corpus.rs) asserts this package is refused with OE0631 — if the endpoint check regressed and this fixture started building, CI would fail.