You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The executor is pure and synchronous and reads nothing but the document and the crosswalk. A lookup would need data from outside both, and an inverse only exists when the table is injective.
Decision: decline. An injected table could keep encode and decode deterministic for one call, but the crosswalk document would stop being the whole definition of both directions: decode inverts encode only if the caller supplies the identical table on both sides, and nothing in the document can check that. A crosswalk fetched by URL (#48) would then mean different things against different tables. An injective table already has a sound home in the format: a TypeScript caller can build the rule as { op: "enum", map: table, mapBack: invert(table) }, and parseCrosswalk checks that mapBack inverts map, so the bijection is validated and travels inside the document. A lookup node inside a when keeps throwing for the same reason.
Revisit if a table must stay outside the document for size, with a content hash pinned in the crosswalk so encode and decode can refuse a table that differs from the one the crosswalk was written against.
The README reason for this omission is updated in #56.
Declined as recorded: a lookup table would take the definition of the inverse outside the crosswalk document. The injective-table home in enum with an inverted mapBack covers the sound cases and is validated by parseCrosswalk.
Activity
Mearman commentedon Oct 21, 2026
Declined as recorded: a lookup table would take the definition of the inverse outside the crosswalk document. The injective-table home in
enumwith an invertedmapBackcovers the sound cases and is validated byparseCrosswalk.