Skip to content

Collapse the two FOR-scope derivations into one #823

Description

@tobyhede

Parent

#799. Design record: .scratch/render-execution-unit/spec.md.

What to build

Collapse the two derivations of the FOR-iteration scope into one.

Core builds the step / index / current-item scope twice from the same inputs: once privately inside the compiler for the artifact actor, and once in an exported function whose only production caller was the CLI. Both answer the same question and can drift.

One derivation, called by both the artifact input builder and the entry seam.

Acceptance criteria

  • One function derives the FOR scope; the duplicate is deleted rather than left unused.
  • Both the artifact resolution path and the entry seam use it.
  • A test pins that the two paths see identical scope values for the same state, so a future divergence fails rather than drifts.
  • pnpm run verify green; pnpm run test:mutate:changed reports no survivors in the changed ranges.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumFeature / architectural cleanupenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions