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

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

Cerrado
#36 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, node.js, typescript

Línea de trabajo

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.

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

Descripción

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
Lenguaje dominante
JavaScript
Estrellas
1
Forks
0
Merge medio
12 h 37 min
PR fusionados (30 d)
23

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.

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.