# Coverage Report

Generated: 2026-10-26
Toolchain: `.moonbit-version` (moonc v0.10.17+d971670cd)
Command: `moon coverage analyze`
Target: wasm (default)

## Current snapshot

The 61 MoonBit tests pass on wasm, wasm-gc and js. The wasm instrumentation report
contains **84 uncovered lines in 8 files**. This is an uncovered-line count, not a
branch-coverage percentage or proof that the algorithm is complete.

| File | Uncovered lines |
| --- | ---: |
| zxcvbn.mbt | 1 |
| scoring.mbt | 6 |
| feedback.mbt | 9 |
| matching.mbt | 18 |
| cmd/main/main.mbt | 45 |
| frequency_lists.mbt | 3 |
| adjacency_graphs.mbt | 1 |
| demo/web/zxcvbn_web.mbt | 1 |
| **Total** | **84** |

## What is and is not verified

JSON escaping now round-trips all U+0000..U+001F control characters, quotes,
backslashes and non-BMP text through a JSON parser. Tests also cover non-finite
number encoding, overflowing crack times, effective reference-year defaults and
feedback array isolation. The report lists no uncovered lines in json.mbt.

Remaining gaps include the public convenience wrapper and factorial helper,
DP fallback paths, date/sequence/matching helpers, feedback branches and data
lookup helpers. These have not all been proven unreachable or defensive; further
input-driven tests are useful. The earlier assertion that no core algorithm
branches were uncovered was unsupported and is withdrawn.

The Python CLI/performance/differential tests and Node demo test run separate
processes against the compiled JS artifacts. Their execution is not merged into
this wasm line-coverage snapshot. In particular, the CLI and web export entries
above do not mean those paths lack integration tests.

## Reproduce

```bash
moon coverage analyze > uncovered.log
bash demo/build.sh
python -m unittest discover -s tools -p 'test_*.py'
node --test tools/test_demo.mjs
npm ci --prefix tools/ref
python tools/diff_test.py --no-report
```

Coverage line numbers and totals change when source or toolchain versions change.
Regenerate the report before relying on this snapshot for a later revision.
