Note: replace flat prefixed KV keys with hierarchical collection structure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,14 @@
|
|||||||
`fs-views`, `publication-tool`). Should live in its own Gitea repo as an installable
|
`fs-views`, `publication-tool`). Should live in its own Gitea repo as an installable
|
||||||
npm package (`npm install git+https://...`) so changes propagate rather than drift.
|
npm package (`npm install git+https://...`) so changes propagate rather than drift.
|
||||||
|
|
||||||
|
### Hierarchical storage structure
|
||||||
|
The current store is a flat string→value map with prefixed keys (`f:`, `c:`, `bin:`,
|
||||||
|
etc.) as a manual namespacing convention. This should be replaced with a proper tree:
|
||||||
|
collections as top-level keys whose values are `Record<id, object>`. Eliminates the
|
||||||
|
prefix convention, makes collection access direct and self-documenting, and removes
|
||||||
|
the full-scan `startsWith` pattern from every `list_*` function. Requires a one-time
|
||||||
|
migration of existing NDJSON data. Best done as part of the shared library rewrite.
|
||||||
|
|
||||||
### Delta / revision tracking
|
### Delta / revision tracking
|
||||||
Add a delta log alongside the main snapshot file (e.g. `inventory.ndjson.deltas`)
|
Add a delta log alongside the main snapshot file (e.g. `inventory.ndjson.deltas`)
|
||||||
that records every `set`/`delete` as a timestamped entry. The main file stays a
|
that records every `set`/`delete` as a timestamped entry. The main file stays a
|
||||||
|
|||||||
Reference in New Issue
Block a user