Capture current mission, AI, map and administration development

Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
2026-10-13 22:52:53 +02:00
parent a951a96edc
commit 6a667d8deb
8104 changed files with 2124945 additions and 2061 deletions
@@ -0,0 +1 @@
PASS: actual HQ mine/magazine claim separation, real demand methods, exact token cleanup and original authority gates; native availability doubled
@@ -0,0 +1,19 @@
check: /tmp/err-policy-14q1vh4d/check.cpp:59: int main(): Assertion `accepted==(mines==cargo)' failed.
Traceback (most recent call last):
File "/tmp/erri-depot-mines-review-1116/tests/test_ground_depot_mine_claim.py", line 18, in <module>
run(r'''
~~~^^^^^
#include <cassert>
^^^^^^^^^^^^^^^^^^
...<25 lines>...
}
^
'''.replace('DEMAND',demand).replace('HQMETHODS',hq))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jakub/devel/escapistsrereintroduced/tests/policy_harness.py", line 14, in run
subprocess.run([str(p/'check')],check=True)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/subprocess.py", line 578, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/tmp/err-policy-14q1vh4d/check']' died with <Signals.SIGABRT: 6>.
@@ -0,0 +1,44 @@
{
"complete": true,
"test_frozen": true,
"registration": "tests/test_ground_depot_mine_claim.py",
"test_scope": "Actual HQ ReserveGroundDepot/ReleaseGroundDepot and actual service DepotNeeded/DepotMineNeeded. Native availability/current/batch boundaries explicitly doubled.",
"result": "PASS; wrong mine-vs-magazine gate mutation compiles and fails accepted cargo assertion.",
"source_review": "No remaining blocker in exact reviewed bytes. Core captures exact authored resource identity without AI reference. Upper layers pin cargo class, require ReadyMine at each phase/submission/after native callbacks and final import, separate typed demand counters, exact original custody and reciprocal slots. Existing reservation/claim retention survives cancellation; state7 only settles old proof, never imports. No engineer grant or downstream entitlement policy changed.",
"native_witness": "Root WB-only stock assertion reviewed clean; read-only initial stock identity/inert/custody proof, not courier proof.",
"limits": "No native launch, no autonomous delivery/MP/physical navigation claim. No broad suite.",
"hashes": {
"/tmp/erri-depot-mines-review-1116/tests/test_ground_depot_mine_claim.py": "dfe117f58cdf420974fc0d821b1a4153c9fd4da7585fb3e6b872a418d22d2083",
"/tmp/erri-depot-mines-root-1116/proposal/addons/core/Scripts/Game/ERR/10_AI/ERR_GroundDepotHQ.c": "c51fccd0ecdb0a1d6ba99ae965e2e572fc1ea65a5d8dc2e1e2a058698dae45c3",
"/tmp/erri-depot-mines-stock-1116/addons/core/Scripts/Game/ERR/10_AI/ERR_InfantryResupply.c": "85841b8179e7bf54f475617596292bc590a20438accf9ef74f265e1469dfc2f9",
"/tmp/erri-depot-mines-review-1116/green.log": "54c4f20daef8efe2927372f274a749d4e9a5c7d87332233d6b2d18994adb0a78",
"/tmp/erri-depot-mines-review-1116/mutation-red.log": "d75b0e11420dae2fbe88afa2375cb7b1e0a738f8b10eee32f6c147c5247d6ae6",
"/tmp/erri-depot-mines-review-1116/test.patch": "6489fe922e28489cf934536973275930fbbbe727c9f67da2592ac34233730a00",
"/tmp/erri-depot-mines-courier-1116/source-manifest.json": "16efa4bc1772e09dc652537767f6f82b922977ea61650665c2cf8e70d9168c72",
"/tmp/erri-depot-mines-courier-1116/fix.patch": "c01e2c03b54a64c7546e291261418ec6524e79fc74bfa550b16a6c88620deaa3",
"/tmp/erri-depot-mines-stock-1116/fix.patch": "c7273b6800da3600cc49348000b139a5caaf50bc6395640d5ff59c674c0fdb43",
"/tmp/erri-depot-mines-stock-1116/source-manifest.json": "b89783db5e2ad1d70942a3b106d34400e65ec3fda3bc2e62e3386d572c740e68",
"/tmp/erri-depot-mines-stock-1116/report.json": "5abf69a94be0cd4490f8b9d473ee031876af4f317ff2b6dc53805b31cc4a0f3e",
"/tmp/erri-depot-mines-root-1116/proposal/addons/core/Scripts/Game/ERR/40_Chat/ERR_NativeSmoke.c": "595fce681ec74e0d3ffe7a29c527c1551874469108ded479bed72a0fcf6c732e"
},
"reviewed_artifact_hashes": {
"/tmp/erri-depot-mines-stock-1116/addons/core/Scripts/Game/ERR/10_AI/ERR_InfantryResupply.c": "1bfc1079961eaecee0c1ebb434570aaeb359c008f9f309033b33582092557b35",
"/tmp/erri-depot-mines-stock-1116/addons/core/Scripts/Game/ERR/00_Core/ERR_SiteService.c": "15a28876954bbbe0e80d5b5b19e7336f154023cd05b67d65dd709ae7fd9ac712",
"/tmp/erri-depot-mines-stock-1116/addons/core/Configs/ERR/EveronSites.conf": "a66c30039c7141e5a0f22af21aa522728fe4aa5cde821158aea3b716d11457a1",
"/tmp/erri-depot-mines-stock-1116/tests/test_ground_depot_provenance.py": "a56a0402ee255e2824fc65ec5cc613088013e2795413e484161bab7e28f45c85",
"/tmp/erri-depot-mines-stock-1116/provenance-green.log": "e26ca35beb9bdd2800680a97f46df2693145f8ed2d63e42c745c73e3238d2205",
"/tmp/erri-depot-mines-courier-1116/addons/core/Scripts/Game/ERR/10_AI/ERR_GroundDepotTransfer.c": "21daa9ed8cb5f2dc08a0fa85e305fa4b4f3e7b01e16c71fd1ca98d66a4e8b652",
"/tmp/erri-depot-mines-courier-1116/addons/core/Scripts/Game/ERR/10_AI/ERR_GroundDepotLoading.c": "6abb278409527bb67db084138a773de240d99ba7f63f9ac740f8167615d53f1d",
"/tmp/erri-depot-mines-courier-1116/tests/test_ground_depot_loading.py": "1e44647933a248dc80636de63a6d690efce2bc4c38316c31bb27264682861755",
"/tmp/erri-depot-mines-courier-1116/tests/test_ground_depot_transfer.py": "d468f015f24d4bafbfdac4dabd27acd4282fa84e154f83f46aec96319d54ef36",
"/tmp/erri-depot-mines-courier-1116/leaf-green.log": "897cec0577c062d00bb7ff774b52bb5147193d2752088deed78b84a2b235f4d5",
"/tmp/erri-depot-mines-courier-1116/loader-green.log": "491d5709202ea176318751587693c7929ef8f4710bbc00a1a27f3aa45ba0158b"
},
"core_layering_resolved": true,
"owner_test_review": "Loader actual Plan/SelectWorker/Tick/ClaimDelivery/DeliveredTo+import covers mine-only success, wrong-class rejection, armed-state interruptions, vanished demand and lateproof no-import. Full leaf harness retains original custody/Stop cases and adds PMN4 Cargo controls. Source provenance/import actual harness green. Native boundaries remain doubled.",
"approval_scope": "Exact hashes recorded; any later source/test changes require recheck. Owner final manifests may be issued after this review; reviewed bytes are authoritative.",
"compiler_work_finished": true,
"courier_final_manifest_checked": true,
"stock_final_manifest_checked": true,
"final_hash_drift_review": "Service byte reconstruction confirms only Status initial\u2192allowance. Final provenance test reread in full: explicit feature absence assertion, authored-resource Core capture adapter and Core-to-AI dependency assertion, actual typed mine demand/import with custody/cap/cancellation controls; no blocker. Not claiming test drift was solely one assertion. Root read-only native stock witness hash also bound."
}
@@ -0,0 +1,50 @@
--- /dev/null
+++ b/tests/test_ground_depot_mine_claim.py
@@ -0,0 +1,47 @@
+"""Actual HQ cargo-class reservation and service demand; native availability doubled."""
+import os,re
+from pathlib import Path
+from policy_harness import ROOT,body,run
+H=Path(os.environ.get('ERR_DEPOT_HQ_SOURCE',ROOT/'addons/core/Scripts/Game/ERR/10_AI/ERR_GroundDepotHQ.c'))
+S=Path(os.environ.get('ERR_INFANTRY_RESUPPLY_SOURCE',ROOT/'addons/core/Scripts/Game/ERR/10_AI/ERR_InfantryResupply.c'))
+def cpp(s):
+ s=s.replace('protected ','').replace('null','nullptr').replace('int committed;', 'int committed = 0;')
+ for typ in ('ERR_HQUnit','ERR_InfantryResupply','ERR_ConvoyVehicle'):
+ s=re.sub(r'\b'+typ+r' (\w+)',typ+r'* \1',s)
+ for name in ('m_Mode','crew','donor','service','truck'):
+ s=re.sub(r'\b'+name+r'\.',name+'->',s)
+ s=s.replace('Replication.IsServer()', 'server').replace('ERR_GameMode.Get()', 'current')
+ s=s.replace('foreach (IEntity item : m_Spent)', 'for (IEntity item : m_Spent)')
+ return s
+hq='\n'.join(cpp(body(H,x)) for x in ('bool ReserveGroundDepot(', 'void ReleaseGroundDepot('))
+demand='\n'.join(cpp(body(S,x)) for x in ('bool DepotNeeded(', 'bool DepotMineNeeded('))
+run(r'''
+#include <cassert>
+#include <vector>
+#include <algorithm>
+struct Entity{};using IEntity=Entity*;
+template<class T>struct Array:std::vector<T>{using std::vector<T>::vector;int Count(){return this->size();}bool Contains(T v){return std::find(this->begin(),this->end(),v)!=this->end();}};
+struct Group{};struct HQ;
+struct Mode{HQ*owner=nullptr;bool active=true;bool Active(){return active;}HQ*Command(){return owner;}};
+bool server=true;Mode*current=nullptr;
+struct ERR_HQUnit{struct Group*Group=nullptr;bool HomeGuard=false,ReservedForSupport=false,Task=false,PendingTask=false,PendingCheckin=false,PendingConvoyOrder=false;int LogisticsReservation=0;};
+struct ERR_ConvoyVehicle{struct Group*Group=nullptr;int SupplyToken=0;bool SupplyHeld=false;};
+struct ERR_InfantryResupply{bool magAvailable=true,mineAvailable=true,captured=true;int m_DepotImports=0,m_DepotMineImports=0;Array<IEntity>m_Stock,m_MineStock,m_Spent;ERR_ConvoyVehicle*truck=nullptr;bool DepotAvailable(){return magAvailable;}bool DepotMineAvailable(){return mineAvailable;}bool CaptureMines(){return captured;}ERR_ConvoyVehicle*DepotTruck(){return truck;}
+DEMAND
+};
+struct HQ{Mode*m_Mode=nullptr;bool m_Stopping=false,eligible=true,reserve=true;Array<ERR_HQUnit*>m_Units;int claims=0,releases=0;bool MountedLogisticsEligible(ERR_HQUnit*){return eligible;}bool ReserveLogistics(Group*g,int token){if(!reserve)return false;for(auto*u:m_Units)if(u->Group==g){if(u->LogisticsReservation)return false;u->LogisticsReservation=token;claims++;return true;}return false;}void ReleaseLogistics(Group*g,int token){for(auto*u:m_Units)if(u->Group==g&&u->LogisticsReservation==token){u->LogisticsReservation=0;releases++;}}
+HQMETHODS
+};
+struct F{Mode mode;HQ h;Group cg,dg;ERR_HQUnit crew,donor;ERR_ConvoyVehicle truck;ERR_InfantryResupply s;Entity mine,mag,foreign;F(){server=true;current=&mode;mode.owner=&h;h.m_Mode=&mode;crew.Group=&cg;donor.Group=truck.Group=&dg;h.m_Units={&crew,&donor};s.truck=&truck;s.m_Stock={&mag};s.m_MineStock={&mine};}void Unclaimed(){assert(h.claims==0&&crew.LogisticsReservation==0&&donor.LogisticsReservation==0&&truck.SupplyToken==0&&!truck.SupplyHeld);}};
+int main(){
+ // Mine-only expenditure authorizes mine cargo only. Magazine-only is inverse.
+ for(bool mines:{false,true})for(bool cargo:{false,true}){F f;f.s.m_Spent={mines?&f.mine:&f.mag};bool accepted=f.h.ReserveGroundDepot(&f.crew,&f.donor,&f.s,300001,cargo);assert(accepted==(mines==cargo));if(!accepted)f.Unclaimed();else{assert(f.h.claims==1&&f.crew.LogisticsReservation==300001&&f.donor.LogisticsReservation==300001&&f.truck.SupplyToken==300001);assert(!f.h.ReserveGroundDepot(&f.crew,&f.donor,&f.s,300002,cargo));f.truck.SupplyHeld=true;f.h.ReleaseGroundDepot(&f.crew,&f.donor,&f.truck,300002);assert(f.truck.SupplyToken==300001&&f.truck.SupplyHeld);f.h.ReleaseGroundDepot(&f.crew,&f.donor,&f.truck,300001);assert(!f.crew.LogisticsReservation&&!f.donor.LogisticsReservation&&!f.truck.SupplyToken&&!f.truck.SupplyHeld);}}
+ // Null/deleted/unrelated spent identities and satisfied imported demand never count.
+ for(bool mines:{false,true})for(int k=0;k<4;k++){F f;if(k==0){f.s.m_Spent={nullptr};f.s.m_Stock.push_back(nullptr);f.s.m_MineStock.push_back(nullptr);}if(k==1)f.s.m_Spent={&f.foreign};if(k==2){f.s.m_Spent={mines?&f.mine:&f.mag};if(mines)f.s.m_DepotMineImports=1;else f.s.m_DepotImports=1;}if(k==3){f.s.m_Spent={mines?&f.mine:&f.mag};if(mines)f.s.mineAvailable=false;else f.s.magAvailable=false;}assert(!f.h.ReserveGroundDepot(&f.crew,&f.donor,&f.s,300001,mines));f.Unclaimed();}
+ // Existing authority, task ownership and token gates apply equally to mine jobs.
+ for(int k=0;k<15;k++){F f;f.s.m_Spent={&f.mine};int token=300001;if(k==0)server=false;if(k==1)f.h.m_Stopping=true;if(k==2)current=nullptr;if(k==3)f.mode.active=false;if(k==4)f.mode.owner=nullptr;if(k==5)token=300000;if(k==6)token=300097;if(k==7)f.h.m_Units.clear();if(k==8)f.h.eligible=false;if(k==9)f.crew.HomeGuard=true;if(k==10)f.crew.ReservedForSupport=true;if(k==11)f.crew.PendingCheckin=true;if(k==12)f.crew.PendingConvoyOrder=true;if(k==13)f.h.reserve=false;if(k==14)f.truck.Group=&f.cg;assert(!f.h.ReserveGroundDepot(&f.crew,&f.donor,&f.s,token,true));f.Unclaimed();}
+ // Legacy default remains magazine demand; distinct import counters don't cross classes.
+ {F f;f.s.m_Spent={&f.mag,&f.mine};f.s.m_DepotMineImports=1;assert(!f.s.DepotMineNeeded()&&f.s.DepotNeeded());assert(f.h.ReserveGroundDepot(&f.crew,&f.donor,&f.s,300001));}
+}
+'''.replace('DEMAND',demand).replace('HQMETHODS',hq))
+print('PASS: actual HQ mine/magazine claim separation, real demand methods, exact token cleanup and original authority gates; native availability doubled')