Skip to content

refactor(core): demote EVL to a diagnostic over one shared subset definition #1024

Closed

Description

@lex00

Part of the fold epic. Cold-handoff. Depends on #1; finalize after #5.

Context

Once the folder exists, determinism is enforced by construction (the folder can't reduce a call), not by EVL. EVL should become a diagnostic that gives a friendly, early, precise error pointing at the same line the folder would reject — over a single shared definition of the supported subset, so the two can never disagree.

Scope

  • Extract one canonical subset definition (predicate + node classification) shared by fold and the EVL rules. Today EVL001's isStaticallyEvaluable and the folder both encode the subset — de-duplicate to one source.
  • Ensure every folder FoldError maps to an EVL rule id and vice-versa (a construct EVL flags is exactly a construct the folder rejects).
  • Keep EVL as pre-flight (editor + chant lint); folding is the enforcement.

Acceptance criteria

  • Single module owns the subset definition; fold and EVL both import it.
  • Property test: for a random supported/unsupported expression, EVL-flags ⇔ fold-rejects (no divergence).
  • FoldError and the matching EVL diagnostic cite the same rule id and position.
  • Docs updated: EVL described as a diagnostic layer over the folder, not the guarantee.

Epic: #1019

Activity

  1. added
    enhancement
    on Jul 24, 2026
  2. changed the title [-]feat(core): fold — composite factory interpretation (removes the last run)[/-] [+]refactor(core): demote EVL to a diagnostic over one shared subset definition[/+] on Jul 24, 2026
  3. lex00 commented on Jul 26, 2026

    @lex00
    ContributorAuthor

    Shipped in a6c2cffb ("epic: fold TypeScript-as-Data instead of running it — #1026,#1021,#1022,#1024,#1025 + #1032"). The squash message listed the children without closing keywords, so none of them auto-closed and they stayed open after the epic #1019 was closed. Closing as bookkeeping — the work is on main and verified: fold coverage 15/98 at that commit, drift 0 across the 98-entry differential.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions