Skip to content

Continue IR work #723

@rogeralsing

Description

@rogeralsing

Context

Recent IR-only refactor work removed the remaining AST-eval seams from ExecutionPlanRunner and prebuilt class callable plan seeds in ClassDefinitionProgramCache, but one callable-side seam is still open. Class-created sync methods/constructors closed over a dynamic scope (with in the closure chain) can still be unsafe because cached successful IR seeds assume slot/flat-slot resolution that may bypass runtime with lookup semantics.

This issue is the next contained follow-up from #364 comment 4188869884: finish the remaining class-created sync callable dynamic-scope seam without reintroducing silent AST fallback.

Success Criteria

  • Add a failing regression test first that covers a class-created sync callable defined inside a with-captured closure and demonstrates the current unsafe or AST-dependent path.
  • Class-created sync methods/constructors with cached successful plan seeds no longer bypass with resolution through slot/flat-slot assumptions.
  • Runtime uses one explicit safe behavior for this seam: either a dynamic-scope-safe IR execution mode for these callables, or a truthful IR-plan rejection path that does not silently fall back to AST execution.
  • Existing AST-free assertion coverage for non-dynamic IR-owned class callable paths remains green.
  • Build and focused regression packs for class/runtime/IR execution pass after the change.

Rules

  • Add RED coverage before implementation.
  • Scope this issue to the remaining class-created sync callable dynamic-scope seam from Epic: Design: IR-only execution  #364; do not bundle IL backend or broader epic work.
  • Do not add silent fallback paths.
  • Preserve JavaScript with / dynamic name-resolution semantics exactly; cached slot layouts must not bypass dynamic bindings.
  • Keep cache construction, callable materialization, and runtime execution concerns separated.

NFRs

  • No new runtime AST re-entry on IR-owned non-dynamic paths.
  • Execution-plan diagnostics must stay truthful about cached seed success/failure versus runtime execution path.
  • Avoid measurable allocation regression on the existing profiling loop for this refactor area.

Quality Gates

  • Tests pass
  • No regressions

Faktoria Attribution: agent=intake | trigger=new issue intake

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockedWaiting on dependencyclaimed:w1Claimed by worker 1claimed:w5Claimed by worker 5needs-reviewHuman decision requiredp2Nice to havesize:LLarge — 4+ hours, consider splittingstage:verifyChecking CI, tests, compliance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions