oracle-property: the History line is capped at 2000 characters, so a failing history cannot be filed in full

未关闭
#185 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
testing

调研方向

Start with packages/oracles/src/oracle-property.ts and inspect reportText plus the failure output that prints the History: and replay lines. Check how the framework handles histories that cannot be shrunk back, especially fixed, constructed entries, and canShrinkWithoutContext. Done means full histories are retained in CI output, replay output names the history being replayed, and the history replay gap is addressed here or tracked in a linked issue.

由索引模型根据 Issue 内容生成。

描述

reportText in packages/oracles/src/oracle-property.ts caps every printed value at 2,000 characters:

function reportText(value: unknown): string {
  try {
    return encodeData(value, ``, `report`).slice(0, 2000)

The History: line of a failing oracle uses reportText, so a failing history is truncated. The CI log for the #184 failure (run 44588135077, job "random seed, 3/4") cuts the history at 2,000 characters, so the full history cannot be recorded from CI.

Why it matters: M, "Replay by history" (register 2026-11-16) says a filed counterexample records its full history, not only its seed. Replay and base-replay attribution run that exact history. With this cap, the filed history for #184 (random seed: a daemon pause that cannot engage, seed -1120189360) is incomplete in CI output. A local scratch edit that removes the cap printed the full 3,593-byte history (83 keys), which is how #184 was captured.

Needed: print the full history in the failure (the cap removed, or a separate full-history line that the CI log keeps), and have the replay line name the history it replays. Separately, a history that the arbitrary cannot take back is rejected by fixed and by constructed entries (canShrinkWithoutContext is false), so a captured history cannot yet be replayed by history through the framework's own entries. That is a second gap for the same replay rule and should be covered here or in a linked issue.

Related: TanStack/oracles#184.

主要语言
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 摘要。