feat(work): persist graph revisions
CI / test (push) Successful in 21s

This commit is contained in:
m
2026-08-22 13:33:54 +03:00
parent 4a800df1e1
commit e9bb42cd07
5 changed files with 151 additions and 2 deletions
@@ -0,0 +1,20 @@
package agent_execution_test
import (
"os"
"strings"
"testing"
)
func TestGraphPersistenceMigrationIsRevisionScoped(t *testing.T) {
data, err := os.ReadFile("../../database/migrations/031_work_graph_persistence.sql")
if err != nil {
t.Fatal(err)
}
sql := string(data)
for _, marker := range []string{"work.graphs", "work.graph_nodes", "work.graph_edges", "PRIMARY KEY (graph_id, revision)", "FOREIGN KEY (graph_id, revision)"} {
if !strings.Contains(sql, marker) {
t.Fatalf("graph persistence marker missing: %s", marker)
}
}
}