=== Idempotency 3x (sequential, all scope-aware tests) === === TestSeedAutoNumberCounters_Idempotent_3x === {"level":"warn","time":"2026-04-18T06:58:37+08:00","message":"SECURITY: JWT_SECRET not set — using ephemeral random secret (tokens will not survive restarts). Set JWT_SECRET for persistent sessions."} === RUN TestSeedAutoNumberCounters_Idempotent_3x 2026/04/18 06:58:38 🔄 Reconciling system table columns... 2026/04/18 06:58:40 ⚠️ Column _System_Table.IsManaged type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column _System_Table.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Profile.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Profile.IsSystem type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Profile.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column UserRole.RollupDescription type drift detected: DB=varchar(255), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column User.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column User.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column _System_Session.Token type drift detected: DB=varchar(750), expected=string (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Report.BooleanFilter type drift detected: DB=varchar(500), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column SharingRule.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Group.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column CampaignMemberStatus.SortOrder type drift detected: DB=decimal(65,30), expected=INT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column PermissionSet.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column PermissionSet.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column PermissionSetAssignment.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column PermissionSetGroup.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column PermissionSetGroup.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Flow.CreatedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ⚠️ Column Flow.LastModifiedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:58:40 ✅ Column reconciliation complete (0 added, 0 modified, 1.947s) --- PASS: TestSeedAutoNumberCounters_Idempotent_3x (19.96s) PASS ok github.com/nexuscrm/backend/internal/bootstrap 20.795s 22.44 real 0.66 user 0.86 sys === TestSeedAutoNumberCounters_ScopeAwareGreatest === {"level":"warn","time":"2026-04-18T06:58:59+08:00","message":"SECURITY: JWT_SECRET not set — using ephemeral random secret (tokens will not survive restarts). Set JWT_SECRET for persistent sessions."} === RUN TestSeedAutoNumberCounters_ScopeAwareGreatest 2026/04/18 06:59:01 🔄 Reconciling system table columns... 2026/04/18 06:59:04 ⚠️ Column _System_Table.IsManaged type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column _System_Table.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Profile.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Profile.IsSystem type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Profile.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column UserRole.RollupDescription type drift detected: DB=varchar(255), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column User.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column User.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column _System_Session.Token type drift detected: DB=varchar(750), expected=string (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Report.BooleanFilter type drift detected: DB=varchar(500), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column SharingRule.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Group.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column CampaignMemberStatus.SortOrder type drift detected: DB=decimal(65,30), expected=INT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column PermissionSet.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column PermissionSet.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column PermissionSetAssignment.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column PermissionSetGroup.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column PermissionSetGroup.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Flow.CreatedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ⚠️ Column Flow.LastModifiedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:04 ✅ Column reconciliation complete (0 added, 0 modified, 3.799s) --- PASS: TestSeedAutoNumberCounters_ScopeAwareGreatest (20.80s) PASS ok github.com/nexuscrm/backend/internal/bootstrap 21.093s 22.51 real 0.67 user 0.84 sys === TestSeedAutoNumberCounters_PartialFailRecovery === {"level":"warn","time":"2026-04-18T06:59:21+08:00","message":"SECURITY: JWT_SECRET not set — using ephemeral random secret (tokens will not survive restarts). Set JWT_SECRET for persistent sessions."} === RUN TestSeedAutoNumberCounters_PartialFailRecovery 2026/04/18 06:59:23 🔄 Reconciling system table columns... 2026/04/18 06:59:31 ⚠️ Column _System_Table.IsManaged type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column _System_Table.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Profile.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Profile.IsSystem type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Profile.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column UserRole.RollupDescription type drift detected: DB=varchar(255), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column User.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column User.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column _System_Session.Token type drift detected: DB=varchar(750), expected=string (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Report.BooleanFilter type drift detected: DB=varchar(500), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column SharingRule.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Group.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column CampaignMemberStatus.SortOrder type drift detected: DB=decimal(65,30), expected=INT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column PermissionSet.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column PermissionSet.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column PermissionSetAssignment.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column PermissionSetGroup.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column PermissionSetGroup.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Flow.CreatedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ⚠️ Column Flow.LastModifiedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:31 ✅ Column reconciliation complete (0 added, 0 modified, 7.48s) --- PASS: TestSeedAutoNumberCounters_PartialFailRecovery (24.02s) PASS ok github.com/nexuscrm/backend/internal/bootstrap 24.316s 25.78 real 0.63 user 0.81 sys === TestVerifyAutoNumberInvariants_V3_FailsOnMissingCounter === {"level":"warn","time":"2026-04-18T06:59:47+08:00","message":"SECURITY: JWT_SECRET not set — using ephemeral random secret (tokens will not survive restarts). Set JWT_SECRET for persistent sessions."} === RUN TestVerifyAutoNumberInvariants_V3_FailsOnMissingCounter 2026/04/18 06:59:49 🔄 Reconciling system table columns... 2026/04/18 06:59:53 ⚠️ Column _System_Table.IsManaged type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column _System_Table.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Profile.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Profile.IsSystem type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Profile.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column UserRole.RollupDescription type drift detected: DB=varchar(255), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column User.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column User.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column _System_Session.Token type drift detected: DB=varchar(750), expected=string (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Report.BooleanFilter type drift detected: DB=varchar(500), expected=TEXT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column SharingRule.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Group.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column CampaignMemberStatus.SortOrder type drift detected: DB=decimal(65,30), expected=INT (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column PermissionSet.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column PermissionSet.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column PermissionSetAssignment.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column PermissionSetGroup.IsActive type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column PermissionSetGroup.IsDeleted type drift detected: DB=tinyint, expected=TINYINT(1) (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Flow.CreatedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ⚠️ Column Flow.LastModifiedDate type drift detected: DB=datetime(3), expected=DATETIME (non-VARCHAR change, skipping — use explicit migration) 2026/04/18 06:59:53 ✅ Column reconciliation complete (0 added, 0 modified, 4.838s) --- PASS: TestVerifyAutoNumberInvariants_V3_FailsOnMissingCounter (10.56s) PASS ok github.com/nexuscrm/backend/internal/bootstrap 10.844s 12.38 real 0.64 user 0.85 sys