Skip to content

dekc_lineage.build_graph only reads links[], ignoring PKC rel: maps and markdown lands_as #40

Description

@RichardHightower

Summary

build_graph walks fm.get("links") only. Mixed brains store PKC edges as:

rel:
  related_to:
    - /tables/outlook-messages.md
  ingested_by:
    - /ingestion/nb-outlook-ingestion.md

Those hops are invisible. Older IngestionJob nodes list lands_as in the body; stream-job-skeptic noted build_graph ignores that, so Aircall/Samsara jobs look like graph orphans even when the prose names bronze tables.

Issue #7 (dekc_link relations) was about CLI relation names; this is the reader side for mixed OKF.

Expected

  • Read both links[] and rel: maps (PKC/OKF style).
  • Optionally parse markdown lands_as → only if you must; better to migrate body lists into links[] on capture.
  • Document that typed flow must be in frontmatter.

Code

def build_graph(bundle: Path) -> dict[str, list[str]]:
    adj: dict[str, list[str]] = defaultdict(list)
    for path, fm, body in list_concepts(bundle):
        rel = "/" + path.relative_to(bundle).as_posix()
        for link in fm.get("links") or []:
            ...
            if r in FORWARD_FLOW:
                adj[rel].append(tgt)

FORWARD_FLOW already includes lands_as / lands_into (good) but never sees them if they live under rel: or the body.


Found on: DEKC 0.4.1 (GitHub Latest 2026-08-24), mixed PKC+SAC+DEKC second brain, Azure Fabric reverse-engineering walk.
Not a sample-knowledge issue. Repro used live capture scripts from spillwave-second-brain cache data-engineering-knowledge-capture/0.4.1/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions