Skip to content

backend 0.9.2 — graph overview shows unlinked resources

Choose a tag to compare

@kwoo24-oss kwoo24-oss released this 23 Jun 05:43
· 529 commits to main since this release
Immutable release. Only release title and notes can be modified.
de08e0a

Feature. The graph overview was built purely from edge endpoints, so a resource in no relation (an unlinked table/file/doc) never appeared in the graph — and a vault with only unlinked resources (e.g. a tables-only vault) rendered a blank canvas with no way to discover them.

get_overview now appends unlinked resources as degree-0 isolated nodes (include_orphans=True, orphan_limit=500). Response adds orphans_returned + orphans_truncated; nodes_total/returned/truncated still describe the connected graph only (len(nodes) == returned + orphans_returned). The existing "Hide orphans" toggle governs them — no client change.

Orphan detection is a SQL anti-join on each resource's own identity (doc path / table name / file id, not the full URI):

  • the per-catalog LIMIT caps ORPHANS, not "recent rows" (a vault whose newest rows are all linked still surfaces older orphans);
  • identity matching is robust to a non-canonical collection segment on a stored edge URI — a table linked via a mis-cased /coll/…/ can't reappear as a phantom orphan duplicate;
  • the three types are round-robin interleaved before the cap so orphan docs never starve orphan tables/files.

get_graph(no resource_uri) delegates to get_overview, so MCP akb_graph(vault) + GET /graph?vault= inherit it; the BFS (uri) path is unaffected.

Hardened by two adversarial reviews (false-orphan duplicate, recency-window miss, cross-type starvation; then orphans_truncated honesty + an unparseable-URI debug log + a non-canonical-link e2e). CI 4/4 green.