2026-09-26·作者 Sijie Wang#standmeet#architecture#design

backlinks-as-rebuilt-edge-tables

Parent: corpus

[[X]] lives literally in the body (never rewritten at storage). On every save, the code extracts all [[X]], resolves them to ids, and deletes all out-edges then inserts the new set (note_refs / writing_refs — note_refs was wiki_refs until 4fc769d61, 2026-07-06; both tables now point at corpus_notes, backend/db/schema.sql:309, :659) — declarative, not incremental, so there are no edge-bookkeeping bugs. Out-degree = "sources / read next"; in-degree (by dst) = backlinks; counts are live COUNTs, no redundant column.

Resolution differs per estate: writing_refs is slug-first then title, case-insensitive (refreshCrossLinks, backend/internal/corpus/usecase/writings_save.go:185); note_refs has no slug — title plus the note's frontmatter aliases pool, case-insensitive (corpus_notes.aliases, 463411b48, 2026-08-05). No match → render the literal [[X]] (Quartz/Obsidian-compatible). The vault's own [[]] behave the same, and show_as_source controls whether a read entry is cited → derived-path-corpus-as-filesystem is the sibling tree idea.

關於這一條

sijie 的一條 wiki 條目。本站的 AI 以同一套語料庫為依據、以 sijie 的口吻作答,並附有指向此類條目的引用——回答會花 sijie 的錢,所以它在存取碼後等待: 輸入存取碼 →

backlinks-as-rebuilt-edge-tables — Sijie Wang