f826af8e8a
v2-ci / unit-tests (push) Waiting to run
Every applicable T13 leg passes on0c19f26c+c569f806. The leg list covers: - metadata and ServiceLevel bands; - standby projection; - alarm suppression with Standby ConditionRefresh and the promotion refresh; - the three D4 demotion timings, run live; - standby write and Part 9 refusal (BadInvalidState); - graceful and crash failover, with no failback; - subscription transfer; - the Mode=Unset regression. The two crash-path defects the gate found are fixed inc569f806. Evidence, rig files and the raw-client harness are in docs/plans/evidence/2026-11-13-717-t13/. Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
30 lines
3.2 KiB
SQL
30 lines
3.2 KiB
SQL
|
|
SET NOCOUNT ON; SET XACT_ABORT ON; BEGIN TRAN;
|
|
INSERT dbo.ServerCluster (ClusterId,Name,Enterprise,Site,NodeCount,RedundancyMode,Enabled,Notes,CreatedBy)
|
|
VALUES ('MAIN','Main cluster','zb','t13',2,'Warm',1,'717 T13 isolated pair','t13-seed');
|
|
INSERT dbo.ClusterNode (NodeId,ClusterId,Host,OpcUaPort,DashboardPort,AkkaPort,GrpcPort,ApplicationUri,ServiceLevelBase,Enabled,CreatedBy)
|
|
VALUES ('central-1:4053','MAIN','central-1',4840,8081,4053,4056,'urn:OtOpcUa:central-1',200,1,'t13-seed'),
|
|
('central-2:4053','MAIN','central-2',4840,8081,4053,4056,'urn:OtOpcUa:central-2',150,1,'t13-seed');
|
|
INSERT dbo.Script (ScriptId,Name,SourceCode,SourceHash,Language) VALUES
|
|
('SC-t13-calc','T13-Calc',N'return (int)(ctx.Now.TimeOfDay.TotalSeconds);','1476d80c7a7a30dfe7c60c1b01c5703e09df49289f855507bb1047ae4ee03e06','CSharp'),
|
|
('SC-t13-wr','T13-Writable',N'return 0;','6be2e46a3d0765fd4d08def164c35b75afcc481db6fd11cc5118c4e2c20b634d','CSharp'),
|
|
('SC-t13-vt','T13-VT',N'return ctx.Now.Second;','0dede8751d015ae75a5b8b0c48a3d059bea7d3af38dd31833a0ebd09be72153f','CSharp'),
|
|
('SC-t13-alarm','T13-AlarmPredicate',N'var v = ctx.GetTag("t13-calc/Device1/calc-seconds"); if (v.Value is null) return false; return (System.Convert.ToInt32(v.Value) / 60) % 2 == 0;','e1a76a504472219eda6bf2e41a60c3522c5c87fee3ef12f599a60cc7211b389b','CSharp');
|
|
INSERT dbo.DriverInstance (DriverInstanceId,ClusterId,Name,DriverType,Enabled,DriverConfig)
|
|
VALUES ('DI-t13-calc','MAIN','t13-calc','Calculation',1,'{}');
|
|
INSERT dbo.Device (DeviceId,DriverInstanceId,Name,Enabled,DeviceConfig) VALUES ('DEV-t13-1','DI-t13-calc','Device1',1,'{}');
|
|
INSERT dbo.Tag (TagId,DeviceId,Name,DataType,AccessLevel,WriteIdempotent,TagConfig) VALUES
|
|
('TAG-t13-sec','DEV-t13-1','calc-seconds','Int32','Read',0,'{"scriptId":"SC-t13-calc","changeTriggered":true,"timerIntervalMs":1000}'),
|
|
('TAG-t13-wr','DEV-t13-1','calc-writable','Int32','ReadWrite',0,'{"scriptId":"SC-t13-wr","changeTriggered":true,"timerIntervalMs":5000}');
|
|
INSERT dbo.UnsArea (UnsAreaId,ClusterId,Name) VALUES ('area-t13','MAIN','t13');
|
|
INSERT dbo.UnsLine (UnsLineId,UnsAreaId,Name) VALUES ('line-t13','area-t13','warm');
|
|
INSERT dbo.Equipment (EquipmentId,EquipmentUuid,UnsLineId,Name,MachineCode,Enabled) VALUES ('EQ-t13',NEWID(),'line-t13','t13-equipment','T13',1);
|
|
INSERT dbo.UnsTagReference (UnsTagReferenceId,EquipmentId,TagId,SortOrder) VALUES ('REF-t13-sec','EQ-t13','TAG-t13-sec',0),('REF-t13-wr','EQ-t13','TAG-t13-wr',1);
|
|
INSERT dbo.VirtualTag (VirtualTagId,EquipmentId,Name,DataType,ScriptId,ChangeTriggered,TimerIntervalMs,Historize,Enabled)
|
|
VALUES ('VT-t13-second','EQ-t13','vt-second','Int32','SC-t13-vt',1,1000,0,1);
|
|
INSERT dbo.ScriptedAlarm (ScriptedAlarmId,EquipmentId,Name,AlarmType,Severity,MessageTemplate,PredicateScriptId,HistorizeToAveva,Retain,Enabled)
|
|
VALUES ('AL-t13-minute','EQ-t13','t13-even-minute','OffNormalAlarm',600,'T13 even minute','SC-t13-alarm',0,1,1);
|
|
INSERT dbo.ApiKey (ApiKeyId,Name,SecretHash,Principal,Enabled,CreatedUtc,Notes) VALUES ('a1b2c3d4e5f60718','t13-operator','<HMAC-SHA256(secret, pepper) base64>','t13-op',1,SYSUTCDATETIME(),'T13 harness');
|
|
INSERT dbo.NodeAcl (NodeAclId,ClusterId,Principal,ScopeKind,ScopeId,PermissionFlags,Notes) VALUES ('ACL-t13-op','MAIN','t13-op','Cluster',NULL,8191,'T13 harness');
|
|
COMMIT;
|