Skip to content

1.21.0 — root _index.json as bounded folder-tree summary

Choose a tag to compare

@CocoRoF CocoRoF released this 05 May 09:28
474522a

Why

The root index file grew unbounded with every note. Pre-1.21.0:

  • <root>/_index.json — flat dump of every file's metadata (O(notes))
  • <cat>/_index.json — per-category shard
  • <root>/_summary.json — folder-tree overview (duplicates folder structure)

The flat root dump is the wrong design — at scale it becomes unreadable, defeats progressive disclosure (the host should drill into a category to see notes, not load every note up front), and duplicates work the per-category shards already do.

Change

Collapse the root file into the folder-tree summary:

<root>/_index.json   — folder-tree summary  (was _summary.json)
<cat>/_index.json    — per-category shard   (unchanged)

Bounded — O(categories), not O(notes). Per-note metadata lives only inside category shards. snapshot() keeps returning the full in-memory view (files / tag_map / link_graph) for callers that need it (vault map render, graph queries, search), but the view is no longer persisted to the root file.

_summary.json retired entirely — content moved into root _index.json.

Migration

Pre-1.21.0 source 1.21.0 source
<root>/_index.json (flat dump) provider.index().snapshot() — in-memory only
<root>/_summary.json <root>/_index.json (folder summary)
<cat>/_index.json <cat>/_index.json (unchanged)

Test plan

  • 9 hierarchical-sidecar tests pass (3 new, 6 retained)
  • Full unit suite: 2373 passed, 1 skipped
  • CI green: Lint / Test (3.11/3.12/3.13) / Security audit / Build package

🤖 Generated with Claude Code