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

test(generators): cover concurrent writes, interruption, and rollback

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js, typescript

調査の方向性

Start with the public create:slice command and its existing black-box tests, then run the relevant checks with npm run check. Cover concurrent generation, interruption, manifest and lockfile rollback, partial paths, cleanup errors, CSS and SCSS, and npm and pnpm without registry access. Done means the acceptance criteria pass, including Windows filesystem behavior and cleanup of temporary fixtures.

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

説明

enhancement help wanted javascript

Problem

JST generators roll back source and manifest changes after dependency-installation failures, but the transaction boundary is not proven under interruption, concurrency, partially existing slices, and rollback failures. These cases can leave a project with source, manifest, and lockfile state that no longer agree.

Scope

Build an adversarial black-box suite for create:slice and the underlying transaction behavior. Fix production behavior only where a failing case proves the current implementation unsafe.

Cover:

  • two concurrent generators targeting the same slice;
  • interruption after source creation and before dependency completion;
  • manifest update followed by installation failure;
  • partially existing target paths;
  • rollback when cleanup itself encounters an error;
  • CSS and SCSS projects;
  • npm and pnpm manifests/lockfiles.

Acceptance criteria

  • Concurrent runs cannot produce a mixed or partially combined slice.
  • Repeating a completed request is either idempotent or fails before writing with an actionable message.
  • Interruption leaves no generator-owned partial files.
  • Source, package manifest, policy manifest, and lockfile behave as one transaction.
  • Rollback never removes or overwrites pre-existing user-owned files.
  • Errors identify the failed transaction stage and preserve the original cause.
  • CSS and SCSS modes are covered.
  • npm and pnpm states are covered without contacting a real registry.
  • Tests account for Windows filesystem and process behavior instead of assuming POSIX rename/signal semantics.
  • Temporary fixtures are removed after success and failure.
  • npm run check passes.

Design constraints

  • Begin with failing black-box tests against public generator commands.
  • Keep transaction orchestration separate from filesystem and child-process adapters.
  • Prefer atomic rename and existing project primitives over a new dependency.
  • Do not serialize all generator work globally; locking must be scoped to the affected project/slice.

Out of scope

  • A long-running generator daemon.
  • Distributed locks across machines.
  • Changing generated slice architecture or adding new slice kinds.

Validation

npm ci
npm run check
主要言語
JavaScript
スター
1
フォーク
0
平均マージ
21時間 30分
マージ済み PR(30日)
16

環境構築

はじめの一歩

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

似ている issue

JavaScript の issue をもっと見る

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

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