Files
T
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

107 lines
11 KiB
JSON

{
"verdict": "propose bounded independently implementable increment; do not implement by simply clearing lifetime latch",
"feature": "One finite physical engineer mine attempt at each genuinely new delivered, spatially separate HQ road post; at most four consumed attempts per original force and32 per mission.",
"concrete_trigger": "An original squad completes its first road-post job, still carries its second initial PMN4 (or receives one exact finite convoy PMN4), later actually receives a different valid road-interception assignment and physically arrives. Current EngineerMineAttempted remains true across ReleaseAssignment and DeliverOrder, so MaintainEngineerMines permanently skips the squad despite a new post and unused physical mine.",
"provenance": {
"original_file": "/home/jakub/devel/escapists/escapists-ai/Scripts/Game/EscapistsAI/EAI_HQRoadblocks.c",
"original_sha256": "128776f0b448162ee36cfc71b2a38d2cd06d6d6e4679253f215896aa3fcabb98",
"original_methods": [
"EAI_RoadblockVehicle.Order resets Mines=0 on new deployment",
"EAI_HQRoadblocks.UpdateUnit enforces unit.Mines<4 and m_Mines<32; successful Begin increments both; finished task schedules another attempt",
"UpdateUnit works inward (46-unit.Mines*6) to avoid crossing newly laid mines"
],
"difference": "Original four is per deployment, not lifetime. Proposed four per original force lifetime is deliberately stricter; it does not restore full same-post repeated laying or autonomous roadblock force creation."
},
"admission_contract": [
"Keep existing server/current active mode, exact original ForceRecord/source/roster, actual accepted Assignment+Task, RoadIntercept, no pending order/downlink/logistics/combat, arrived original actor and task expiry checks.",
"Replace boolean eligibility with immutable consumed-post ledger keyed to original ForceRecord identity plus source and detached delivered assignment/task evidence. Do not reset quota on HQUnit replacement or re-registration.",
"Require different delivered task/assignment, strictly newer delivered task.QueuedAt than this original force's last consumed post, and new source report identity or belief/revision. Message retransmission, same revision replay and same spatial post cannot create eligibility.",
"Consume a post attempt before its one site query, including no-site/no-item/native refusal; max4 per original force and32 globally. Record even failed selection; no timer retry, fresh-stock retry or resetting on task expiry.",
"Require no unfinished engineer job or unresolved original native removal associated with this original force/actor. Existing Finished() alone is not proof of settled callback because Stop retains removal evidence.",
"Choose only an existing original attributable actor and an actual carried unattempted unarmed exact PMN4 using current selection/custody rules. No changes to initial allowance, startup randomness, finite convoy stock or supply priority.",
"Existing new native group utility check remains authoritative before movement and throughout execution. Never widen Defend radius30 to fit a mine; candidates25..<30 in3D may qualify, other sites refuse."
],
"prior_site_safety": {
"ledger": "Keep up to32 immutable attempted-post positions and every selected mine position regardless of completion, cancellation, destruction or weak entity becoming null. Use own execution history, not player positions/world-wide mine scans. Do not use MineIntel as hazard registry: it records only successfully armed mines with surviving eligible folders.",
"coarse_separation": "Require each subsequent post to be more than160m XZ from every previously consumed mission post. This is conservative: two60m work areas plus two20m friendly-clearance margins do not overlap. It consumes no new road/nav query and deliberately refuses revisits, including by a different squad.",
"local_admission": "Before new Move, require actual actor within existing20m rally band, selected site in25\u201360m band, exact current group envelope approval; require the actor-to-site and site-to-rally straight corridors remain outside20m of every retained selected position. No candidate search around old hazards after a refusal.",
"active_guard": "Before further individual action/removal/placement/arming, refuse if original actor leaves the pinned60m work area or is within a conservative20m prior-site exclusion. Stop only its owned action; do not issue an emergency move through unknown terrain.",
"qualification_limit": "Separated local work areas and sampled position/corridor guards do not prove a native navigation route stays inside the disk or never crosses a distant mine. No such route guarantee should be claimed. Require a bounded native follow-up of two separated posts before calling physical repeated placement qualified; never widen or bypass native route checks to pass. Existing HQ squad travel to new posts remains unchanged and has the same native navigation limitation as today."
},
"async_lifetime": [
"Keep existing shared exact-item m_EngineerMineAttempts tombstones permanently for round; neither a new post nor resupply can reuse a previously attempted entity. Null entries are not free allowance.",
"Keep all max32 job objects until HQ Stop as today; add a read-only settlement predicate exposing pending removal after Stop. A pending callback on a surviving item blocks another job for same force; exact item deletion can settle impossibility, but arbitrary missing inventory/custody cannot.",
"Old assignment replacement/expiry invokes existing Stop; late removal remains inert and cannot arm, start new movement, refund quota or become the new job.",
"Existing180s job deadline,10s continuous preparation, friendly clearance and owned-item checks stay unchanged. Counters and exclusion positions survive post expiry and current job pointer replacement."
],
"production_files": [
{
"path": "addons/core/Scripts/Game/ERR/10_AI/ERR_HQ.c",
"methods": [
"ERR_HQUnit engineer bookkeeping",
"ERR_HQ.MaintainEngineerMines",
"ERR_HQ.Stop"
],
"scope": "Replace lifetime bool admission with bounded mission-owned consumed-post ledger; preserve per-round identity/quota, one query per Tick and max2 active jobs. Do not reset in ReleaseAssignment."
},
{
"path": "addons/core/Scripts/Game/ERR/10_AI/ERR_EngineerMine.c",
"methods": [
"Begin",
"Owned",
"Tick",
"new read-only unresolved-removal predicate"
],
"scope": "Pin job-local immutable prior-site positions and work area; expose callback settlement for subsequent admission; preserve all native move/remove/arm behavior and exact-item tombstones."
},
{
"path": "addons/core/Scripts/Game/ERR/10_AI/ERR_EngineerMinePosts.c (new)",
"methods": [
"Admit/Consume",
"PriorSites",
"WithinWorkArea/CorridorClear"
],
"scope": "Small pure bounded ledger and geometry helpers; cap32records,4per original force, no world queries, no native side effects. Alternative keep helper classes in EngineerMine.c to limit production files to2."
}
],
"unchanged_apis": [
"ERR_EngineerMineSite.Select",
"ERR_EnemyMineGrant",
"ERR_InfantryResupply/ERR_InfantryMineTransfer",
"ERR_MineIntel",
"HQ task/report schemas, radio network and orders"
],
"performance": {
"mission_site_queries_max": 32,
"active_jobs_max": 2,
"retained_jobs_max": 32,
"per_admission_ledger_scan_max": 32,
"prior_point_corridor_checks_max": 64,
"existing_selector_limits": "128roads,4096segments,128retained candidates,65536road-clearance comparisons, one site query per HQ Tick; do not increase.",
"note": "Retained finished job Tick currently returns immediately. Compare constant-sized ledger; no timer scans for refill, new environmental query, or native movement polling service."
},
"proposed_actual_method_tests": [
"Baseline actual MaintainEngineerMines: first consumed post then newly delivered distinct post with second real carried mine -> no second Begin; proposal performs one second admission.",
"Same task, same assignment replay, same belief revision/report, newer assignment at old/near post, expired pending or undelivered order cannot consume new work; no stock arrival reopens old post.",
"Four lifetime attempts and32global attempts including refusals remain spent after unit unregister/re-register; different original force sameSourceId cannot inherit identity.",
"Old accepted unresolved removal blocks fresh post; failure/custody ambiguity keeps quarantine; late callback cannot arm or mutate the new job. Exact deletion control if supported.",
"Preserve original item tombstone through same-item pickup/transfer, second initial mine succeeds, finite replacement succeeds only after exact actual supply; no generated stock.",
"Prior sites retained across cancellation/null mine references;160m boundary, crossing straight corridors and actor outside workarea refuse. Standard native radius30/3D checks still hold.",
"Native qualification separately: actual new delivered order, physical arrival and second distinct mine use at separated post; report injection if required must be explicit. No proof claimed from unit doubles alone."
],
"implementation_ownership": "One author owns HQ bookkeeping and EngineerMine/controller helper; independent peer owns actual-method ledger+controller regression. No resupply/schema/native fixture edits in initial patch.",
"rejection_conditions": [
"Reject a request to restore repeated same-post placement in this slice: current deterministic nearest-site selector plus no route history would revisit an armed location; original inward fixed-side method cannot be copied onto current same-defending-group geometry without a separate design.",
"Reject claiming fully safe routes based solely on post separation or straight-line checks. If parent requires guaranteed native route avoidance before implementation, defer repeated placement until an exact bounded native route-query contract is established."
],
"validation": "Read-only source design; no target edits, implementation, compiler tests or native runs.",
"current_source_sha256": {
"addons/core/Scripts/Game/ERR/10_AI/ERR_HQ.c": "5d66c53baf8762e76ae59e28721edaa348014af6d988d42891d9a84a6cf44969",
"addons/core/Scripts/Game/ERR/10_AI/ERR_EngineerMine.c": "fe05cb6e813155d76fd497788aa92c9dd8c7cf4ec43e017172a8a70e16c00b80",
"addons/core/Scripts/Game/ERR/10_AI/ERR_EngineerMineSite.c": "d838f5693d4fa5d252d529e59777f560674c02532f1041a5598e938b3a850839",
"addons/core/Scripts/Game/ERR/10_AI/ERR_InfantryResupply.c": "b01fa948f204d49acbfbdfc5fa641b1d914e0eb91081e92a93816ae52ae88b1e",
"addons/core/Scripts/Game/ERR/10_AI/ERR_EnemyLoadout.c": "a48f32dbd7f209bf08fce2840aaffc1781c571fc679763be58987f6b082e776c",
"addons/core/Scripts/Game/ERR/20_Intel/ERR_MineIntel.c": "3ce16cebaa9703b2f9803df7c11614f94de6460a9136dab8f80dcad41ae2b1c2"
}
}