Scope: this document owns the darwin harness for the PixelRAG Rust port (ADR-264), not the crates. It explains how
@metaharness/darwinevolves the harness parameters toward the best(recall × memory)Pareto frontier, why the harness is removable (ADR-256), and the known blockers.
Darwin freezes the Rust source code and algorithm and evolves only the
harness parameters declared in .metaharness/bench.json → evolveParameters:
| Parameter | Axis | Default (M1 harness) |
|---|---|---|
index_backend |
ruvector-core HNSW vs ruvector-rairs IVF-SQ |
hnsw |
batch_size |
tile-embedding batch | 32 |
embedding_cache_mb |
LRU tile-embedding cache | 100 |
rerank_threshold |
score cutoff to fire the optional rerank | 0.0 (off) |
quantization |
none / 4-bit (rabitq) / 3-bit / 2-bit (turbovec, M2+) |
4-bit |
Each candidate config is scored on the ViDoRe SUBSET fixture
(tests/fixtures/pixelrag/) by the pixelrag-cli benchmark subcommand, which
emits recall@10 / NDCG@10 / MRR plus search p99 and memory/doc. Pass criteria pair
a quality floor (recall@10 >= baseline.recallAt10 - baseline.epsilon) with a
resource budget (search p99 + memory/doc), exactly as ADR-264 §Validation
specifies. Darwin returns a Pareto frontier of (config, metrics) trading
recall against memory.
Run from the repo root (C:/Users/ruv/ruvector). The suite must build first —
see Blockers.
Suite integrity (important). darwin bench create . stamps a taskHash
over the suite; darwin bench verify rejects any hand-edited suite as
"tampered". Therefore .metaharness/bench.json must be darwin-generated, not
hand-authored. The hand-enriched 6-task/5-param version is kept as
.metaharness/bench.enriched.json for reference only (it does NOT pass
bench verify). Verified canonical suite:
npx -y @metaharness/darwin@latest bench create . # writes valid .metaharness/bench.json
npx -y @metaharness/darwin@latest bench verify ./.metaharness/bench.json # => hash OKDrive the port toward the best (recall × memory) frontier (real CLI surface — objectives/constraints live in the suite tasks, not as flags):
npx -y @metaharness/darwin@latest evolve . \
--bench ./.metaharness/bench.json \
--selection pareto \
--generations 20 \
--children 12 \
--seed 42 \
--sandbox real \
--mutator deterministic--selection paretokeeps the non-dominated(recall, memory)set rather than a single scalar winner.--sandbox realactually runs the bench per candidate;mockdry-runs the loop.evolvemutates the repo via its mutator — run it on a clean/committed tree so changes are reviewable; nothing in the Rust runtime reads darwin output automatically (removable, ADR-256).
To score a single configuration without evolving, run the project's own harness
directly (there is no darwin bench run subcommand):
cargo run -p pixelrag-cli -- benchmark \
--ground-truth tests/fixtures/pixelrag/ground-truth.json \
--queries tests/fixtures/pixelrag/queries.json \
--metrics ndcg,mrr,recall@10The harness is fully removable. Guarantees:
- The port builds, indexes, and searches without darwin using
Config::default()(HNSW, batch=32, cache=100MB, rerank off, 4-bit). The M0 build gate (task-0001) only callscargo build— no darwin dependency. - Darwin output is read-only.
genome.pixelrag.jsondoes NOT control the Rust runtime via env vars or APIs. A human optionally transcribes a chosen config intoConfig::from_darwin_json(path); if that load fails, the code falls back toConfig::default()(ADR-264 coding rule). - Packaging excludes darwin. Docker / binary release ship the crates only;
.metaharness/and@metaharness/darwinare dev-only and can be deleted with zero impact on the shipped library.
These gate a real darwin evolve run (the M0 deliverable is the suite +
fixtures + this doc, all offline-clean):
- M1 encoder weights / GPU. True scoring needs the Qwen3-VL-Embedding-2B
encoder (or a CLIP ONNX surrogate) and likely a GPU. Until M1 lands the
encoder, the fixtures exercise harness plumbing only — recall numbers are
placeholders, and
bench.json.baselineis all zeros ("to measure"). - Corpus out of scope. The upstream Wikipedia index is 8.28M pages / ~217G
and full ViDoRe is 495 docs / 5,191 questions. This bench uses a 6-tile / 5-query
SUBSET (
tests/fixtures/pixelrag/) — explicitly NOT the upstream corpus. Do not commit the 217G index. - CrowdStrike on this Windows host. Freshly built bench binaries are sometimes
killed by CrowdStrike before they run (see user memory: "Windows environment
traps"). Allowlist
target/release/pixelrag-cli*or run the evolve loop on a non-CrowdStrike host / CI shard. - Buildable repo + suite required first.
darwin evolvecannot score a tree that does not compile. The M0 crates areunimplemented!()skeletons, sotask-0001(build gate) passes but the benchmark tasks (task-0002…0006) will not produce real metrics until M1 fills in the encoder + index adaptor. - 2/3-bit quantization is conditional on ADR-254.
quantizationvalues2-bit/3-bitneedruvector-turbovecFastScan, which is proposed, not shipped. Until then onlynoneand4-bit(rabitq) are valid intask-0006.
.metaharness/bench.json— the enriched darwin suite (5 evolve params, 6 tasks).tests/fixtures/pixelrag/— the subset fixture (tiles + queries + ground truth).- This file — invocation, removability, blockers.