All checks were successful
release-tag / release-image (push) Successful in 2m43s
24 lines
949 B
Go
24 lines
949 B
Go
package engine
|
|
|
|
import "github.com/local/glpi-neural-brain/internal/graph"
|
|
|
|
// withRunMutations marks graph mutations that are causally attributable to one
|
|
// workflow. The analysis dashboard deliberately prefers these counters over
|
|
// global graph deltas, which may include concurrent work from other pipelines.
|
|
func withRunMutations(meta map[string]any, stats graph.MutationStats) map[string]any {
|
|
if meta == nil {
|
|
meta = map[string]any{}
|
|
}
|
|
meta["mutation_attribution"] = "explicit"
|
|
meta["run_nodes_created"] = stats.NodesCreated
|
|
meta["run_nodes_updated"] = stats.NodesUpdated
|
|
meta["run_nodes_deleted"] = stats.NodesDeleted
|
|
meta["run_edges_created"] = stats.EdgesCreated
|
|
meta["run_edges_updated"] = stats.EdgesUpdated
|
|
meta["run_edges_deleted"] = stats.EdgesDeleted
|
|
meta["run_vectors_created"] = stats.VectorsCreated
|
|
meta["run_vectors_updated"] = stats.VectorsUpdated
|
|
meta["run_vectors_deleted"] = stats.VectorsDeleted
|
|
return meta
|
|
}
|