Metakit / Verify a state machine
A rule over text stays undecided
Postgres cannot store text holding a NUL character (U+0000), so evaluation refuses every text operation and equality that meets one, before it looks at a null, and and or or do not let their other side decide past a refusal. Plain Schema.String accepts a NUL, so a rule that reads such a field may be refused and the checkers leave it undecided. Declare the field Text.schema from @doeixd/metakit/domain, which refuses a NUL where it is decoded:
ts
import { Schema } from 'effect'
import { Text } from '@doeixd/metakit/domain'
const Owned = Schema.Struct({ owner: Text.schema, balance: Schema.Int })A rule over Owned's owner can then be proved, and partial evaluation answers Expr.judge as soon as one side of a comparison is a known null.