Version / build tested against
NodeDB-Lab/pagedb @ e4a6902 (main, 2026-09-17), wasm32-unknown-unknown.
Deployment mode
Embedded — wasm32-unknown-unknown, memory VFS and OPFS.
Engine(s) involved
Storage (txn commit path).
Summary
WriteTxn::commit reads the wall clock for CommitHistoryMeta's timestamp, and the age-based
retention policy reads it for the pruning threshold. wasm32-unknown-unknown has no std clock, so
SystemTime::now() panics with time not implemented on this platform and the first commit from
an embedded build fails. A consumer (NodeDB-Lite's WASM test array::create_put_slice_roundtrip)
fails at its first write for this reason.
Steps to reproduce
// wasm-smoke/tests/commit_smoke.rs, run under node
let db = Db::open(MemVfs::new(), kek, 4096, realm, opts).await?;
let mut w = db.begin_write().await?;
w.put(b"k", b"v").await?;
w.commit().await?; // ← panics
Observed: panicked at library/std/src/sys/time/unsupported.rs:35:9: time not implemented on this platform.
Expected behavior
A commit completes on wasm32-unknown-unknown; the history timestamp comes from the host clock
(js_sys::Date::now()) or degrades to 0 when no clock exists.
Actual behavior
Panic at the two sites: src/txn/write/commit.rs:113, src/txn/db/catalog/history.rs:151.
What actually happened? (check all that are true)
Proposed severity
SEV-2 — High: a supported target cannot perform its primary operation.
Reproducibility
Always — every commit on wasm32-unknown-unknown.
Last known-good version / commit (if a regression)
Unknown.
Environment & logs
Linux x86_64 host, node runner; wasm-bindgen-test; memory VFS. Red proof: both smoke tests panic
before the fix, pass after.
Before submitting
Version / build tested against
NodeDB-Lab/pagedb @ e4a6902(main, 2026-09-17),wasm32-unknown-unknown.Deployment mode
Embedded — wasm32-unknown-unknown, memory VFS and OPFS.
Engine(s) involved
Storage (txn commit path).
Summary
WriteTxn::commitreads the wall clock forCommitHistoryMeta's timestamp, and the age-basedretention policy reads it for the pruning threshold.
wasm32-unknown-unknownhas no std clock, soSystemTime::now()panics withtime not implemented on this platformand the first commit froman embedded build fails. A consumer (NodeDB-Lite's WASM test
array::create_put_slice_roundtrip)fails at its first write for this reason.
Steps to reproduce
Observed:
panicked at library/std/src/sys/time/unsupported.rs:35:9: time not implemented on this platform.Expected behavior
A commit completes on
wasm32-unknown-unknown; the history timestamp comes from the host clock(
js_sys::Date::now()) or degrades to0when no clock exists.Actual behavior
Panic at the two sites:
src/txn/write/commit.rs:113,src/txn/db/catalog/history.rs:151.What actually happened? (check all that are true)
Proposed severity
SEV-2 — High: a supported target cannot perform its primary operation.
Reproducibility
Always — every commit on
wasm32-unknown-unknown.Last known-good version / commit (if a regression)
Unknown.
Environment & logs
Linux x86_64 host, node runner;
wasm-bindgen-test; memory VFS. Red proof: both smoke tests panicbefore the fix, pass after.
Before submitting