feat(workflow): publish verified forecast controls and consolidated docs
Tests / test (push) Successful in 1m1s
Tests / test (push) Successful in 1m1s
Approved by Daniel Haefliger for develop and beta. Author dh_Agent, authenticated account dh. Preserve published battery, charging and overall Energy Pie changes. No deployment or plant control authorization.
This commit is contained in:
@@ -26,7 +26,7 @@ function curl_close($h):void {}
|
||||
class Lizenzpruefung {const NETZFAHRPLAN='test-only';}
|
||||
class FakeManager {
|
||||
use ManagerNetzfahrplanV4DatenTrait;
|
||||
public int $InstanceID=17004;public array $p=[],$a=[],$vars=[],$timers=[];public bool $licensed=true;
|
||||
public int $InstanceID=17004;public array $p=['PrognoseAktiv'=>false],$a=['PrognoseV4Einrichtungsfehler'=>''],$vars=[],$timers=[];public bool $licensed=true;
|
||||
public function boot():void {$this->registriereNetzfahrplanV4Daten();}
|
||||
public function configure():void {$this->konfiguriereNetzfahrplanV4Daten();}
|
||||
public function folder():string {return $this->v4DatenVerzeichnis();}
|
||||
@@ -46,6 +46,9 @@ class FakeManager {
|
||||
public function WriteAttributeInteger($k,$v){$this->a[$k]=$v;}
|
||||
public function SetValue($k,$v){if($k!=='NetzfahrplanV4Datenstatus')throw new \RuntimeException('Unexpected variable write');$this->vars[$k]=$v;}
|
||||
private function berechtigungLizenziert($k){return $this->licensed;}
|
||||
private function prognoseLernenAktiv(){return $this->p['PrognoseAktiv'];}
|
||||
private function prognoseV4Datensatz(){return $this->p['NetzfahrplanV4Datensatz'];}
|
||||
private function prognoseV4Messkonfiguration(){return $this->p['NetzfahrplanV4Messkonfiguration'];}
|
||||
}
|
||||
$c=['version'=>1,'installationId'=>'e3a08f9e-af12-4695-99bd-8b51c0520021','managerId'=>17004,
|
||||
'reportedInventorySha256'=>str_repeat('a',64),'accounting'=>['version'=>1,'maxSkewSeconds'=>30,'splitToleranceW'=>100.,'sources'=>[]],'extraSources'=>[]];
|
||||
@@ -54,8 +57,8 @@ foreach(['grid','pv','physical_storage','controlled_virtual','external_virtual']
|
||||
$sensor[$id]=['value'=>[3000,5000,2000,2000,0][$i],'updated'=>$clock,'changed'=>$clock];}
|
||||
$m=new FakeManager();$m->boot();$m->a['LizenzInstallationID']=$c['installationId'];$m->a['PrognoseInstallationsToken']='synthetic-not-a-real-token';
|
||||
try {
|
||||
$m->ErfasseNetzfahrplanV4Daten();check($sent===[],'disabled by default makes no network request');
|
||||
$m->p['NetzfahrplanV4MessdatenAktiv']=true;$m->p['NetzfahrplanV4Datensatz']='physical-v1';$m->p['NetzfahrplanV4Messkonfiguration']=json_encode($c);
|
||||
$m->ErfasseNetzfahrplanV4Daten();check($sent===[],'learning disabled makes no network request');
|
||||
$m->p['PrognoseAktiv']=true;$m->p['NetzfahrplanV4Datensatz']='physical-v1';$m->p['NetzfahrplanV4Messkonfiguration']=json_encode($c);
|
||||
$m->configure();check($m->timers['NetzfahrplanV4DatenErfassen']===30000,'only application acquisition timer enabled');
|
||||
$m->ErfasseNetzfahrplanV4Daten();check(count($sent)===1,'native capture delivered to existing device API');
|
||||
$cursor=$m->a['NetzfahrplanV4DatenCursor'];check(json_decode($cursor,true)['offset']>0,'matching ack commits durable byte cursor');
|
||||
@@ -86,7 +89,7 @@ try {
|
||||
$err=json_decode($m->vars['NetzfahrplanV4Datenstatus'],true);
|
||||
check($err['status']==='capture_error'&&$err['delivery']['status']==='acknowledged','capture failure does not deadlock pending delivery');
|
||||
check(count($sent)===$beforeCount+1&&str_ends_with(file_get_contents($file),'crash-tail'),'complete prefix sent while original incomplete tail retained');
|
||||
$m->p['NetzfahrplanV4MessdatenAktiv']=false;$m->configure();check($m->timers['NetzfahrplanV4DatenErfassen']===0,'disable affects acquisition only');
|
||||
$m->p['PrognoseAktiv']=false;$m->configure();check($m->timers['NetzfahrplanV4DatenErfassen']===0,'learning switch disables acquisition without discarding history');
|
||||
check(count($m->vars)===1,'only own manager data-status variable written');
|
||||
$text=file_get_contents(__DIR__.'/../../libs/ManagerNetzfahrplanV4DatenTrait.php');
|
||||
check(!preg_match('/\b(?:RequestAction\(|IPS_ApplyChanges\(|MC_Reload\(|schreibeRegister\()/',$text),'data path contains no actuator/module reload calls');
|
||||
|
||||
Reference in New Issue
Block a user