@@ -66,7 +66,7 @@ func CreateCausalEdges(db *store.DB, insight *model.Insight) int {
6666 // → new has keyword → new is effect → prev is cause → prev→new
6767 // e.g. prev="chose X because of Y", new="Y has low latency"
6868 // → prev has keyword → prev is effect → new is cause → new→prev
69- sourceID := prev .ID // default: new has signal → new is effect, prev is cause
69+ sourceID := prev .ID // default: new has signal → new is effect, prev is cause
7070 targetID := insight .ID
7171 if ! newHasSignal && prevHasSignal {
7272 // Only prev has signal → prev is effect, new is cause
@@ -77,10 +77,10 @@ func CreateCausalEdges(db *store.DB, insight *model.Insight) int {
7777 subType := suggestSubType (insight .Content + " " + prev .Content )
7878
7979 err = db .InsertEdge (& model.Edge {
80- SourceID : sourceID ,
81- TargetID : targetID ,
82- EdgeType : model .EdgeCausal ,
83- Weight : overlap ,
80+ SourceID : sourceID ,
81+ TargetID : targetID ,
82+ EdgeType : model .EdgeCausal ,
83+ Weight : overlap ,
8484 Metadata : map [string ]string {
8585 "overlap" : formatFloat (overlap ),
8686 "sub_type" : subType ,
@@ -129,7 +129,7 @@ type CausalCandidate struct {
129129 ID string `json:"id"`
130130 Content string `json:"content"`
131131 Category string `json:"category"`
132- Hop int `json:"hop"` // graph distance (1 or 2)
132+ Hop int `json:"hop"` // graph distance (1 or 2)
133133 ViaEdge string `json:"via_edge"` // edge type that connected
134134 CausalSignal string `json:"causal_signal"` // keyword if found, else ""
135135 SuggestedSubType string `json:"suggested_sub_type"` // heuristic suggestion
0 commit comments