Add the storage-migrate tool: inventory, backup, and identity-governed migration (U4) #144

Merged
weichen merged 2 commits from feature/collab-storage-u4-migrator into main 2026-10-11 08:30:59 +00:00
Owner

Plan U4/R7: cmd/storage-migrate with inventory/backup/migrate; migration identity (migration_id + snapshot SHA-256 + schema version) in target migration_control; same-snapshot-only resume; foreign/non-empty target refusal; per-table counts and PK-ordered hash-chain checksums with symmetric bool normalization; serial advance after copy; generated columns and FTS shadow tables excluded; unknown owners block; secrets never in reports. Real-PG integration tests green twice. Refs: plan U4, section 6; runbook section 10.

Plan U4/R7: cmd/storage-migrate with inventory/backup/migrate; migration identity (migration_id + snapshot SHA-256 + schema version) in target migration_control; same-snapshot-only resume; foreign/non-empty target refusal; per-table counts and PK-ordered hash-chain checksums with symmetric bool normalization; serial advance after copy; generated columns and FTS shadow tables excluded; unknown owners block; secrets never in reports. Real-PG integration tests green twice. Refs: plan U4, section 6; runbook section 10.
weichen added 1 commit 2026-10-11 08:30:03 +00:00
Why: plan U4/R7 - the SQLite-to-PostgreSQL path needs a managed entry that never replays SQLite dumps as PG SQL, fixes migration identity against a frozen snapshot, refuses foreign or non-empty targets, verifies per-table counts and ordered checksums, and keeps secrets out of reports (KTD14).

Evidence: integration tests against real PostgreSQL green twice (end-to-end with bool/NULL/Unicode/BLOB/sequence assertions, idempotent rerun, interrupted-table resume, foreign-data and wrong-snapshot refusals, unknown-owner block); SQLite unit tests for inventory/backup/coverage; full backend suite green on both tiers.

Impact: new cmd/storage-migrate binary (make build now emits bin/storage-migrate); store gains a DB() accessor documented for ops tooling; no server or runtime behavior change.

Refs: proposals/2026-10-11-collaboration-storage-and-distribution.md U4 and section 6; docs/guides/team-storage.md section 10.
weichen added 1 commit 2026-10-11 08:30:54 +00:00
Merge authoritative main into the task branch
ci / vet-and-test (pull_request) Failing after 41s
40be71a3f1
weichen merged commit e3b1e0310e into main 2026-10-11 08:30:59 +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#144