fix: 修正 2026.10.06 的 UP_ActionSend (176)、UP_ClientTrigger (872) 与 DOWN_PingRsp (581)
This commit is contained in:
@@ -17,7 +17,7 @@ public static class CurrentProtocolEvidence
|
|||||||
|
|
||||||
private static readonly (int Opcode,string Name)[] Downstream20261006 =
|
private static readonly (int Opcode,string Name)[] Downstream20261006 =
|
||||||
[
|
[
|
||||||
(338,"DOWN_PingRsp"),
|
(581,"DOWN_PingRsp"),
|
||||||
(673,"DOWN_UpdateHate"),
|
(673,"DOWN_UpdateHate"),
|
||||||
(171,"DOWN_UpdateHater"),
|
(171,"DOWN_UpdateHater"),
|
||||||
(549,"DOWN_EffectResultBasic"),
|
(549,"DOWN_EffectResultBasic"),
|
||||||
|
|||||||
+11
-10
@@ -729,12 +729,12 @@ Test("verified PingRsp fills only missing mappings for the audited version",()=>
|
|||||||
const string v=PacketParser.AuditedClientVersion;
|
const string v=PacketParser.AuditedClientVersion;
|
||||||
var map=new OpcodeMap();
|
var map=new OpcodeMap();
|
||||||
map.Load($$$"""{"{{{v}}}":{"UP_PingReq":[838]}}""",v,"test");
|
map.Load($$$"""{"{{{v}}}":{"UP_PingReq":[838]}}""",v,"test");
|
||||||
Check(map.Resolve(v,PacketDirection.Down,338)=="DOWN_PingRsp"); Check(map.Snapshot.Source.Contains("本机核实"));
|
Check(map.Resolve(v,PacketDirection.Down,581)=="DOWN_PingRsp"); Check(map.Snapshot.Source.Contains("本机核实"));
|
||||||
map.Load($$$"""{"{{{v}}}":{"DOWN_Explicit":[338]}}""",v,"test");
|
map.Load($$$"""{"{{{v}}}":{"DOWN_Explicit":[581]}}""",v,"test");
|
||||||
Check(map.Resolve(v,PacketDirection.Down,338)=="DOWN_Explicit");
|
Check(map.Resolve(v,PacketDirection.Down,581)=="DOWN_Explicit");
|
||||||
map.Load($$$"""{"{{{v}}}":{"DOWN_PingRsp":[339]}}""",v,"test");
|
map.Load($$$"""{"{{{v}}}":{"DOWN_PingRsp":[582]}}""",v,"test");
|
||||||
Check(map.Resolve(v,PacketDirection.Down,338)==null);
|
Check(map.Resolve(v,PacketDirection.Down,581)==null);
|
||||||
map.Load("""{"other":{"UP_PingReq":[838]}}""","other","test"); Check(map.Resolve("other",PacketDirection.Down,338)==null);
|
map.Load("""{"other":{"UP_PingReq":[838]}}""","other","test"); Check(map.Resolve("other",PacketDirection.Down,581)==null);
|
||||||
Throws<InvalidDataException>(()=>map.Load($$$"""{"{{{v}}}":{}}""",v,"test"));
|
Throws<InvalidDataException>(()=>map.Load($$$"""{"{{{v}}}":{}}""",v,"test"));
|
||||||
});
|
});
|
||||||
Test("current Ping pairs require full exact-length payload and matching echo",()=>
|
Test("current Ping pairs require full exact-length payload and matching echo",()=>
|
||||||
@@ -746,7 +746,7 @@ Test("current Ping pairs require full exact-length payload and matching echo",()
|
|||||||
BinaryPrimitives.WriteUInt32LittleEndian(response.AsSpan(4),333); // not RTT; do not use it as elapsed time
|
BinaryPrimitives.WriteUInt32LittleEndian(response.AsSpan(4),333); // not RTT; do not use it as elapsed time
|
||||||
var time=DateTimeOffset.UtcNow;
|
var time=DateTimeOffset.UtcNow;
|
||||||
var a=new PacketRecord(1,0,time,PacketDirection.Up,838,v,null,null,request);
|
var a=new PacketRecord(1,0,time,PacketDirection.Up,838,v,null,null,request);
|
||||||
var b=new PacketRecord(2,0,time.AddMilliseconds(83),PacketDirection.Down,338,v,null,null,response);
|
var b=new PacketRecord(2,0,time.AddMilliseconds(83),PacketDirection.Down,581,v,null,null,response);
|
||||||
var pairs=PacketCorrelator.Ping([a,b],map); Check(pairs.Length==1 && pairs[0].Elapsed.TotalMilliseconds==83);
|
var pairs=PacketCorrelator.Ping([a,b],map); Check(pairs.Length==1 && pairs[0].Elapsed.TotalMilliseconds==83);
|
||||||
Check(PacketCorrelator.Ping([a with {Payload=new byte[28]},b],map).Length==0);
|
Check(PacketCorrelator.Ping([a with {Payload=new byte[28]},b],map).Length==0);
|
||||||
Check(PacketCorrelator.Ping([a,b with {PayloadComplete=false}],map).Length==0);
|
Check(PacketCorrelator.Ping([a,b with {PayloadComplete=false}],map).Length==0);
|
||||||
@@ -764,7 +764,7 @@ Test("audited protocol additions preserve explicit opcode and name assignments",
|
|||||||
var downAudited=new Dictionary<int,string>{{673,"DOWN_Explicit"},{100,"DOWN_UpdateHater"}};
|
var downAudited=new Dictionary<int,string>{{673,"DOWN_Explicit"},{100,"DOWN_UpdateHater"}};
|
||||||
Check(CurrentProtocolEvidence.AddMissing(PacketParser.AuditedClientVersion,downAudited)==5);
|
Check(CurrentProtocolEvidence.AddMissing(PacketParser.AuditedClientVersion,downAudited)==5);
|
||||||
Check(downAudited[673]=="DOWN_Explicit" && !downAudited.ContainsKey(171));
|
Check(downAudited[673]=="DOWN_Explicit" && !downAudited.ContainsKey(171));
|
||||||
Check(downAudited[549]=="DOWN_EffectResultBasic" && downAudited[338]=="DOWN_PingRsp");
|
Check(downAudited[549]=="DOWN_EffectResultBasic" && downAudited[581]=="DOWN_PingRsp");
|
||||||
Check(CurrentProtocolEvidence.AddMissing(PacketParser.AuditedClientVersion,downAudited)==0);
|
Check(CurrentProtocolEvidence.AddMissing(PacketParser.AuditedClientVersion,downAudited)==0);
|
||||||
});
|
});
|
||||||
Test("enmity parsers respect capacities and native byte value stride",()=>
|
Test("enmity parsers respect capacities and native byte value stride",()=>
|
||||||
@@ -1101,8 +1101,9 @@ Test("opcodes.json loads cleanly without conflicts and resolves dual-version aud
|
|||||||
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_StatusEffectList")==718);
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_StatusEffectList")==718);
|
||||||
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_EffectResult")==242);
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_EffectResult")==242);
|
||||||
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_InventoryTransaction")==136);
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_InventoryTransaction")==136);
|
||||||
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_InventoryTransactionFinish")==813);
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_ActionSend")==176);
|
||||||
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_ActionSend")==872);
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_ClientTrigger")==872);
|
||||||
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_PingRsp")==581);
|
||||||
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_PingReq")==137);
|
Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_PingReq")==137);
|
||||||
|
|
||||||
// 2026.09.15.0000.0000 baseline verification
|
// 2026.09.15.0000.0000 baseline verification
|
||||||
|
|||||||
+3
-3
@@ -4661,7 +4661,7 @@
|
|||||||
362
|
362
|
||||||
],
|
],
|
||||||
"DOWN_PingRsp": [
|
"DOWN_PingRsp": [
|
||||||
338
|
581
|
||||||
],
|
],
|
||||||
"DOWN_PlaceFieldMarker": [
|
"DOWN_PlaceFieldMarker": [
|
||||||
641
|
641
|
||||||
@@ -4741,7 +4741,7 @@
|
|||||||
339
|
339
|
||||||
],
|
],
|
||||||
"UP_ActionSend": [
|
"UP_ActionSend": [
|
||||||
872
|
176
|
||||||
],
|
],
|
||||||
"UP_ActionSendPos": [
|
"UP_ActionSendPos": [
|
||||||
891
|
891
|
||||||
@@ -4750,7 +4750,7 @@
|
|||||||
560
|
560
|
||||||
],
|
],
|
||||||
"UP_ClientTrigger": [
|
"UP_ClientTrigger": [
|
||||||
391
|
872
|
||||||
],
|
],
|
||||||
"UP_EventAction": [
|
"UP_EventAction": [
|
||||||
140
|
140
|
||||||
|
|||||||
Reference in New Issue
Block a user