about summary refs log tree commit diff
path: root/tests/search_native_dev_corpus.rs
AgeCommit message (Collapse)Author
2026-10-08Merge origin/main (54f1388): page, publish annotations, publications route.Alexander_Kabui
Composes the new main above the search engine seam: * src/routes/search.rs (page): parsed and threaded through the seam; the gn3 forwarder passes page to gn3 unsorted (sorted fetches the wide first page), the native engine takes the mset window. Ranked pages slice the sorted list, as before. * src/routes/search.rs (add_publish_annotations): enrichment now fills locus and abbreviation in one PublishXRef/Phenotype lookup. * src/search/mod.rs (Engine::search): page parameter; SearchHit gains abbreviation and pubmed_id (gn3's future fields flow via extra, as before). * src/db.rs (LRS_PER_LOD): 4.604 — lod shifts accordingly everywhere. All 34 test binaries green; parity replay and shape gates pass against the dev index with the new lod constant (grading compares identifier sets, not lod); page disjointness, abbreviation and locus verified live (native engine, dev index, SQL_URI set).
2026-10-07tests/search_native_dev_corpus.rs: the dev-floor corpus recorder (dev-oracle)Alexander_Kabui
Records all 54 shapes from the DEVELOPMENT index through the NATIVE engine — the same parser configuration as src/search/native.rs by construction, because it IS that engine — producing a full dev corpus in the production recordings' format: JSON arrays of hit bodies for match shapes, gn3-style {"error", "error_type"} diagnostic objects for the error shapes (the typed payloads from C3.7), and [] for the surface shapes (an empty query parses to an empty query and matches nothing, which is what gn3 recorded for them too). No-drift discipline: the shape table is parsed from the harness source itself (include_str!("search_parity.rs"), a quote-aware scanner that handles rustfmt's multi-line rows and the parenthesized Q46 query), and the recorder FATALs on any class/outcome mismatch and on any hit lacking the (dataset, name) strings the parity comparison — and the committed reduce_fixtures.py — require. Env-gated on XAPIAN_DB_PATH + GN4_DEV_CORPUS_DIR; skips loudly otherwise so hermetic runs stay green. The corpus itself lives OUT of git at ~/spikes/port-execution-r2/dev-corpus/{full,reduced} + README.md (the numbers are DEV-TRUTH on the 2025-02-18 public data, not production counts — the README says so and every run's fixture_dir points at it), like the 105 MB production full corpus. Gate evidence (~/spikes/port-execution-r2/logs/): recording RECORD_EXIT=0, 54/54 with per-shape dev counts printed (devcorpus-record.log; e.g. Q01 alcohol=2330 dev vs 1197 production, Q32 position=1, Q53 position:=1017, Q42 recorded as its typed diagnostic); reduce via the committed reduce_fixtures.py 128,068,128 B -> 5,237,910 B (4.1%); the DEV FLOOR as a separate report (GN4_PARITY_FIXTURES at the reduced dev corpus, GN4_PARITY_REPORTS at logs/dev-parity-reports; the production corpus untouched): DEV_FLOOR_EXIT=0, 54/54 PASS, FLOOR: PASS, min J = 1.000 (clause-b over the 26 dev shapes with >= 10 dev hits — dev-truth, not a production count). FULL pinned cargo test --release EXIT=0 (31 suites, the recorder skips hermetically). rustfmt --edition 2024 clean.