scripts/verify.sh runs the language-default binary (Rust by default) through these checks. scripts/cross_test.sh then re-runs the same scenarios in Go and C++ and asserts the behaviorally observable outputs match. The internal layouts are not required to match — only the API behavior.
#
Invariant
How verified
V1
Skip list round-trip: insert(k, v) then get(k) == v for all k
dsbench skiplist roundtrip 10000
V2
Skip list iteration is in sorted order
dsbench skiplist iter 1000 piped to sort -c
V3
Skip list level distribution is geometric (p=0.5 ± tolerance)
histogram chi-square check in unit test
V4
Skip list max level stays ≤ MAX_LEVEL even with 100k inserts
bench reports max_level_used
V5
Hash table round-trip: insert(k, v) then get(k) == v for all k
dsbench hashtable roundtrip 10000
V6
Hash table max probe distance ≤ 4 × log₂(cap × load) at load ≤ 0.85
unit test asserts
V7
Hash table resizes at load 0.85, capacity doubles, max-probe drops
unit test
V8
Backward-shift deletion never leaves a lookup hole
unit test: insert 100, delete random 50, assert remaining 50 still found
V9
Insert with same key twice replaces value, len() unchanged
unit test
V10
Cross-language: insert sequence [5, 1, 3, 8, 2] into skip list, iter output is sorted in all 3 langs
cross_test.sh
V11
Cross-language: hash table after inserting same 1000 keys reports same len()
cross_test.sh
V12
Cross-language: roundtrip of the same N keys works in all 3 langs