From a4ebe8ffec096d32efda2473ff1cdd62fe465673 Mon Sep 17 00:00:00 2001 From: Julian Knutsen Date: Sun, 17 May 2026 15:06:01 -0700 Subject: [PATCH] perf(deps): scan one cycle table for same-storage edges (#4004) * perf(deps): narrow recursive cycle checks * fix(deps): keep mixed-table cycle detection * fix(deps): preserve mixed-table wisp cycle scans --- internal/storage/dolt/dolt_test.go | 6 ++++++ internal/storage/issueops/dependencies.go | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/storage/dolt/dolt_test.go b/internal/storage/dolt/dolt_test.go index 6c45c30cb..117ae91ab 100644 --- a/internal/storage/dolt/dolt_test.go +++ b/internal/storage/dolt/dolt_test.go @@ -113,6 +113,12 @@ func setupTestStore(t *testing.T) (*DoltStore, func()) { // Create an isolated branch for this test _, branchCleanup := testutil.StartTestBranch(t, store.db, testSharedDB) + if err := initSchemaOnDB(ctx, store.db); err != nil { + branchCleanup() + store.Close() + os.RemoveAll(tmpDir) + t.Fatalf("failed to initialize branch-local ignored schema: %v", err) + } cleanup := func() { branchCleanup() diff --git a/internal/storage/issueops/dependencies.go b/internal/storage/issueops/dependencies.go index ea5b9bf67..76c6992fd 100644 --- a/internal/storage/issueops/dependencies.go +++ b/internal/storage/issueops/dependencies.go @@ -54,8 +54,9 @@ type AddDependencyOpts struct { // WriteTable is the dependency table to insert/update/check existing deps in. // Auto-detected from source wisp routing if empty. WriteTable string - // DepTables are the tables to scan for cycle detection. The recursive CTE - // UNIONs all of them. Defaults to ["dependencies", "wisp_dependencies"] if empty. + // DepTables are the tables to scan for cycle detection. Defaults to both + // dependency tables; edge storage is source-routed, so same-class endpoints + // can still have mixed-table interior paths. DepTables []string // IsCrossPrefix is true when source and target have different prefixes, // meaning the target lives in another rig's database.