#2443·graphify

AST extractor misses some named exports, producing dangling imports_from edges

Author: MG44CPACreated Aug 4, 2026Updated Sep 17, 2026

Summary

The TypeScript/JS AST extractor doesn't always emit a node for every named export in a file — sibling exports in the same file are inconsistently covered. When another file imports the missed export, the resulting imports_from edge has no valid target node, showing up as a dangling-endpoint edge in graphify.diagnostics.diagnose_extraction.

Repro

src/lib/constants.ts exports two constants:

export const CREDIT_RULES = { ... }
export const DISCLAIMER_SHORT = "..."

The extractor creates a node for CREDIT_RULES (src_lib_constants_credit_rules) but no node for DISCLAIMER_SHORT, despite both being top-level named exports in the same file, extracted in the same pass.

Consumers (src/components/Disclaimer.tsx, src/components/Footer.tsx) that import { DISCLAIMER_SHORT } from '@/lib/constants' produce imports_from edges targeting a node ID that was never created.

The same pattern affects src/content/site.ts's COMPLIANCE_SCRIPT export, imported by src/app/hgc-credits/page.tsx and src/app/orientation/page.tsx — both edges dangle for the same reason.

Impact

Small in isolated scope (6 dangling edges observed on a ~190-file TS/TSX codebase), but any file with multiple named exports is at risk of silently dropping some of them, understating the real fan-out of a shared constants/content module in the graph.

Expected behavior

Every top-level named export in a parsed file should get a node, regardless of how many other exports exist in the same file or what shape the export takes (string template literal, object literal, etc.).

Environment

  • graphifyy 0.9.30
  • TypeScript/TSX source files (Next.js App Router project)
  • Reproduced via graphify.diagnostics.diagnose_extraction(extraction, directed=False, root='.')