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

cameri / nostream / 45316456247
78%
main: 80%

Build:
Build:
LAST BUILD BRANCH: rewrite/main
DEFAULT BRANCH: main
Ran 24 Nov 2026 03:04AM 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

24 Nov 2026 03:00AM UTC coverage: 77.582%. Remained the same
45316456247

push

github

web-flow
feat(import): prove the element scanner with Kani (#1238)

## What

The scanner that finds where a JSON array element ends has produced the
two faults this reader has had — an element spanning several reads
parsed once per read (`#1235`), and a malformed *scalar* buffering 4 MiB
before anything looked at it. Both were found by review. Neither is
reachable by a test that enumerates cases.

`crates/nostream-scan` extracts `ElementEnd` and `ends_scalar` verbatim
from `nostream-services`, with **no dependencies** on purpose: Kani
builds every dependency of the crate it verifies, and verifying in place
would spend minutes compiling tokio, reqwest, sqlx and secp256k1's C
sources to reason about 130 lines of state machine. The reader remains
the only caller, so there is no copy to drift.

Five harnesses, gated on `cfg(kani)`, beside the code in `proofs.rs`:

| harness | property |
|---|---|
| `any_bytes_never_panic` | all 2^32 four-byte inputs; the reader
indexes a buffer with the offset this machine produces |
| `a_scalar_is_probed_on_the_same_schedule` | the regression: an
unfinished scalar past `FIRST_PROBE` is handed to the parser |
| `the_probe_schedule_only_advances` | the threshold **doubles** (a
stalled reader cannot re-parse), only moves forward, and a probe is due
exactly at it |
| `resume_past_a_scalar_advances` | the reader cannot spin on one
delimiter |
| `a_second_pass_examines_nothing_new` | work is linear: a repeat pass
examines none of the bytes again, and `visits <= scanned + 1` across
calls |

## Evidence

- `cargo kani -p nostream-scan` → **5 successfully verified harnesses, 0
failures**, 0 of 246 checks failed, ~0.6 s.
- `cargo test -p nostream-services --lib` → 32 passed, the seven import
tests included. `cargo fmt --all --check` clean, `cargo check
--workspace --all-targets` clean with no warnings.
- **The proofs can fail**, checked for each:
- pre-fix state machine (`probe_due` returning `false` for scalars) →
`an unfinished scalar pa... (continued)

4501 of 6342 branches covered (70.97%)

Branch coverage included in aggregate %.

9792 of 12081 relevant lines covered (81.05%)

763.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Integration - 45316456247.1 24 Nov 2026 03:04AM UTC 321
32.99
GitHub Action Run
2 Unit - 45316456247.2 24 Nov 2026 03:05AM UTC 321
75.03
GitHub Action Run
Source Files on build 45316456247
  • 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 #45316456247
  • dcf0259e on github
  • Prev Build on rewrite/main (#45281051362)
  • Next Build on rewrite/main (#45890561896)
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