Skip to content

Support lookup against external tables #37

Closed as not planned
Closed as not planned

Description

@Mearman

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.

Activity

  1. added
    enhancementNew feature or request
    deferredDeliberately not built yet, with a trigger for revisiting
    on Oct 20, 2026
  2. added theissue type on Oct 20, 2026
  3. Mearman commented on Oct 21, 2026

    @Mearman
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferredDeliberately not built yet, with a trigger for revisitingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions