Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Run the state-space exploration on pack import in a Web Worker

Abierto
#22 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript, web-dev
Área
frontend, testing

Línea de trabajo

Start with apps/web/src/screens/create.ts and packages/engine/src/explore.ts, then read packages/cli/src/exploration.ts to understand the existing check passes. Run the dead-end fixture at packages/engine/test/fixtures/runtime/dead-end.yaml and inspect the verification table in docs/architecture.md section 6. Done means imports are verified in both the PWA and offline page, failures block adding the pack, cancellation keeps the screen responsive, and the main chunk does not grow.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area: engine area: web priority: high type: feature

Context

The import screen compiles a pack, replays its walkthrough and estimates its play time, all on the main thread (SECURITY.md, Known limitations), but does not explore the state space. A pack whose walkthrough fails is still stored, with a warning. An imported pack can therefore contain dead ends or losing endings that lexvm check would reject, which breaks the forgiving promise for packs created with the in-app flow. The engine has no DOM or Node dependencies, so explore can run unchanged in a worker. Memory is the constraint: about 1.8 KB per state, so the CLI default of 200,000 states (about 400 MB) is too much for a phone.

Scope

  • A module worker that compiles the pack and runs the walkthrough, explore and estimatePlaytime, reports progress (states explored) and can be cancelled.
  • The same two passes as lexvm check (main exploration, then the drop pass); move packages/cli/src/exploration.ts into the engine so CLI, generator and player share it.
  • A phone-safe state limit for the player, defined in one place. The CLI treats explore.incomplete as an error; the player reports it as a warning that says the pack was not fully verified.
  • Create screen: exploration results next to the other diagnostics (dead ends with their command path, losing endings, not winnable, incomplete), included in "Copy messages".
  • Walkthrough and exploration errors block the import like compile errors; an incomplete exploration is a warning.
  • Works in the PWA and in lexvm-offline.html (inline worker, or a main-thread fallback that yields between batches).
  • The worker and the exploration code stay out of the main chunk.
  • Update the verification table in docs/architecture.md section 6 and remove the main-thread limitation from SECURITY.md.

Acceptance criteria

  • Importing packages/engine/test/fixtures/runtime/dead-end.yaml shows explore.dead-end with its command path and does not add the pack to the library.
  • A pack whose walkthrough fails is not added to the library.
  • The Cancel button stops a running exploration within one second, and the screen stays responsive while it runs.
  • Import with exploration works in the PWA and in lexvm-offline.html (end-to-end tests for both).
  • The main chunk does not grow.

References

  • apps/web/src/screens/create.ts
  • packages/engine/src/explore.ts
  • packages/cli/src/exploration.ts
  • packages/engine/test/fixtures/runtime/dead-end.yaml
  • docs/architecture.md (sections 6 and 8)
  • docs/adr/0005-forgiving-policy-verified-by-exploration.md
Lenguaje dominante
TypeScript
Estrellas
0
Forks
0
Merge medio
28 min
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nullthrone/lexvm

Todos los issues de nullthrone/lexvm

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.