oracle-gaps: a mutant's outcome can depend on its batch (setup-error in a full run, killed with --only)

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

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

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

評価

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

調査の方向性

Start with capture-setup.mjs, which resets the module registry and deletes new globals between copies but does not restore existing builtin prototypes. The report IDs in the issue (2026-11-12T23-35-42-301Z-3e2c4991 and the --only replay 2026-11-12T23-37-41-738Z-d866fd67) show the same mutants changing outcome with batch composition. Done means a deterministic witness in which one mutant's outcome depends on an earlier mutant in the same worker, and a fix that makes --only and full runs agree. Expect to ask the maintainers how to pin batch order first.

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

説明

Summary

In one onboarding run (klona, r20), two mutants were reported as setup-error in a full gap check, but a replay with --only killed both of them. A mutant's outcome must not depend on what else is in its batch: --only must give the result that the full run gives.

Evidence (unverified, from the r20 session)

  • Repository: /tmp/oracle-validation/r20/codex-klona/repo. The notes are in oracles-feedback.md, beside the run log.
  • Full run report 2026-11-12T23-35-42-301Z-3e2c4991: JSON mutants M21 and M22 were setup-error, with Spread syntax requires ...iterable[Symbol.iterator] to be a function. Production was unchanged and every baseline test passed.
  • An isolated replay right afterwards, --only json.js:M21,json.js:M22 (report 2026-11-12T23-37-41-738Z-d866fd67), killed both under the law array slots.
  • A full replay with the fork pool reproduced the setup errors (report 2026-11-12T23-38-22-238Z-fd6a91f0), so worker isolation did not change the result.
  • In two later complete runs, the discrepancy did not recur.

Hypothesis (not confirmed)

The cause is global state carried from one copy to the next. Each copy resets its module registry and deletes the global names that the worker did not have at first (capture-setup.mjs). It does not undo changes to existing builtins, such as a property written on Array.prototype or Object.prototype. Klona's pollution-safety laws show that its mutants can write there. A polluting mutant that runs earlier in the same worker would then break a later copy's module load or setup (...iterable[Symbol.iterator]), which is reported as a setup-error that --only does not reproduce.

This is a different mechanism from the copy-path seed defect fixed in the follow-up PR for #48 (each copy seeded Math.random by its copy path). That defect affected every copy, so --only would show it too.

What a fix needs

  • A witness in which a mutant's outcome changes with batch composition. It needs two mutants in one worker, in a known order, with the first writing to a builtin prototype. The runner's scheduling does not fix that order today, so a deterministic witness may need a way to pin a batch.
  • Then, possibly: snapshot and restore builtin prototypes between copies, or run each copy that writes to them in a fresh worker.
主要言語
JavaScript
スター
5
フォーク
1
平均マージ
8時間 31分
マージ済み PR(30日)
60

環境構築

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

はじめの一歩

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

TanStack/oracles のほかの issue

TanStack/oracles の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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