=== RUN   TestWorkflowGovernance_PiAgent_PG_FullNoneMixedChain
--- FAIL: TestWorkflowGovernance_PiAgent_PG_FullNoneMixedChain (0.01s)
panic: goose: duplicate version 48 detected:
	/home/weichen/projects/Agent-System/deploy/postgres/goose/00048_2026-09-16-software-project-type.sql
	/home/weichen/projects/Agent-System/deploy/postgres/goose/00048_2026-09-16-software-project-bootstrap-fields.sql [recovered, repanicked]

goroutine 8 [running]:
testing.tRunner.func1.2({0x179a7e0, 0x69347922100})
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/testing/testing.go:2123 +0x232
testing.tRunner.func1()
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/testing/testing.go:2126 +0x329
panic({0x179a7e0?, 0x69347922100?})
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/runtime/panic.go:859 +0x125
github.com/pressly/goose/v3.Migrations.Less({0x69347c40600, 0x69347934048?, 0xc?}, 0x30, 0x2f)
	/home/weichen/go/pkg/mod/github.com/pressly/goose/v3@v3.24.1/migrate.go:35 +0x127
sort.partialInsertionSort({0x1893f00, 0x69347934048}, 0x0, 0x31)
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/sort/zsortinterface.go:202 +0x7b
sort.pdqsort({0x1893f00, 0x69347934048}, 0x187aac0?, 0x0?, 0x69347956f8a?)
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/sort/zsortinterface.go:101 +0x16c
sort.Sort({0x1893f00, 0x69347934048})
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/sort/sort.go:56 +0x54
github.com/pressly/goose/v3.sortAndConnectMigrations({0x69347c40600, 0x31, 0x40})
	/home/weichen/go/pkg/mod/github.com/pressly/goose/v3@v3.24.1/migrate.go:178 +0x35
github.com/pressly/goose/v3.collectMigrationsFS({0x188ce60, 0x1a0db60}, {0x693477ce500, 0x39}, 0x0, 0x7fffffffffffffff, 0x69347ae60c0)
	/home/weichen/go/pkg/mod/github.com/pressly/goose/v3@v3.24.1/migrate.go:168 +0x594
github.com/pressly/goose/v3.CollectMigrations(...)
	/home/weichen/go/pkg/mod/github.com/pressly/goose/v3@v3.24.1/migrate.go:174
github.com/pressly/goose/v3.UpToContext({0x1894b80, 0x693479384d0}, 0x693479545b0, {0x693477ce500, 0x39}, 0x7fffffffffffffff, {0x0, 0x0, 0x13?})
	/home/weichen/go/pkg/mod/github.com/pressly/goose/v3@v3.24.1/up.go:46 +0xf1
github.com/pressly/goose/v3.UpContext(...)
	/home/weichen/go/pkg/mod/github.com/pressly/goose/v3@v3.24.1/up.go:168
chat-agent-system/internal/db.RunMigrations({0x1894b80, 0x693479384d0}, 0x69347bb8000, {0xe533e5?, 0x6934799d608?})
	/home/weichen/projects/Agent-System/internal/db/migrate.go:40 +0x2fd
chat-agent-system/internal/server_test.openPGPoolWithMigrations(0x6934798d8c8)
	/home/weichen/projects/Agent-System/internal/server/workflow_governance_pg_test.go:40 +0x230
chat-agent-system/internal/server_test.TestWorkflowGovernance_PiAgent_PG_FullNoneMixedChain(0x6934798d8c8)
	/home/weichen/projects/Agent-System/internal/server/workflow_governance_full_none_piagent_pg_test.go:32 +0xe5
testing.tRunner(0x6934798d8c8, 0x1898c88)
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/testing/testing.go:2193 +0xea
created by testing.(*T).Run in goroutine 1
	/home/linuxbrew/.linuxbrew/Cellar/go/1.27.1/libexec/src/testing/testing.go:2258 +0x4d4
FAIL	chat-agent-system/internal/server	0.013s
FAIL
