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

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, node.js
領域
testing, tooling

調査の方向性

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.

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

説明

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.

主要言語
JavaScript
スター
5
フォーク
1
平均マージ
11時間 18分
マージ済み PR(30日)
66

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

TanStack/oracles のほかの issue

TanStack/oracles の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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