From 62a9f6223745c0df42be1f4226f31dfb10c83ea8 Mon Sep 17 00:00:00 2001
From: ax_rd <ax_rd@aisim.cn>
Date: Thu, 03 Sep 2026 13:53:11 +0800
Subject: [PATCH] fix: e2e-verify.sh 退出码处理(FAILS 计数 + pipefail,CI 可凭退出码判定)

---
 internal/graph/model.go |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/internal/graph/model.go b/internal/graph/model.go
index 0702912..06a70c2 100644
--- a/internal/graph/model.go
+++ b/internal/graph/model.go
@@ -2,22 +2,35 @@
 
 // Node 图节点(对应一个 markdown 文件)
 type Node struct {
-	ID        int64    `json:"id"`
-	Path      string   `json:"path"`
-	Title     string   `json:"title"`
-	Section   string   `json:"section"`
-	Tags      []string `json:"tags"`
-	Entities  []string `json:"entities"`
-	Wikilinks []string `json:"wikilinks"`
-	Content   string   `json:"content"`
+	ID          int64    `json:"id"`
+	Path        string   `json:"path"`
+	Title       string   `json:"title"`
+	Section     string   `json:"section"`
+	Tags        []string `json:"tags"`
+	Entities    []string `json:"entities"`
+	Aliases     []string `json:"aliases"`
+	Status      string   `json:"status"`
+	Wikilinks   []string `json:"wikilinks"`
+	Content     string   `json:"content"`
+	Size        int64    `json:"size"`
+	Mtime       int64    `json:"mtime"`
+	ContentHash string   `json:"content_hash"`
 }
 
 // Edge 图边(实体关系)
 type Edge struct {
-	FromNode int64  `json:"from_node"`
-	ToNode   int64  `json:"to_node"` // 对于 tag/entity 边,ToNode 可以是虚拟节点 ID
-	Relation string `json:"relation"` // "tag" | "entity" | "wikilink"
-	Label    string `json:"label"`    // 具体值
+	FromNode   int64  `json:"from_node"`
+	ToNode     int64  `json:"to_node"` // 对于 tag/entity 边,ToNode 可以是虚拟节点 ID
+	Relation   string `json:"relation"`   // "tag" | "entity" | "wikilink"
+	Label      string `json:"label"`      // 具体值
+	Provenance string `json:"provenance"` // "exact" | "fuzzy" | "tag" | "entity"
+}
+
+// UnresolvedLink 悬空 wikilink(未匹配到目标节点)
+type UnresolvedLink struct {
+	FromNode int64 // BuildGraph 内部节点 ID
+	LinkText string
+	NameTail string
 }
 
 // Graph 知识图谱

--
Gitblit v1.10.0