daemon: the evidence store is one JSON string, so a store over ~512 MB fails every check with 'Invalid string length' (DB subset-dedupe, 6 checks on #133)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
調査の方向性
Start with oracle-gaps/evidence.mjs, where diskStore serializes and reads the entire evidence store, then trace its callers in oracle-gaps/check.mjs and oracle-gaps/daemon.mjs. Choose a storage approach that avoids V8's string length limit. Add the test-only size ceiling and e2e history described in the issue; done means the next daemon check completes when that ceiling is reached.
索引モデルが issue の本文から書いたものです。
説明
Summary
The daemon's evidence store (diskStore, evidence.mjs) writes the whole store as one JSON.stringify string and reads it back as one string. V8 caps a string at about 512 MB, so a store past that size makes every later check end in an internal error:
RangeError: Invalid string length
at JSON.stringify (<anonymous>)
at Object.flush (oracle-gaps/evidence.mjs:98:37)
at checkIn (oracle-gaps/check.mjs:2836:24)
at async Object.check (oracle-gaps/check.mjs:1693:14)
at async oracle-gaps/daemon.mjs:525:20
The CLI reports oracle-gaps: error Invalid string length: a bug in oracle-gaps, not in your oracle and exits 3.
Trace
TanStack DB 21c52a07, packages/db --source src/query/subset-dedupe.ts (559 units), Arca pool tag r133-dbb4-all. Each variant ran a daemon sequence from an empty state: a first check, 3 unchanged rechecks and 3 one-line-edit rechecks.
| CLI | Result | Store size |
|---|---|---|
| main 97a4e7a8 | all 7 checks complete | 425 MB at the end |
| #133 head 9bb7c74a, Vitest cache off | the 3rd edit recheck (the 7th check) fails | 457 MB at the last good flush |
| #133 head, Vitest cache on (every check recomputes all units) | the 2nd unchanged recheck (the 3rd check) and every later check fail | 358 MB at the last good flush |
Composition
A store after 2 checks with the cache on (#133 head): 1,114 rows, 1 variant each. Each variant has about 481 inputs (52 KB of JSON) and a unit payload of about 83 KB.
Of the inputs, 261,508 are fs: keys (41 MB), 118,996 are env: keys (10 MB) and 22,662 are stat: keys. #133's every-read inputs add about 60% to a variant. Main already sits at 425 MB after 7 checks, so main reaches the ceiling a few edits later on the same suite.
Proposed fix (choose one)
- Write and read the store one row per line (JSONL), streamed, so no single string holds the whole store.
- Or store each distinct input list once, by its hash, and have variants name it, since most units share their
env:andnode_modulesinputs. - Or both.
A bound on the store's size is a separate design question. The retention law (bounded retention) covers memory, not this file.
Under P9 the fix needs an oracle-first witness: a test-only knob that lowers the store's size ceiling, so that a constructed e2e history reaches the state with a small store and requires that the next daemon check complete.
Authority
R13 (the daemon is the default) and P10 (an internal error is a CLI defect). Found while measuring #133 for M "Vitest cache off, measured".
This issue was written by Isaac.
- 主要言語
- JavaScript
- スター
- 5
- フォーク
- 1
- 平均マージ
- 11時間 18分
- マージ済み PR(30日)
- 66
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/oracles のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
TanStack/oracles の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
swc-project/swc-next-issues#532 ·
-
domain/checkout Platform(Default) priority/low testing/acceptance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug confirmed css v6
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
check:passed logos:edit
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信