MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / partitionResolvedCleanup

Method partitionResolvedCleanup

src/resolution/index.ts:1133–1148  ·  view source on GitHub ↗

* Split resolved refs into rows deletable by id and hand-built refs that * must fall back to the key-tuple delete. Rows loaded from the database * carry their row id and are deleted by exactly that id; the key tuple * omits line/col, so it also removes SIBLING rows — the same caller calling

(resolved: ResolvedRef[])

Source from the content-addressed store, hash-verified

1131 * sites' edges were silently never created (#1269).
1132 */
1133 private static partitionResolvedCleanup(resolved: ResolvedRef[]): {
1134 rowIds: number[];
1135 legacyKeys: Array<{ fromNodeId: string; referenceName: string; referenceKind: string }>;
1136 } {
1137 const rowIds: number[] = [];
1138 const legacyKeys: Array<{ fromNodeId: string; referenceName: string; referenceKind: string }> = [];
1139 for (const r of resolved) {
1140 if (r.original.rowId != null) rowIds.push(r.original.rowId);
1141 else legacyKeys.push({
1142 fromNodeId: r.original.fromNodeId,
1143 referenceName: r.original.referenceName,
1144 referenceKind: r.original.referenceKind,
1145 });
1146 }
1147 return { rowIds, legacyKeys };
1148 }
1149
1150 /**
1151 * Same row-id precision for parking unresolvable refs as status='failed'

Callers 3

resolveAndPersistMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected