daemon inputs: appends, partial and failed writes hide a file's earlier content; the runner-file rule matches users' paths

Abierto
#154 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, node.js
Área
testing, tooling

Línea de trabajo

Start with inputs.mjs and trace how appendFile*, r+, and open flags are recorded; check the CLI's inject path for passing the session pid and home to the harness. Use the described appendGate oracle, where file b appends to tests/gate.json and parses the whole file. Done when prior file content remains an input for append and r+, failed writes do not count as writes, and the runner-file rule matches the session's real pid and home.

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

Descripción

Findings (review of #133, F9 and F10; both plausible, LOW).

F9. An append, a partial write, or a failed write hides a file's earlier content.

  • inputs.mjs counts appendFile* as a write and records the write before the call.
  • So in these cases the rest of the file is an input that is never recorded:
    • a test appends to a fixture that already exists, then reads it;
    • a test writes with { flag: 'r+' };
    • a test catches a failed write (to a read-only file), then reads the existing file.
  • Plan:
    • Record a read first for an append and for r+.
    • Record the write only after the call succeeds; for the async forms, when its promise or callback resolves.
    • The same applies to #141's open-flag rule (a keeps the earlier content, so it is a read too).
    • Oracle: a gate kind appendGate, in which file b appends to tests/gate.json and parses the whole file. The edit changes the part that was already there.

F10. The runner-file rule matches users' paths.

  • /\/\.oracle-gaps-\d+[-/]/ also matches a user's file named .oracle-gaps-<digits>-….
  • The fix matches the session's real pid and home, which the CLI already knows and can pass to the harness through inject.

Authority: R46, G42, I8 (v21.2), and M 2026-11-17 "Own writes aren't inputs", whose scope is the writer's own output only.

Lenguaje dominante
JavaScript
Estrellas
5
Forks
1
Merge medio
11 h 18 min
PR fusionados (30 d)
66

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 TanStack/oracles

Todos los issues de TanStack/oracles

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.