• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 44268867747
78%
main: 80%

Build:
Build:
LAST BUILD BRANCH: rewrite/main
DEFAULT BRANCH: main
Ran 18 Nov 2026 08:43AM UTC
Jobs 2
Files 321
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Nov 2026 08:39AM UTC coverage: 77.588%. Remained the same
44268867747

push

github

web-flow
fix(storage): terminate terms in events_by_term for true equality ranges (#1166)

## Description
Terminates the term in `events_by_term` keys with a `0x00` delimiter
byte (`term ‖ 0x00 ‖ event_id`). In `term_range`, the bounds now use
`low = term ‖ 0x00` and `high = term ‖ 0x00 ‖ 0xff×32`. This turns
exact-term ranges into true equality ranges rather than prefix ranges,
preventing queries from proposing postings for longer tokens that share
the first term's prefix bytes.

Bumps `SEARCH_INDEX_VERSION` from `1` to `2` to trigger an index rebuild
on open for existing LMDB stores.

## Related Issue
Closes #1112

## Motivation and Context
Previously, a one-term query for `"a"` proposed every posting sharing
the first byte (414 candidate postings on the fixture corpus for 49
matches). Longer tokens like `"apple"` fell inside `[term_bytes,
term_bytes ‖ 0xff×32]` because ASCII/UTF-8 characters sort before
`0xff`.

With the delimiter in place, longer tokens have a non-zero byte at the
delimiter position, which sorts strictly after `0x00`, isolating
candidate postings strictly to exact matches.

## How Has This Been Tested?
- Added integration test
`candidate_count_equals_match_count_for_one_term_queries` in
`crates/nostream-storage/tests/parity_lmdb.rs` validating candidate
counts equal match counts over the fixture corpus (`"a"`: 49, `"c"`: 2,
`"bit"`: 1).
- Passed full test suite: `cargo test -p nostream-storage
--all-features` (141 unit tests + 47 parity tests).
- Passed `cargo fmt --all --check`.
- Passed `cargo clippy --workspace --all-targets --all-features -- -D
warnings`.
- Passed strict clippy (`-D clippy::unwrap_used -D clippy::expect_used
-D clippy::todo -D clippy::unimplemented -D clippy::panic`).
- Tested clean build with `--no-default-features` and `--release`.

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that wo... (continued)

4502 of 6342 branches covered (70.99%)

Branch coverage included in aggregate %.

9792 of 12081 relevant lines covered (81.05%)

761.07 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Integration - 44268867747.1 18 Nov 2026 08:43AM UTC 321
33.0
GitHub Action Run
2 Unit - 44268867747.2 18 Nov 2026 08:44AM UTC 321
75.03
GitHub Action Run
Source Files on build 44268867747
  • Tree
  • List 321
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #44268867747
  • 3c33eb64 on github
  • Prev Build on rewrite/main (#44215275298)
  • Next Build on rewrite/main (#44434662934)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc