Replace schema-seeded role singletons during storage migration #214

Merged
weichen merged 1 commits from fix/storage-migrate-seeded-role-singletons into main 2026-10-18 14:52:42 +00:00
Owner

Why: IAM U4 added the schema-seeded singletons authority_state and role_authority_import_state to the storage-migrate copy order; on a fresh PostgreSQL target they counted as existing business rows, so every migration was refused, and the copy would have kept the target's seeded rows. Dev PR #619 test-pg caught it (v0.6.0 passes, v0.7.0 fails).
Evidence: agent-exec transport d8d7b8b (cursor worker, unit backend-storage-migrate-seeded-role-singletons-r2, SELF); local PostgreSQL 16 run of ./cmd/storage-migrate passes including the five previously failing tests and two new PostgreSQL-free regression tests; full go vet + go test pass (SELF). GATE is this PR's CI and Dev PR #619 test-pg.
Impact: storage-migrate treats the three schema-seeded singletons as one set: excluded from the empty-target check and replaced from the source during copy.
Refs: Backend PR #213, Dev PR #619

Why: IAM U4 added the schema-seeded singletons authority_state and role_authority_import_state to the storage-migrate copy order; on a fresh PostgreSQL target they counted as existing business rows, so every migration was refused, and the copy would have kept the target's seeded rows. Dev PR #619 test-pg caught it (v0.6.0 passes, v0.7.0 fails). Evidence: agent-exec transport d8d7b8b (cursor worker, unit backend-storage-migrate-seeded-role-singletons-r2, SELF); local PostgreSQL 16 run of ./cmd/storage-migrate passes including the five previously failing tests and two new PostgreSQL-free regression tests; full go vet + go test pass (SELF). GATE is this PR's CI and Dev PR #619 test-pg. Impact: storage-migrate treats the three schema-seeded singletons as one set: excluded from the empty-target check and replaced from the source during copy. Refs: Backend PR #213, Dev PR #619
weichen added 1 commit 2026-10-18 14:51:06 +00:00
agent-exec transport e22dcba544696b290bc056e1a51e4132/df1c90387b2b
ci / vet-and-test (pull_request) Successful in 1m2s
governance / governance (pull_request) Successful in 17s
d8d7b8bbeb
weichen merged commit 646dc57673 into main 2026-10-18 14:52:42 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#214