pub async fn worker_extraction_version(
bin: &Path,
timeout: Duration,
) -> Option<u32>Expand description
Ask the worker binary at bin which extraction format it produces, giving
up after timeout.
The worker is a separately installed binary, so a caller’s own
EXTRACTION_VERSION says nothing about
what actually parses: a new CLI driving an old worker emits pre-upgrade
extraction while believing it emitted current data (#228). This is how the
caller finds out instead of assuming.
None means unknown, never agreed. It covers every way the answer can
fail to arrive — the binary is missing or not executable, it exits non-zero,
it prints something unparseable, it hangs, or it is a pre-#228 worker that
ignores argv and blocks on stdin (the probe closes stdin, so such a worker
exits silently). A caller must treat None as a version that cannot match.