Add community map records and telemetry API; record Workshop 0.0.126
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-10-30 14:19:39 +01:00
parent c6ee764c6c
commit 5453159867
26 changed files with 3201 additions and 20 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ def cpp(v):
return v
rules='\n'.join(cpp(body(p,x)) for x in ['static bool Acknowledged(', 'static int RetrySeconds(', 'static string Outcome('])
methods='\n'.join(cpp(body(p,x)) for x in ['bool Enabled(', 'void Refresh(', 'protected void Purge(', 'void Finish(', 'void PhaseChanged(', 'protected void Delivered(', 'protected void Failed(', 'void Close('])
methods=methods.replace('GetGame().GetCallqueue().CallLater(Pulse, 1, false)', 'pulses++')
run(r'''
#include <cassert>
#include <cmath>
@@ -34,6 +35,7 @@ struct Service {
State state;State* m_State=&state;RestCallback* m_Callback=nullptr;void* m_Context=nullptr;void* m_Mode=nullptr;
string m_InFlight;int m_Failures=0,m_Delivered=0,m_NextAttempt=0,samples=0,events=0,removed=0,saves=0;
string type,result;
int pulses=0;void UpdateCommunity(RestCallback*){}void CommunityUnavailable(){}
bool Current(){return current;}
void Sample(){samples++;}
void Event(string t,string o="",string p="",string prior=""){type=t;result=o;events++;}
@@ -86,7 +88,7 @@ assert lifecycle.index('m_ERRTelemetry.Finish(ERR_TelemetryRules.Outcome') < lif
assert '#ifdef WORKBENCH' in lifecycle and 'errTelemetryTest' in lifecycle
assert 'GetRestApi' not in lifecycle
assert 'm_State.pending.Count() >= 64' in s and 'payload.Length() > 65536' in s
assert s.index('if (m_Dirty && !Save()) return;') < s.index('m_Context.POST(')
assert s.index('if (m_Dirty && !Save())') < s.index('m_Context.POST(')
assert 'ReadValue("token"' in s and 'WriteValue("token", m_Config.Token)' in s
# Persisted event data must not contain authentication material.
event=body(p,'protected void Event(')