Gap CLI: a partial or daemon run can draw other drawn bases than a cold run without --seed

未關閉
#155 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript, node.js
領域
testing

研究方向

Start with src/oracle-config.ts and oracle-gaps/capture-setup.mjs, then find the gap CLI paths for cold, partial, and daemon checks. First reproduce the mismatch with a property whose history has drawnBases and no --seed; the issue says the repository’s current gap e2e and self-oracles do not provide a suitable witness. Done means a gap report establishes whether the drawn bases differ and, if they do, the CLI produces order independent bases.

由索引模型根據 Issue 內容生成。

描述

In the gap CLI, a property's drawn bases (#122, histories.drawnBases) can differ between a cold whole-file run and a partial or daemon run, when the CLI runs with no --seed. Found by reading (review of #122, round 2, G6). It is not reproduced yet.

  • Where R comes from: a fixed-seed constructed unit draws its drawn bases from R + k. R is the run's random seed: the first unit that uses it draws it from Math.random, through oracleCampaignSeed (src/oracle-config.ts).
  • The capture: it seeds Math.random per test, by the test's key (oracle-gaps/capture-setup.mjs, installRandom). So R is a function of which test is the first to call runSeed in that process.
  • The failure: in a cold whole-file run, that is the property's first drawing fixed-seed unit. If a partial run, a daemon check, or a batch copy runs a set of tests whose first drawing unit is a different one, it draws another R. A later unit's drawn bases then differ from the baseline's. Then:
    • unchanged code can read as changed (a false kill, or not-judged);
    • a verdict on a drawn base can be credited on the fixed seed route (a reproducible route, P3, G2, I8) when a cold run doesn't repeat it.
  • Not affected: with --seed, ${envPrefix}_SEED fixes R in every run, and the drawn bases are the same.
  • In this repository today: the gap e2e oracle and the self-oracle draw bases (1 each, and the e2e oracle draws none on win32). No oracle that the gap CLI judges in CI draws bases.

Ask, oracle-first:

  1. A gap-report witness: a property with drawnBases, judged cold and through the daemon (or partially) with no --seed. It should show whether the classes match.
  2. If they differ, a fix that makes R independent of test order inside the CLI. For example, the CLI could always set ${envPrefix}_SEED for a check, choosing and printing one when --seed is absent. Or it could seed oracleCampaignSeed's draw from the property id rather than from the first test's key.

This issue was written by Isaac.

主要語言
JavaScript
星號
5
分支
1
平均合併
11 小時 18 分鐘
30 天內合併 PR
66

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TanStack/oracles 的其他 Issue

查看 TanStack/oracles 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。