# Pack actions implementation and validation ## 11 October — melee Engage and configurable flank follow-up Status: implemented, reviewed and automated verification complete within the limits below; keep for human playtesting. The user reported one melee pack member approaching while the others remained motionless in Engage, then requested arbitrarily small positive flank distances and zero to disable flanking. The actual four-member ordinary-brain RED reproduces12.754m travel for the first direct-role member and0m for roles1/2/0; all four had personal sight and supported complete direct routes. The saved melee definition has a1m flank radius, while the old selector rejected every flank path entering a fixed3m zone and exclusively reserved direct endpoints. Its native search wrapped indefinitely without the legacy approach fallback. The bounded repair allows role0 and zero-radius melee to approach directly, scales positive melee flank/reservation preferences down with the configured radius, and restores a paid typed complete-path fallback after12 failed primary candidates. Failure progress survives target-position refresh but resets for actor/lifetime/target/type/mask/freshness changes. The two-query-per-call and eight-query-per-frame ceilings, projection/path validation, ranged spacing and attack/contact/control rules remain. The serialized `flankRadius` name/default9 are preserved; its Inspector minimum is0, finite positive values have no artificial floor, and negative/nonfinite values resolve to0. Existing authored values are unchanged. Native and legacy selectors share these radius semantics. A second native RED demonstrates an offset goal adding distance to the stopping reach:2.125m instead of the authored1.125m. Visible melee stopping distance now subtracts the actual accepted goal-to-known-target offset, so a small flank cannot cause that premature stop. Moving-observation and denied-budget tests use hosted typed actors and the real budget; separate ordinary-brain movement tests distinguish that staged selector proof from normal actor behavior. Eight radius rule cases pass, including0,0.000001,0.1,1,9 and invalid values (`melee-flank-radius-rules-green-bb99d0095775468aa73e46f4f1a61555`). Focused native accounting is40 compatible passes in `melee-flank-focused-final-b42d3604530646a7a882983d4b667eb4`, then two corrected exact ordinary-brain reach passes (`melee-small-reach-boundary-19ca47db231d4efb85c23d30667e3553`, `melee-large-reach-boundary-2e359f7e696b45cbb4e2ff692f684af9`). This is not one fresh42-case GREEN. Initial stopping assertions were repaired to measure accepted tactical assignments outside contact/lunge range, retaining actual ordinary-brain reach within six seconds. Legacy primary selection has only two grouped candidates; direct fallback is valid when independently measured geometry rejects both. Native positive-radius primary expectations remain strict. Final gameplay review found an odd failure-count boundary where a successful primary flank could be followed by an unnecessary direct query. A staged real-path/cache-boundary RED (`melee-valid-flank-debt-red-81e78e285a104c64960b81dd6ed6e058`) drove the condition that fallback requires no primary selected in the current call. Exact GREEN: `melee-valid-flank-debt-green-f89d504a37314836a25a5e992fba3135`. This staged boundary proof is separate from ordinary-brain motion. All three independent technical/gameplay/UX source reviews conditionally approve the integrated delta; their conditions are remaining verification and human acceptance. Fresh full EditMode `melee-flank-integrated-editmode-060289d0458a4cceb53c34953be680a0` completes with valid identity: **1,331 passed / one failed / zero skipped**. The retained failure is the separate roster continuation's `EnemyRosterObserverTests.PeerTrace_ExistsSeparatelyFromAuthoritativeControllerObservations`, requiring the currently absent `EnemyRosterPeerTrace` diagnostic. Its assertion is preserved; no stub was added to obtain a pass. Fresh full PlayMode `melee-flank-integrated-playmode-993e7cc35ff44efdbe19169346926c46` passes **207/207**, zero failures/skips/inconclusives, matched terminal and valid identity (386.840s execution). This includes all new ordinary-brain, radius, moving-observation, budget-denial and cache-boundary cases. Reports are under `TestResults/foundation-runs/`. Matching Windows builds succeed: normal zero errors /652 warnings /60.082s; debug zero /640 /15.301s; release zero /790 /36.360s. Release packed assets exclude the debug arena/scenario authoring. Immutable reports, managed hashes, packed-asset inventory and matching before/after player-source fingerprint are in `TestResults/melee-flank-delivery-a5df8cef7f44452782b218079eed0fd4`. Original background and reload settings are restored before builds. Fresh built-player cohorts pass at75ms delay /15ms jitter /1% loss: two peers `TestResults/debug-arena-a439dc21e93c4ed5b065c22a3c8deb11`, four peers `TestResults/debug-arena-ca589ef9827d4dc7ba41c46e843b817e`. Both retain all seven scenarios, two reset cycles, intentional failure proof, actual target disconnect, host loss, rehost and zero cleanup errors. Both launcher exits are zero and immutable identity sidecars accept debug build `e46474ff73804200995a5e7403682e8f`, player-source fingerprint `7142283B70927AA4EE78962E7960D9C3B7C12F6E5D62E81E88C6711F9DFDF265`. Common matching normal-menu regression `TestResults/main-menu-0fb0f2657c844a24a7bbef81e153a9eb` passes10 phases. Full-stage `TestResults/encounter-polish-2b597ccecf71404d8585d2f7230b714d` passes23 phases, including two/four-player weapons/effects/core pickup, rewards, Stage1/2 travel, Stage3 defeat/results and a clean new rehost. Both exit zero with zero cleanup errors at75/15/1. The stage report retains four transient report-read failures; no assertion or timeout was changed. Normal build ID is `607fe013eaa64f369b76ec2eddb9694f`; managed SHA256 matches the delivery snapshot. An explicitly labelled during-stage source/build-data snapshot matches the final snapshot; it is not presented as a prelaunch identity sidecar. Final CIM inspection finds no player processes. Editor is stopped/idle on clean MainMenu, compilation/import finished, original backgroundfalse and reload options3 restored. No commit/push was performed. Actual human pressure/readability remains open, as does the separately identified unfinished roster diagnostic contract. The interrupted first focused run (`melee-flank-focused-native-156c0cbfc7804f80837dce936d75b9c8`) and source-identity-invalid retry (`melee-flank-focused-recovered-9ad0d19729d04e629f593acfcf8c789b`) remain excluded. The latter was invalidated correctly when the temporary background setting persisted after request start; subsequent checks start with the setting already stable. Three fixture cleanup guards now skip Unity Test Framework bootstrap scenes, matching the existing arena pattern while retaining authored-scene restoration. No terrain/NavMesh bake, attack tuning, RPC/schema or natural-campaign extension is included. The earlier campaign remains evidence of its recorded source/build; it does not validate this new behavior. Human swarm pressure, crowding, contact jitter and readability remain separate acceptance. ## 9 October Task4 checkpoint — historical evidence 9 October 2026. Task4 implementation is complete with automated, Editor/rendered and matching-build network evidence. Human/performance/separate-network acceptance and later plan tasks remain open. ## Starting point and decisions Task3 is committed as `5a7d350`; the entry-protocol prerequisite is `0c3d03f`. Fresh continuation baselines pass 1053 EditMode and 47 PlayMode tests. Current-map formation, typed routes, bounded lag recovery, eight-query budget and the final dense/selected F8 render are accepted within the documented direct-navigation fixture scope. Ordinary selector arrival/variety, human moving-player feel and representative hardware remain separate gates. Three independent technical, gameplay and UX reviews agree on the following bounded slice: - Sample genuine positive/negative visual contact on the existing decision cadence before coordinator guidance/navigation publication and before actor native motion, control returns or special attacks. Finish the cohort sampling pass before resolving member holds; never promote memory/sound/damage/guidance to contact. - Resolve member intent every frame. Default ordinary brains use Advance/Engage/CoverGrace; memory-only Advance uses native formation routes. Explicit comparison/boss compatibility retains its previous behavior, and unknown custom state IDs are not forced. - CoverGrace clears all roles' queued paths, velocity and pending native position, releases tactical ownership and watches the last real observation. Durations remain per member, captured for the loss episode, with the existing five-second default and zero/short/long support. - Cancel unlaunched windup/burst/shell work and forward lunge motion on hidden grace. Preserve launched projectiles and paid cooldowns. A personally visible player within melee reach may receive a stationary ordinary strike; no unseen chase/lunge is authorized. - Cancel preparation through the existing nonpositive Windup signal before charge animation/audio work, preserving recoil, hit, crawler attack and trace timers. No new RPC/schema, tuning, UI controls, audio/art, tracer or roster changes. Ruling: a deterministic coordinator contact prepass is necessary because its navigation Update precedes actor Update. Actor-only checks cannot guarantee no movement publication after the sampling boundary. This adds bounded member/LOS work at the existing cadence; it does not expand the path-query budget. If incorrect, contact and formation could diverge for one frame; native ordering tests must cover the boundary. ## Evidence ledger - Initial filtered attempts discovered zero tests because a new fixture used an NUnit constraint unavailable in the pinned package. These runs are excluded from RED/GREEN evidence. The fixture now uses compatible constraints; the Editor's actual compile status and compiled test types must be checked before executing the regressions. - An overlapping runner request aborted the next diagnostic attempt before a verdict; it is excluded. Build settings returned to their original saved configuration. Subsequent runs are strictly sequential and wait for a written result before advancing. - `pack-actions-contract-red-final`: three genuine contract failures for missing Advance registration, missing explicit legacy configuration and missing narrow preparation cancellation. Compilation is complete with no errors; zero-test runs are not counted. - `pack-actions-native-red-final`: excluded as contact setup evidence because two fixtures' initial LOS failed. The original player seed was behind the lab's authored wall. Fixture now searches supported common sight/firing lanes with actual owner pose and native support, then inserts owned real cover across the selected rays. It neither fabricates group contact nor injects a rules clock. - `pack-actions-native-los-red`: four genuine desired-runtime failures with valid native geometry: peer contact timeout, mixed-member actual contact timeout, real queued windup losing sight without entering CoverGrace, and sound-memory default state never entering Advance. These seven combined contract/native failures authorize runtime implementation. - Initial GREEN: `pack-actions-contract-green` passes3, `pack-actions-native-green` passes4. `pack-actions-initial-full-editmode` passes1055 with one obsolete default-Explore expectation, now adapted to Advance with explicit legacy coverage. The first full native run was aborted by automatic source compilation while running; it is excluded, and all later source edits/test runs are strictly separated. Its temporary runInBackground setting was restored through the Editor. - `pack-actions-supplement-red`: eight passes and three genuine failures. Actual production bolt/shell cancellation, stun and crawler cases pass; disabled AI retains a visual report, another scene's living player is accepted as guidance, and fallback exposes exact position instead of a coarse area. These regressions drive scoped cached guidance and contact-retirement corrections. There are11 test cases in this report, including the crawler; the cleanup coroutine is not a test case. - Final candidate adds scheduled1s/8m/4s fallback guidance, scoped finite read-neutral intent, AI-disable contact retirement and paid lunge cooldown preservation. Expanded native tests cover compatibility/lifecycle, mixed actual motion and snapshot neutrality; actual-state JSON/camera captures are exported. Focused candidate verification, full suites/build/render checks remain pending. Prior Task3 network results do not prove Task4 contact or attack behavior. - `pack-actions-final-candidate-native`:13 passes/3 failures across16 actual tests. The strengthened mixed-duration movement case exposes the remaining legacy permission predicate requiring no memory target, despite Advance intent; invalid baseline markers still select legacy behavior. Custom-brain fixture cleanup destroys a previously referenced actor, so that failure is setup evidence. Retain actual displacement requirements and fix the responsible permission predicate; do not weaken the test to a state-only assertion. Root debug changes use read-neutral intent/sample fields for F8 grace/phase and distinguish legacy visual memory from actual sampled contact. - `pack-actions-mixed-permission-red` fails the actual useful-motion requirement and captures the short member in Advance with HasAITarget=true, MovementAllowed=false and no native path. The long member remains CoverGrace with its independently captured15s deadline. This directly confirms the old no-memory predicate as the cancellation layer. Advance movement authorization must depend on member intent, while route, guidance, control and all-player spacing validation remain separate. Stale combat routes must be cleared on phase change/target invalidation without discarding a valid denied-work Advance route. - `pack-actions-lifecycle-red`:16 passes/2 genuine failures across18 cases. Mixed actual movement/reacquisition, validated baseline/custom compatibility, attack/control/fallback and snapshot cases now pass. A coordinated owner leaving the scene still retains contact/guidance through the coordinator's unscoped liveness helper; a downed final guidance owner leaves the queued native route. These two actual lifecycle failures drive scoped coordinated liveness and immediate all-role route revocation before native publication. No guidance/clock/contact is injected by these cases. - `pack-actions-final-native-green`:17 passes/1 native stop failure after lifecycle corrections. `pack-actions-downed-diagnostic` confirms the actor/intent remains valid and its path/velocity are cleared, but ResetPath resets isStopped. The universal hold now publishes isStopped last, matching Task3's native ordering proof. The earlier interpretation of an unavailable intent was incorrect; no availability assertion is relaxed. - `pack-actions-stop-order-native-green`:18/18 focused passes. `pack-actions-final-full-editmode`:1057/1057 passes. Independent technical review accepts the bounded source delta; gameplay review identifies a different-owner stationary melee gap caused by recent-hit target preference, and UX requires a labelled observer view because player-view cover images occlude the actors. These findings are being addressed with a real second connected peer and supplementary actual-actor captures; no synthetic owner or scene-management relaxation is permitted. Ruling: select an immediate personally visible in-reach melee candidate independently only during CoverGrace. The existing global hit-alert target preference remains intact elsewhere. This implements the confirmed stationary exception, without authorizing a chase/lunge or changing cooldowns. If incorrect, an in-reach co-op player could gain unintended immunity while an older hidden attacker retains target priority; the real two-owner regression must establish the boundary before code. - Real-peer RED: `pack-actions-peers-a4e06fe654584dea9382b03cec226836` establishes two actually connected scoped owners at75/15/1, default2s contact commitment and authored1.5m melee reach. A genuinely sees and damages the crawler, then hides; settled B is personally visible1.100005m away. The crawler keeps A selected, samples B, holds CoverGrace/no path/no lunge and applies zero strikes until just before the actual commitment deadline. Owned helper and outer session/process cleanup both pass. Prior `caf4…` and `53ea…` attempts are retained setup failures: remote native pose was not yet settled, then A's requested destination was occupied by B. No teleport, timing, sight, ownership or network-policy relaxation was made. - The correction uses a bounded nearest/tie-stable visible in-reach candidate only for ordinary melee CoverGrace attack checks/captured windup; global recent-hit target selection remains unchanged. The same actual-peer test is required GREEN after rebuilding. - `pack-actions-complete-full-playmode`:60 passes/5 ingress setup failures. Every failure expects a retired immediate spawn hint before verification starts. Fixture setup now awaits actual living-owner committed Advance guidance; original two-think/.45s/>.1m motion, native paths, budget retention, death/lifetime assertions remain unchanged. Focused and full retests are pending. - Actual labelled supplementary observer images (`pack-actions-*-20261009T030348*` / `030349*`) show both actors during blocked gameplay sight and the orange cue disappearing on grace. Matching before/after motion JSON and reacquisition images close the local rendered-flow gap; independent UX delta review accepts that evidence. Human, physical-key/DPI and remote readability remain separate. ## Acceptance boundaries Require production Update/native contact loss during windup, subsequent bolts/shells and moving lunge; mixed-duration hold/advance/reacquisition; personal firing checks under shared Engage; controls, owner/lifetime cleanup and explicit compatibility; narrow cue cancellation and survival of launched effects. Run fresh full suites and Windows builds, then inspect normal-player/remote cover flow and delayed two/four-player lifecycle. Preserve scene/GUID/terrain/surfaces/jump0/pins and unrelated user settings. Report automated, Editor, network and human evidence separately. ## Final integrated proof — 9 October - `pack-actions-ingress-guidance-green`:5/5 original ingress contracts pass after the setup adaptation. - `pack-actions-verified-full-editmode`:1057/1057; `pack-actions-verified-full-playmode`:65/65. No skipped cases. The full native run includes all18 new action/lifecycle cases. - Fresh normal/debug/release Windows builds succeed with zero errors and561/640/698 retained warnings. Release packed assets exclude the debug lab/scenario authoring assets. Build CLI/result files are retained under TestResults and Builds. - Real two-owner GREEN `pack-actions-peers-8b35b490d5274753a97c6866c949e85d` passes the unchanged default2s commitment case at75/15/1. At13.454s the crawler's actual action is Attack while its member intent remains CoverGrace on hidden A; selected A remains0, sampled/struck B is1, B is visible1.100005m within authored1.5m reach, and one strike reduces B's shield50→30. Native path/pending/lunge are absent, stopped is true, and paid recovery remains14.205s. Both helper and owned host/client cleanup pass. Gameplay delta review confirms its concrete finding is resolved. - Final technical review accepts source boundaries; UX accepts labelled side-observer cue cancellation/mixed motion/reacquisition alongside unchanged player-view occlusion. No claim of physical-key/DPI, human readability/balance or remote presentation acceptance is made. - Matching-build two/four-player arena `debug-arena-18b97eeefbca4a54971513dde2592d8d` / `debug-arena-d94e38739cde485f8246ae5e42fdcc3f` pass11 reports each, including seven scenarios, two deep resets, expected failure, authority refusal, disconnect/host-loss and same-process rehost. Normal menu `main-menu-8ae37d67d3a54b13b515bb11270ec235` passes10 phases. Full-stage `encounter-polish-2bbac1fa24cc41f7a9a36716393bf422` passes23 two/four-player phases through stage-three/results/clean rehost. Simulation is75ms per endpoint,15ms jitter and1% loss; all outer cleanup errors are empty. These checks include normal entry/stage travel with the tightened scene/manager boundary. The fixture/body tests establish the default stationary melee exception with two real owners. Fallback4s owner switching between several real connected owners, representative hardware and human cover-loop balance remain distinct Task5/final acceptance evidence. No production scene, prefab identity/GUID, navigation bake/terrain, package/Editor pin, jump-across setting, tracer/tier damage or RPC schema changed in Task4. The original saved manual Editor scene is restored; generated orphan test scenes and owned runtime scopes are cleaned. Unrelated preexisting ProBuilder settings remain outside the task commit. Next implementation: TaskT tracer revision, then the existing-roster Task5 checkpoint and primitive roster foundation/roles6–11. Task0 natural selector arrival/variety and final D instrumentation remain separate open items.