about summary refs log tree commit diff
path: root/test/python/server_test_case.py
diff options
context:
space:
mode:
authorAlexander_Kabui <alexanderkabua@gmail.com>2026-10-07 22:59:17 +0300
committerAlexander_Kabui <alexanderkabua@gmail.com>2026-10-07 22:59:17 +0300
commit9a76f1c7b855ace11de51d1e625fe4205f0096af (patch)
tree6844a11696c3328686f08f0c26519de0bd1dc9bf /test/python/server_test_case.py
parent8568928775e82a65942e191f957789848f61569d (diff)
downloadgenenetwork4-9a76f1c7b855ace11de51d1e625fe4205f0096af.tar.gz
src/search/native.rs (native engine): register the position/pos processor (C3.5)
The gn3 SI-suffix FieldProcessor on slot 2 (search.py:237-241), for both
the `position` prefix and its `pos` alias, sharing one processor type
(each registration Box::leaks its own instance inside the binding; the
one-per-process parser absorbs that).

Ported faithfully from search.py:136-165:
- apply_si_suffix (136-142): trailing k/m/g (case-insensitive) multiply
  by 10^3/6/9; an UNSUFFIXED value must be an integer (`int(location)`)
  — `position:1.5` declines exactly where gn3 raises ValueError.
- parse_position (145-155): a `..` spec is a range with either side
  optionally empty; a point expands to +/-50 000 bases clamped at 0.
- the slot-2 query (158-165): sides convert bases->megabases and keep
  gn3's one-sided C++ NumberRangeProcessor semantics (VALUE_GE /
  VALUE_LE for an empty side, measured identical to the bridge forms);
  the degenerate both-empty range is MatchNothing (binding-report R3's
  documented ("","") divergence, no production shape).

AMENDMENT A verified end-to-end: the fork's decline->MatchNothing bridge
(aa915af) is IN the dependency and behaves as documented — an
unparseable spec (`position:abc`) parses to an empty-match query and
serves 200 with 0 hits (POSABC gate row, dev index), never an <INVALID>
leaf, never a process abort; `position:abc OR alcohol` keeps its real
OR arm (xapian documents MatchNothing as boolean false). The
registration-only job was the lane's plan; no re-fixing of the library.

Q53 `position:` never reaches the processor (empty value -> free text,
recorded production 200 with 576 hits; dev reference count printed).

Gate evidence (~/spikes/port-execution-r2/logs/c35-*): hermetic pins
green (21 lib tests — slot-2 VALUE_RANGE/VALUE_GE/VALUE_LE forms, SI
case-insensitivity, point clamp, decline matrix incl. MatchNothing OR
semantics); shape-CLASS gate 49/49 cumulative vs the dev index
(Q32=1, Q33=2, Q34=1 dev gene hits at 1.05-1.06Mb/7.45-7.55Mb, Q53=1017
free-text hits, POSABC=0 — dev counts REFERENCE ONLY per AMENDMENT B).
rustfmt --edition 2024 clean on the touched files.
Diffstat (limited to 'test/python/server_test_case.py')
0 files changed, 0 insertions, 0 deletions