Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#22 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript, web-dev
領域
frontend, testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
0
フォーク
0
平均マージ
28分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nullthrone/lexvm のほかの issue

nullthrone/lexvm の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。