daemon inputs: reads from a test's worker threads and child processes are no input yet
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, node.js
Rechercherichtung
Start with packages/oracles/oracle-gaps/inputs.mjs (watchReads) and how capture-setup.mjs records reads; compare that with the CLI path in check.mjs. The issue gives an oracle-first sequence: add childRead and workerRead gates and histories, then run the named Vitest command and shard 4. Done means child and worker reads reach the copy's reads, the regression history passes against a cold run, and the mutant check fails only for that history; the non-Node child behavior still needs a maintainer ruling.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Family: reads from a test's worker threads and child processes. The recorder runs in the Vitest worker only (capture-setup.mjs). A new Worker(...) or child_process.spawn/fork/exec started by a test reads files and variables in another thread or process, and none of those reads is an input. Today a test that spawns a child does make env:* and every variable an input, because spawning lists the environment. The child's own fs reads are missing.
Gate kinds childRead and workerRead: file b runs spawnSync(process.execPath, ['-e', "process.stdout.write(require('fs').readFileSync(<gate path>, 'utf8'))"]) and parses its stdout. The workerRead kind does the same through new Worker(..., { eval: true }) and receiveMessageOnPort. The edit changes only tests/gate.json.
Fix (larger): inject the recorder into the child and the worker, and carry their reads back into the copy's reads.
- Children: wrap
child_processspawn calls in the worker so that a Node child gets--import <session>/inputs-child.mjsthroughNODE_OPTIONS. That module callswatchReadsand appends{ key, hash }rows to a file named by anORACLE_GAPS_CHILD_READSvariable. The copy merges those rows before its closing row. A non-Node child (a shell, a binary) cannot be watched. Such a run has to be treated as reading everything, which is not reusable: it is stored under a key that never matches, so the daemon recomputes it, the conservative choice. This needs a maintainer ruling on whether that cost is acceptable. - Workers: Node
WorkertakesexecArgvandenv. Do the same with aMessageChannel, or with the same rows file. - Cost to measure:
NODE_OPTIONSreaches grandchildren too. The rows file needs the torn-row care from #83.
Authority: maintainer decision M 2026-11-16 "Every read is a daemon input" (the user ruled it with no exceptions), v21.2 R46, G42, I8. The watch family (watch, watchFile) stays no input (C-19).
Context: #133 records the six #55 fs calls on any path, node_modules included, plus environment variables, plugin inputs and directory listings (readdir/opendir, dir:/dirs: keys). The recorder is packages/oracles/oracle-gaps/inputs.mjs (watchReads), shared by the worker (capture-setup.mjs) and the CLI process (check.mjs). Keys are hashed by inputHash and looked up through servedHash. This family is still unbuilt, so I8 does not hold for it.
Oracle-first plan (the pattern from #133):
- Add a value to
inputRead(drawn, appended; update the canary'sinputReadline) and one constructed history appended at the end, with steps[inputGate, recheck]. It entersedit inputGate changed the cold result,an edit to the <kind> gate input changed the cold resultandan unchanged check through the daemon computed nothing. Add it toscripts/pr-shards.mjsshard 4 (and a Windows shard) and toscripts/e2e-shards.mjs. - RED: run
pnpm exec vitest --run --config oracle-gaps/vitest.config.mjs gap-report-oracle -t "fixed seed 20261105: <name>"on the oracle-only commit. Expectincremental equals cold: "after inputGate, the daemon's report differs from the cold run's", with the daemon reusingkilledwhere the cold run sayssurvived. - Fix in
inputs.mjs(see below), then show GREEN on shard 4. - Mutant: remove the new wrapper or key from
watchReads. Only this history should fail.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 5
- Forks
- 1
- Ø Merge
- 8 Std. 31 Min.
- Gemergte PRs (30 T.)
- 60
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TanStack/oracles
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 46/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in TanStack/oracles
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Edit: Telemante [YT]Offenchannels:edit check:passed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
swc-project/swc-next-issues#490 ·