Skip to content

design: in-memory validation for generated Vite projects #251

Description

@lloydrichards

Context

Recipe Builder can show the files Stack Effect will generate, but it cannot run Vite resolution or build checks until those files are written to disk and external tooling runs.

The Effect VFS virtual-build experiment loads controlled source and package fixtures into Vite from a virtual volume. This suggests that limited preview-time validation may be possible.

Potential benefits

  • Catch broken imports and syntax before a project is applied or downloaded.
  • Give catalog contributors faster feedback.
  • Strengthen Recipe Builder previews with evidence beyond file generation.
  • Find certain catalog compatibility problems earlier than host E2E tests.

Exploration scope

  • Select one deliberately small generated profile, such as a basic Vite React client.
  • Attempt to validate it directly from an in-memory workspace.
  • Identify which resolution and compilation behavior works and what still requires host files or subprocesses.
  • Measure worker bundle-size growth, cold validation time, repeated validation time, and diagnostic usefulness.
  • Compare the result with the existing generated-workspace test path.

Success would not imply that virtual validation can replace full host builds, package installation, or E2E tests.

Keep the experiment in the docs application or another isolated adapter that consumes scaffold's materialized file view. Vite or VFS implementation types should not enter domain contracts or the core scaffold interface unless later evidence supports a reusable module.

#253 verifies generated repository structure and Apply behavior. This issue investigates tool-level import and build validation for one generated profile.

Useful outcome

  • A proof of concept validates one generated profile or records why it cannot.
  • Supported and unsupported behavior is explicit.
  • Bundle and runtime costs are measured.
  • The result recommends adopting, narrowing, or stopping the direction.

Depends on

Related

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions