Summary
Three exported transaction-scoped helpers in pkg/store/relations.go have zero callers anywhere in the repository (production or tests). They are dead public API that ships forever, and they obscure which path is "real" for relation writes.
Location
pkg/store/relations.go:61 — UpsertRelationTx
pkg/store/relations.go:77 — InsertPendingRelationTx
pkg/store/relations.go:93 — DeletePendingByIDTx
Category
refactor (dead code)
Impact
Medium — small in lines, but every unused exported method is a future-maintenance trap and a Karpathy-style "code that looks useful but isn't." Easy to delete.
Rationale
Verified with grep -rn 'UpsertRelationTx|InsertPendingRelationTx|DeletePendingByIDTx' --include='*.go': every match is the definition site itself. By contrast, DeleteParsedPendingForSourceTx (line 103) and the Node*Tx family in pkg/store/node.go are actually used (e.g. by rollback.go), so the symmetry argument doesn't justify keeping the three orphans.
Suggested direction
Delete the three functions. If a future tx-aware caller appears, reintroduce at that point. Mechanical change, ~30 lines removed.
Filed by the nightly enhancement-scanner routine.
Summary
Three exported transaction-scoped helpers in
pkg/store/relations.gohave zero callers anywhere in the repository (production or tests). They are dead public API that ships forever, and they obscure which path is "real" for relation writes.Location
pkg/store/relations.go:61—UpsertRelationTxpkg/store/relations.go:77—InsertPendingRelationTxpkg/store/relations.go:93—DeletePendingByIDTxCategory
refactor (dead code)
Impact
Medium — small in lines, but every unused exported method is a future-maintenance trap and a Karpathy-style "code that looks useful but isn't." Easy to delete.
Rationale
Verified with
grep -rn 'UpsertRelationTx|InsertPendingRelationTx|DeletePendingByIDTx' --include='*.go': every match is the definition site itself. By contrast,DeleteParsedPendingForSourceTx(line 103) and theNode*Txfamily inpkg/store/node.goare actually used (e.g. byrollback.go), so the symmetry argument doesn't justify keeping the three orphans.Suggested direction
Delete the three functions. If a future tx-aware caller appears, reintroduce at that point. Mechanical change, ~30 lines removed.
Filed by the nightly enhancement-scanner routine.