mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
The json backend now serves two layouts. single (the default) keeps the whole unit as one document at <root>/<name>.json; per-record keeps one version-stamped document per record at <root>/<name>/<table>/<key>.json (plus global.json), so one write rewrites one record instead of the whole unit. The per-record unit is stateless — the directory is the state, loadAll re-reads the tree, and every write is a single durable file operation — while single keeps its authoritative in-memory state and whole-file publish. Records keys must be path-safe ([a-zA-Z0-9_-]+); an unsafe key rejects. A record document that is malformed or stamped with another version reads as an absent record: one bad or stale file never bricks the unit, and a version bump discards stale records instead of migrating them. DomainSpec and KvUnitDescriptor gain the optional layout field (defineDomain validates it, descriptorOf projects it).