test(proptest): expand property suite to 8 tests across binary/XML/JSON#103
test(proptest): expand property suite to 8 tests across binary/XML/JSON#103
Conversation
Adds four structural-invariant properties over the emitted ISO 2709 bytes (leader length, directory tiling, indicator byte set, subfield code shape) plus MARCXML and MARCJSON round-trip properties that exercise format-specific escaping edge cases. Broadens arb_record to cover zero-control-field and zero-data-field records. Caps runtime with ProptestConfig::cases = 64 (suite runs in ~3s locally). Removes stray commented proptest line from Cargo.toml [dependencies]. Surfaced a MARCXML whitespace-stripping bug (bd-zm6m): single-space control values don't round-trip through quick-xml. Narrowed the XML strategy to exclude whitespace-only values pending the fix. Bead: bd-ouji Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merging this PR will degrade performance by 35.39%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | test_threaded_reading_4x_10k |
692.2 ms | 895.7 ms | -22.71% |
| ❌ | WallTime | test_threaded_reading_4x_1k |
66 ms | 85.7 ms | -22.95% |
| ❌ | WallTime | test_threaded_reading_1k |
20.8 ms | 25.6 ms | -19.02% |
| ❌ | WallTime | test_sequential_2x_reading_10k |
133.5 ms | 157.3 ms | -15.12% |
| ❌ | WallTime | test_sequential_2x_reading_1k |
12.9 ms | 15.6 ms | -16.79% |
| ❌ | WallTime | test_sequential_10k |
66.2 ms | 78.6 ms | -15.88% |
| ❌ | WallTime | test_threaded_reading_2x_10k |
204.7 ms | 262.7 ms | -22.09% |
| ❌ | WallTime | test_sequential_4x_reading_1k |
26.1 ms | 30.7 ms | -14.89% |
| ❌ | WallTime | test_sequential_with_title_extraction_10k |
69.1 ms | 81.3 ms | -15.02% |
| ❌ | WallTime | test_process_4_files_sequential |
67.4 ms | 78.7 ms | -14.31% |
| ❌ | WallTime | test_iterator_vs_while_loop_1k |
6.3 ms | 7.4 ms | -14.22% |
| ❌ | WallTime | test_process_4_files_parallel_4_threads |
85.9 ms | 97.6 ms | -12% |
| ❌ | WallTime | test_read_10k_records |
64.4 ms | 76.3 ms | -15.63% |
| ❌ | WallTime | test_read_1k_records |
6.4 ms | 7.5 ms | -15.1% |
| ❌ | WallTime | test_threading_speedup_4x_10k |
668.6 ms | 863.7 ms | -22.6% |
| ❌ | WallTime | test_roundtrip_1k_records |
9.5 ms | 11.5 ms | -17.27% |
| ❌ | WallTime | test_threaded_with_title_extraction_2x_10k |
221.2 ms | 272.1 ms | -18.73% |
| ❌ | WallTime | test_read_and_extract_titles_10k |
67 ms | 79.7 ms | -15.97% |
| ❌ | WallTime | test_parallel_read_with_extract_4x_1k |
70.7 ms | 94.5 ms | -25.19% |
| ❌ | WallTime | test_threading_speedup_2x_10k |
202.4 ms | 263.5 ms | -23.19% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Comparing bd-ouji-proptest-expansion (bff1c57) with main (1ebc492)2
Footnotes
-
16 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
main(bff1c57) during the generation of this report, so 1ebc492 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
- bd-ouji closed: proptest expansion delivered in PR #103. - bd-seja (p3): document formal methods in public docs (follow-up). - bd-zm6m (p2): MARCXML whitespace round-trip bug, surfaced by bd-ouji and elevated to GitHub issue #104. - bd-95ho (p1): reorganize [Unreleased] CHANGELOG section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
[a-z0-9]) plus MARCXML and MARCJSON round-trip properties that exercise format-specific escaping (< > & " 'for XML;\t \n \r \\ "for JSON).arb_recordto cover zero-control-field and zero-data-field records; caps runtime withProptestConfig { cases: 64 }(suite runs in ~3s locally, well under the 10s budget).#proptest = "1.0"fromCargo.toml [dependencies](the real entry has always been in[dev-dependencies]).tests/*.proptest-regressions.pending/tests/proptest-regressions/*.pendingto.gitignoreso only accepted seeds are tracked.The MARCXML round-trip property surfaced a real bug:
quick-xml+serde(rename = "$value")strips whitespace-only text content, so a<controlfield tag=\"001\"> </controlfield>fails to deserialize. The XML strategy now excludes whitespace-only values and the fix is tracked in a separate bead (bd-zm6m).Test plan
cargo test --test properties --package mrrc→ 8 passed in 2.6s.cargo/check.sh(full local CI) → all checks passedBead:
bd-oujiCloses #91
🤖 Generated with Claude Code