/** * Pass-1 extraction worker entry (change: optimize-parallel-extraction-pool). * * One instance of this module runs per pool worker. It holds this thread's own * tree-sitter parser and grammar singletons (the module-level caches in * `call-graph.ts` are per-module-registry, so a worker thread gets its own set for * free) and answers one request at a time: * * parent → { type: 'extract', id, file } worker → { type: 'result', id, value } * | { type: 'failed', id, message } * * It contains NO extraction logic of its own — it calls the same `dispatchFileExtract` the serial * lane calls. That makes the two lanes share one EXTRACTOR; it does not by itself make their * answers identical, and claiming it did was overstated (change: * fix-recheck-failed-worker-extractions). Everything around the call differs: this thread loads its * own grammars, and the answer has to survive a structured clone back to the parent. A grammar that * resolves on the main thread but not here, or a fact object that will not clone, produces a * different answer from identical code on identical input — which is why nothing this thread * reports as a FAILURE or as an unproven SILENCE is taken as the file's verdict. Lane equivalence * is a property the parent enforces by re-checking those answers on the main thread, not a property * this file can assert on its own. See `extraction-pool.ts`. * * Two honesty rules are implemented here: * * - **Startup probe.** The extractors return an empty result (they do not throw) when a * grammar cannot be loaded, so a worker whose bindings failed would silently contribute * nothing to the graph. Before accepting work this thread parses a known-good snippet in * the language the parent named and requires the expected node and edge; a worker that * cannot do that reports itself `unhealthy` and is dropped. This is a FAST-FAIL, not the * guarantee: it covers one language, and the pool's per-language unproven-silence guard * is what actually makes an empty result trustworthy. * - **Log relay.** Worker diagnostics must not interleave with the parent's spinner or * write to stdout while it is carrying JSON-RPC. The logger is therefore redirected * to the parent, which dedupes repeated messages across the pool. */ /** * Probe sources, per language: one function containing one call — the minimum that proves a * real parse produced both a node and an edge. * * The parent picks which language to probe from the build's OWN files, because every * grammar is an optional dependency: probing TypeScript in a Python repo could disable the * pool over a grammar that repo never needed. A language absent from this table simply * skips the probe — the per-language unproven-silence guard in the pool still covers it, * so the probe is a fast-fail optimization, never the sole line of defense. */ export declare const PROBES: Record; //# sourceMappingURL=extraction-worker.d.ts.map