Skip to content

backend v0.8.9 — KG wikilink-alias edge fix + migration 035 registration

Latest

Choose a tag to compare

@byongjohnhan-oss byongjohnhan-oss released this 10 Jun 03:54
· 84 commits to main since this release
Immutable release. Only release title and notes can be modified.
f89d98f

Patch — knowledge-graph wikilink-alias edge corruption fix (incl. 0.8.8) + migration 035 registration & guard test.

Rolls up 0.8.8 (the fix) and 0.8.9 (making its migration actually run). 0.8.8 alone shipped its migration unregistered (a no-op), so 0.8.9 is the first version where the repair takes effect on deploy.

Fix (0.8.8)

Obsidian wikilinks [[akb://…/x.md|alias]] had no parser handling, and the bare-akb:// scan didn't stop at |/], so the alias's first word leaked onto the edge target (…/x.md|PWC). One bug, two symptoms: the relations panel rendered a broken …%7CPWC "related to" link, and the graph drew no edges (corrupted target matched no node).

  • Parser: [[target|alias]] matcher + tightened _AKB_URI_RE.
  • _store_edge now validates the target exists via the same _resource_exists primitive the explicit akb_link path uses (two paths, shared validation primitive; differ only in policy: reject vs. silent-skip). Behaviour note: a not-yet-existing target is now dropped rather than stored as a dangling edge (re-materialized on the next index).
  • Migration 035_fix_wikilink_alias_edges.py: repairs already-persisted rows (strip alias → re-validate → re-insert or drop orphan). Idempotent.

Registration fix (0.8.9)

Migrations run from an explicit hardcoded list in _apply_migrations, not a directory glob. 0.8.8 forgot to register 035 → no-op. This registers it and adds tests/test_migrations_registered_unit.py guarding against the omission class.

Verified on on-prem prod: migration repaired 4 corrupted edges; akb_relations returns clean URIs resolving to real titles; akb_graph returns connected edges.

PRs #186, #187. See backend/CHANGELOG.md 0.8.8 + 0.8.9.