Conversation
The WASM pages documented an API that does not exist: `NodeDB` / `NodeDB.open(name)`, `db.exec`, `db.query`, `db.loadSnapshot`, and a "static snapshots" workflow with no implementation anywhere in Lite. The example now uses the real surface — `init`, `NodeDbLiteWasm.openInMemory`, `executeSql`, `vectorInsert`, `vectorSearch` — and the snapshot paragraph is gone. The limitations list gains the real persistence story (`openPersistent*` through `run_opfs_worker`) and the status line stops claiming all eight engines work on WASM today. `routes/promql/mod.rs` placed the API at `/obsv/api`; the registered paths are `/v1/obsv/api/v1/*`, so a Grafana data source pointed at the documented URL 404s. `docs/lite.md` and `docs/cli.md` fill six inbound links that pointed at nothing. `cli.md` carries the binary's real usage text — there is no `ndb` client — and `lite.md` states what Lite shares, what it syncs, and where parity is unverified. The three wrong relative paths (`../bitemporal.md`, `../wasm.md` from query-language, and `security/encryption.md`'s `protocols.md#tls`) resolve. Evidence: link scan over `docs/` reports zero dangling targets.
…a dir Cross-checking this doc set against `nodedb-docs` turned up two claims that both sets get wrong. `CONSISTENCY = '...'` is not a SQL clause: `bounded_staleness` appears only in the session-parameter parser (`set_validation.rs`, `read_consistency.rs`), and the mirror read path reads the level from the session. The example now sets it with `SET default_read_consistency` first. The default data directory follows platform conventions (`$XDG_DATA_HOME/nodedb`, `~/Library/Application Support/nodedb`, `%LOCALAPPDATA%\nodedb\data`), not `~/.nodedb/data`. Evidence: `grep -rn "nodedb/data\|CONSISTENCY=" docs/*.md` → no hits; the accepted staleness grammar is `bounded_staleness:<secs>` (`read_consistency.rs:28-45`).
Contributor
Author
|
Closing. This carries the target-split clock helper, the wasm CI job and the nightly probe. NodeDB is a server: it does not build for wasm32 or wasip1 and will not support wasm, so the CI job and the probe have no home here — the revert of #367 settled that scope. The clock helper is worth keeping on its own merits: one time source over the native call sites. It returns as a small PR with no wasm arm. wasm CI belongs to NodeDB Lite, where the target actually exists. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The WASM pages documented an API that does not exist, a route that is not registered, and links that resolve nowhere.
NodeDB,NodeDB.open(name),db.exec,db.query,db.loadSnapshot,db.sync,db.sync_config. The binding exports 27 names; the class isNodeDbLiteWasm, the statement entry point isexecuteSql,open()takes no arguments, and there is noCollectiontype.ai/on-device.mdalso documents a "static snapshots" workflow with no implementation anywhere in Lite.wasm.mdclaimed in-memory only, whileopenPersistent*throughrun_opfs_workerimplements OPFS persistence.wasm.mdclaimed all eight engines work, while the array engine's first write fails onwasm32-unknown-unknown(clock; filed separately).routes/promql/mod.rsplaced the API at/obsv/api; the registered paths are/v1/obsv/api/v1/*, so a Grafana data source pointed at the documented URL 404s.lite.md(×5) andcli.md(×2) did not exist;query-language.mdused../bitemporal.mdand../wasm.md;security/encryption.mdlinkedprotocols.md#tlswithout the../.databases.mdshowedSELECT … CONSISTENCY='bounded_staleness'— no such clause exists; the level is a session setting.getting-started.mdgave~/.nodedb/dataas the default data dir; it follows platform conventions.Change
The examples use the real surface (
init,NodeDbLiteWasm.openInMemory,executeSql,vectorInsert,vectorSearch); the snapshot paragraph is gone; the limitations list carries the real persistence story.docs/lite.mdanddocs/cli.mdare new —cli.mdcarries the binary's actual usage text, andlite.mdstates what Lite shares, what it syncs, and where parity is unverified. The consistency example sets the session knob first; the data dir lists the real per-platform defaults.Evidence
docs/: zero dangling targets (was six).js_nameattributes), not from prose: 27 exports, no alias for any phantom name, and no JS/TS wrapper in the repo.bounded_staleness:<secs>(read_consistency.rs:28-45); the data dir comes fromconfig/server/paths.rs:18-33.