Run the state-space exploration on pack import in a Web Worker
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
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
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,
exploreandestimatePlaytime, 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.incompleteas 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-endwith 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nullthrone/lexvm
-
area: web good first issue priority: low type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nullthrone/lexvm#49 ·
-
area: infra good first issue priority: low type: chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nullthrone/lexvm#41 ·
-
area: engine good first issue priority: low type: feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
nullthrone/lexvm#27 ·
-
area: web priority: low type: research
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
nullthrone/lexvm#63 ·
-
area: infra area: web priority: medium type: chore
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
nullthrone/lexvm#62 ·
Todos los issues de nullthrone/lexvm
Issues similares
-
New icon: `filter-clear`Abiertocalcite-ui-icons enhancement impact - p3 - not time sensitive needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Esri/calcite-design-system#15467 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
diegosouzapw/OmniRoute#18390 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
guilhermerodz/input-otp#157 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
davidjerleke/embla-carousel#1414 ·
Los mantenedores suelen responder en 4 días