"""Ground pursuit retains delivered search sectors beyond mortar targeting age.""" from policy_harness import ROOT, body, run p=ROOT/'addons/core/Scripts/Game/ERR/10_AI/ERR_HQ.c' s=body(p,'void HunterContacts(').replace('out array contacts','Array& contacts').replace('ERR_HQBelief belief','ERR_HQBelief* belief').replace('m_Memory.','m_Memory->').replace('belief.','belief->').replace('Report.Snapshot()','Report->Snapshot()') run(r''' #include #include #include using string=std::string; templatestruct Array:std::vector{void Clear(){this->clear();}void Insert(T t){this->push_back(t);}}; struct ERR_HQReport{int copies=0;ERR_HQReport*Snapshot(){copies++;return this;}}; struct ERR_HQBelief{ERR_HQReport report;ERR_HQReport*Report=&report;bool actionable=true;string TravelMode="on foot";float ObservedAt=0,Radius=150;bool Actionable(){return actionable;}}; struct Memory{std::vector beliefs;int Count(){return beliefs.size();}ERR_HQBelief*At(int i){return beliefs[i];}}; struct HQ{Memory memory;Memory*m_Memory=&memory; '''+s+r''' }; int main(){ HQ h;ERR_HQBelief b;h.memory.beliefs={&b};Array out; h.HunterContacts(out,60001);assert(out.size()==1); // Lost visual contact isn't instant amnesia. h.HunterContacts(out,93000);assert(out.size()==1); // Last solo mission's abandoned approach. h.HunterContacts(out,300000);assert(out.size()==1); h.HunterContacts(out,300001);assert(out.empty()); b.Radius=500;h.HunterContacts(out,100000);assert(out.size()==1); b.Radius=501;h.HunterContacts(out,100000);assert(out.empty());b.Radius=150; b.actionable=false;h.HunterContacts(out,100000);assert(out.empty());b.actionable=true; b.TravelMode="aircraft";h.HunterContacts(out,100000);assert(out.empty());b.TravelMode="on foot"; b.ObservedAt=100001;h.HunterContacts(out,100000);assert(out.empty());b.ObservedAt=-1;h.HunterContacts(out,100000);assert(out.empty());b.ObservedAt=0; b.Report=nullptr;h.HunterContacts(out,100000);assert(out.empty());h.memory.beliefs={nullptr};h.HunterContacts(out,100000);assert(out.empty()); } ''') assert 'ERR_MortarPrediction.Fresh' in body(p,'void SupportContacts(') print('PASS: delivered ground search survives the 60-second mortar cutoff, with five-minute/500m uncertainty bounds and no live target reads; mortar policy unchanged')