Skip to content

oxilite 0.4.0: versioning

Latest

Choose a tag to compare

@Volland Volland released this 25 Sep 11:00
· 50 commits to main since this release
b97432b

Versioning: a knowledge graph with a memory

oxilite 0.4.0 can keep a store's history in the same SQLite file or Cloudflare D1 database. Versioning is opt-in per store and off by default. A store without it is unchanged: a golden test pins its SQL for the W3C corpus to 0.3.1's.

Level The store keeps Rows written per triple on D1
off (default) the present 4.81
stamped a store clock: every write is a tick (time, author, message); every quad records the tick that added it 4.82
log an immutable change log: any past version can be queried 6.82 (8.82 with the as-of index)

Time travel in every dialect

  • SPARQL: the as_of option (HEAD~2, #42, @2026-09-01T12:00:00Z), and SERVICE <oxilite:version/HEAD~1> { … } to compare versions in one query.
  • Datalog: @version "HEAD~1" . for a whole program, and at "HEAD~1" / at ?c on a single atom.
  • Cypher: asOf. Writing statements with a version are refused.
  • CLI --as-of, and oxilite serve answers /query?version=….

History as data

  • GRAPH <oxilite:history>: commits as PROV-O activities (time, author, message, previous commit), and changes as oxl:added / oxl:removed triple terms. "Who revoked this role, and when" is one SPARQL query.
  • Datalog built-ins: commit, added, removed, branch.

Operations

  • history, changes, diff, author and message per commit (with_commit), and an audited purge for erasure requests.
  • Explicit level changes: upgrades keep every quad, downgrades freeze the history, and allow_loss deletes it.
  • On D1, level changes ship as migrations: oxilite versioning migration and npx oxilite-d1 versioning-migration. New stores use oxilite schema --versioning log or npx oxilite-d1 schema --versioning log.
  • New CLI commands: oxilite versioning status | set | log | changes | diff | purge | migration.

Performance

  • Queries on the present cost the same at every level.
  • Reading the past takes about 3× as long for subject lookups, and 1–5× for selective queries with the as-of index. Aggregates over a whole history take 13–34× as long.
  • Details: How much does versioning slow oxilite down?

Also

  • Datalog results read the default graph's id 0 as unbound. A quad/4 result on the default graph no longer fails.
  • @oxilite/common 0.4.0 is published. @oxilite/d1 0.3.0 depended on @oxilite/common 0.3.0, which was never published.
  • Four completed OpenSpec changes are archived. Branches and merge (version-branches) and push/pull (version-sync) are planned.

Read more

Packages

  • crates.io: oxilite, oxilite-core, oxilite-rusqlite, oxilite-dylib, oxilite-d1, oxilite-reason, oxilite-cypher, oxilite-datalog, oxilite-jsonld, oxilite-vc, oxilite-validate, oxilite-cli 0.4.0
  • npm: @oxilite/common, @oxilite/d1, @oxilite/node 0.4.0. @oxilite/node ships a prebuilt macOS arm64 binary; on other platforms, build from source with npm run build:native.