GitHub Copilot Skill

dayz-mcp-verify

Auto-test a DayZ mod in-game through dayz-mcp without keyboard or OCR: spawn a classname, orbit/capture, raycast collision, inspect placement/attachments/telemetry and emit PNG+JSON evidence. Compose with dayz-test-ingame; dayz_test_run/dayz_test_stop own the managed lifecycle, t

LLM Mart · 0 points · 1 views 0 listing impressions 0 install-command copies
Download willy92wins-dayz-modding-knowledge-pack-skills_dayz-mcp-verify-22c35fd.zip · 73 KB

Install

skills CLI npx skills add https://github.com/willy92wins/DayZ-Modding-Knowledge-Pack/tree/main/skills/dayz-mcp-verify
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install willy92wins-dayz-modding-knowledge-pack@llmmart
Git git clone https://github.com/willy92wins/DayZ-Modding-Knowledge-Pack.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole willy92wins/dayz-modding-knowledge-pack collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

DayZ MCP verify — auto-test in-game vía tools MCP

GATE 0 — ask WHO is driving, before touching anything (added 2026-08-07)

(until 1.29: managed dayz_test_run / dayz_test_stop and Mode=all capture still hold.) (since 1.30: Diag Script Console tabs register via ScriptConsoleTabRegistry; IsHeadless() names roboclients; SP PerformActionStart no-ops while pending. Details: dayz-1-30-mcp-verify.md.)

Before the first dayz-mcp tool in a verification run, ask the user whether they are driving or the MCP is. Neither is assumed. A single question per run, not per capture.

Why it is a gate and not a preference: with the user present, their manual cycle is faster and yields better results — spawns with VPP in seconds and evaluates the whole scene at a glance, while MCP loop needs to position camera, capture, and chain tools. MCP wins when the user is NOT there: early morning, unattended run, or while attending another front. Furthermore, changing mode is not free midway (clean manual test requires relaunching without @DayZ_MCP), so the decision is made at the start of the cycle or paid twice.

Situation Who drives
User present and available Them (VPP + direct judgment) — MCP only if they ask
User absent / unattended run MCP, and report is left for them with evidence
Doubt Ask. Never assume

What does NOT change: MCP remains mandatory for what a human cannot measure by eye (telemetry, numerical raycast, exact placement, repeatable series). There you do not ask, you use it.

Measurement that originated gate (2026-08-07, corpus of 276 sessions): 63% of wall-clock time in a full cycle falls on user side, and 71% of their actual verifications are automatable with today's tools. That it is automatable does not imply it should be automated: with them present, their cycle rules.

WHAT THIS DOES

Drives an already launched DayZDiag client, via dayz-mcp MCP server tools, to verify a mod without human intervention: spawns object, views it from multiple angles (camera + window-grab), checks collision via raycast, reads placement/telemetry, and produces a report with pass/fail criteria and evidence. It is the automated observation loop bridging the gap between "PBO compiles/deploys" and "looks and behaves properly in-game", for the class of properties that DO NOT require keyboard input.

Server-authoritative + passive pixel capture. Control and data are engine-native (spawn, raycast, telemetry, camera); sole non-native piece is visual capture (window-grab of rendered client — MakeScreenshot is broken in diag, T165276).

COMPOSITION — public lifecycle + MCP verification

Build/deploy/launch belongs to dayz-test-ingame (its environment preflight runs on its own: P:\ mounted, junction P:\Mods, AddonBuilder, allowFilePatching). This skill invokes it with MCP mod added and then drives. Bridge verbs do not start or terminate processes; public test tools do orchestrate managed lifecycle.

Before operational flow, read canonical protocol: <runbooks>\dayz-mcp-agent-session-protocol.md. [EXACT][CLAIM-R21-MCP-ORCHESTRATED-TEST] Execute lifecycle with dayz_test_run and stop it with dayz_test_stop on exact run_id. Both tools possess FIFO queue, lease, heartbeat, and release; do not wrap them in a second session_acquire. Reserve session_* primitives for low-level mutations not already encapsulated. Every lifecycle is identified by run_id: sharing mod does not grant ownership. Under retail quarantine only reads are allowed; if whoever opened retail cannot close it via UI, declare manual_cleanup_required.

Bridge startup sequence (rev. 2026-09-06): dayz_test_run → session_acquire_wait → verbs. Never probe before adopting. "Do not wrap launch in another lease" does not mean run remains yours: upon completion, dayz_test_run RELEASES its owner lease (daemon audit: session_release_finished reason=owner_release right after launch) and run transitions to RUNNING_IDLE without owner (release_owner, process_lifecycle.py:958-976). From that instant the idle run fence rejects ALL /enqueue on that run, reads included: _enqueue_run_rejection discards flag mutation (loopback.py:1293-1296) and for RUNNING_IDLE returns run_not_owned (:1317-1318) with hint "This run has no owner (RUNNING_IDLE). Adopt the existing run before dispatching." (:99-102, :1323-1329). The counter-intuitive part: bridge_status counter is named fence.mutation_rejects_by_code (:2821-2822) and counts reads as well. Every verb crossing bridge falls there (query_*, telemetry, raycast, captures, world_spawn…) and also wait_for(players_at_least|players_at_most), which polls with query_all_players (server.py:2645-2650). wait_for(log_matches) does NOT fall: reads log files without touching bridge (server.py:2603-2637, :2686-2697).

  1. dayz_test_run(...) → retain run_id.
  2. Optional without adopting: wait_for(log_matches, "…") to wait for startup via RPT.
  3. session_acquire_wait(purpose=…): grant adopts the ONLY ownerless RUNNING_IDLE run and declares it in adopted_run (_adopt_on_grant, loopback.py:3119-3120, :3193-3230). Check adopted_run.ok before first verb. With multiple idle runs it answers adopted_run.error = "multiple_idle_runs" and adopts none (:3202-3208): dayz_test_stop surplus run and repeat.
  4. wait_for(players_at_least, 1) and remaining verbs.
    • [EXACT] The adopted lease expires by itself (added 2026-09-27, LFPowerGrid, three runs): it lasts 120 s and is NOT renewed internally, fresh MCP client or not. Send session_heartbeat at least every ~90 s during the whole run, including while a human plays. Past the deadline the run goes ownerless again (grace.remaining_s counts down) and the daemon stops it (lifecycle_stop_outcome: stopped), even with the user in front of the game. (measured in game, DayZ 1.30.164014 Exp)
  5. session_release → dayz_test_stop(run_id).

With an MCP client prior to 8f5727f of DayZ_MCP (2026-09-06) rejection arrived as a BARE remote_error, without code or hint (ledger entry fb-20260906-193626-f45d, first attributed to a client without polling); with current client it arrives as run_not_owned: This run has no owner (RUNNING_IDLE)…. In both cases remedy is adopting, neither retrying nor relaunching. This rule corrects step 1 of recipe SP-292 and clarifies first bullet of SP-152, below.

Two lease failures around long waits (measured in game sessions, 2026-09-28): (1) wait_for over the log does NOT renew the lease — a wait longer than ~2 min expired with lease_expired; interleave session_heartbeat between waits. (2) When a user message interrupts an in-flight call (a long wait_for), the next session_heartbeat answers lease_invalid: token was never valid for this client; if the run is still alive, session_acquire_wait readopts it. Also: dayz_test_close shuts the run down in order, with a termination line on both sides. [EXACT]

Companion externo: dayz-labs

[EXACT][CLAIM-R21-MCP-COMPANION-AUTHORITY] external_companion_no_lifecycle_authority. Release dayz-labs v0.1.35, reviewed at pinned commit dbd6ad3e54e30c81a9aeb88fcb9f60f007804c2a, can serve as reference or optional companion. Its start/stop/restart verbs are excluded while DayZ_MCP holds a run: only dayz_test_run / dayz_test_stop on exact run_id govern that lifecycle. Do not install or update companion as part of a gate; always document the examined pinned_version.

Its interface is WPF and captures its own application: wpf_not_layout_evidence. A correct capture from dayz-labs does not validate the parser, proportions, clipping, or semantics of a DayZ .layout; UI viewer needs its own render and comparison against in-game evidence.

The dayz_test_run request must select Mode=all, build when PBO changed, and @DayZ_MCP as additional dependency:

  • -Mode all (server + client) is MANDATORY: visual capture reads from rendered client. A headless -Mode server has no window to grab.
  • @DayZ_MCP is loaded alongside the mod under test; both peers (server + client bridge) poll the MCP server loopback.

PREREQUISITES (gate before driving)

  1. dayz-mcp registered and connectable. PRIMARY gate: are tools mcp__dayz-mcp__* available in session? (ToolSearch finds them → gate PASS). claude mcp list is SECONDARY and NOT reliable: gives false × Failed to connect with server operational — do not block on it if ToolSearch sees tools. Tools are only available in a session started WITH server already registered (broker registration --client, see TROUBLESHOOTING).

  2. Bridge config seeded. In-game bridge reads dayz_mcp.json (url + key + pollHz) from its profiles; MCP server uses <DayZ_MCP_dev>\tools\.dayz_mcp.key. Seed the SAME key in launch profiles with install-mcp.ps1 pointing to directories generated by dayz-test.ps1:

    <DayZ_MCP_dev>\tools\install-mcp.ps1 `
      -ServerProfiles "<TargetMod>_dev\_server\profiles" `
      -ClientProfiles "<TargetMod>_dev\_client\profiles" `
      -MissionPath "<...>\mpmissions\dayzOffline.chernarusplus"
    

    [verify on first run] — generic seeding (arbitrary mod + @DayZ_MCP via dayz-test.ps1) was until now only exercised through run-fase3.ps1. The FIRST run of this skill validates that bridge finds config in these paths; if bridge_status reports last_poll_age_s = null, config is not where bridge looks for it — adjust path and declare it.

  3. bridge_status green. ALWAYS first call: bridge_status. server_peer must have fresh last_poll_age_s (not null). For capture, client_peer as well. never polled → bridge did not start (config/key/startup) → abort and diagnose, do not keep driving blindly.

  4. Mods passed via extra_mods/base_mods must be REAL DIRECTORY under P:\Mods (→ !Workshop); Steam junctions ARE NOT valid. Two layers, confusing them costs a session:

    • Public boundary _valid_public_mod (DayZ_MCP_dev\tools\dayz_mcp\dayz_test_tool.py:75-85) rejects :, \ and / across all projects → absolute workshop path never passes through tool. That is by design, NOT a gap in your project's policy. (Updated 2026-10-03: the boundary now also accepts an absolute path inside the selected project's mod_roots; _valid_public_mod calls dayz_test_request._valid_mod_entry (dayz_test_tool.py:269-272, dayz_test_request.py:222-233, DayZ_MCP_dev 506de5d). A workshop path lies outside them and still fails, with bad_mod.)
    • Subscribed mods exposed by Steam in !Workshop (@CF, @Dabs Framework, @VPPAdminTools) are Junctions to steamapps\workshop\content\221100\<id>, and path identity guard rejects them → dayz_test_failed, which is the generic catch-all of server.py:1101 and swallows the real cause.

    Operational consequence: CF/Dabs/VPP are only loaded by declaring them with absolute path in project default_base_mods inside launcher request-policy.json — which is how SUB_BRZ and LFHeli declare them. Mods that are real directories (@DayZ_MCP, @LFHeliCore, mod under test) do go via extra_mods with relative name.

    Diagnosis in one command: Get-Item '<!Workshop>\<@Mod>' -Force | Select-Object LinkType → Junction = relative does not work. Measured 2026-08-02 with preflight=true (pure dry-check: dayz_test_worker.py:533-534 returns before build and launching anything): without mods OK · @DayZ_MCP OK · @A6_SR2M OK · @CF FAIL · base_mods=["@CF"] FAIL.

    [EXACT][CLAIM-MCPV-JUNCTION-EXTRA-MODS-130] (Corrected 2026-10-26, stable box, DayZDiag 1.30.164200.) A Steam junction did pass in extra_mods: @SurvivorAnims, a mount-point junction in !Workshop (Workshop item 2918418331), passed preflight=true with project DayZ_MCP and then loaded in two runs, server and client (-mod=P:\Mods\@DayZ_MCP;P:\Mods\@SurvivorAnims;... in the RPT header, World module at 2349 files with its scripts). The rejection above was measured on 2026-08-02 with @CF. Run the preflight on the junction you need before going through request-policy.json.

    When the mod under test does not compile, test a probe copy of it (added 2026-10-03, measured 2026-10-02, dayz-mcp run 606a5dbb) [EXACT][CLAIM-MCPV-PROBE-COPY], for example when its build packed another session's untracked test scripts:

    • copy the deployed PBO entry for entry without those entries (every other entry byte-identical, the same header properties, the SHA-1 trailer recomputed) into a probe folder of its own under P:\Mods;
    • host it in another approved project whose default_base_mods carry what the mod needs (CF and Dabs there): an absolute workshop path in base_mods fails with bad_mod, since each entry must be a folder name or an absolute path inside the project's mod_roots (dayz_test_tool.py:399, dayz_test_request.py:222-233);
    • writing under P:\Mods changes what every later run can load: ask the owner in chat first (in that session the agent harness's auto-mode permission check blocked the write until the owner agreed), and move the probe out of P:\Mods when done.

    In that run the copy (641 of the 645 entries) compiled the mission module, and its models were the deployed ones byte for byte.

    ⚠ Before blaming the bridge for version_blocked/last_poll_age_s=null: check that key of dayz_mcp.json in project profiles is the SAME as DayZ_MCP_dev\tools\.dayz_mcp.key. A stale key gives 401 and bridge never polls, with symptom identical to "mod is not loaded". Key rotations leave behind projects not exercised since then (2026-08-02: MERCEDES_AMGLF and LFPowerGrid with old key, SUB_BRZ/LFHeli/DayZ_MCP with current key).

    ⚠⚠ The symptom is NOT always version_blocked / last_poll_age_s=null — and believing so costs the session just the same (measured 2026-08-17 in LFPowerGrid, with this warning already written above and overlooked). With stale key the peer can read version_state: ok with last_poll_age_s of 1.485 s: it is data from LAST good poll, which may belong to another already dead run. A dead bridge reads like healthy this way. The telltale signature is in game script log: [MCP-POC] poll error=5 (server) / [MCP-CLIENT] client poll error=5 (client). That 5 is EREST_ERROR_CLIENTERROR (scripts\3_game\http\restapi.c:16-17), meaning daemon returned 401 — 401 DOES NOT appear anywhere on game side. Two-command gate before blaming anything:

    • Compare key of each dayz_mcp.json the run will use against keyfile. These are two paths and $profile: wins over $mission: (MCPBridge.c:145-149, MCPClientBridge.c:234-237); if profiles key is missing, bridge falls back to mission key, which is usually the stale one. Same length (43) is NOT proof: compare the bytes.
    • Invoke-WebRequest "http://127.0.0.1:8765/poll?key=<keyfile content>" → 200 {"commands":[]} proves daemon and live key are fine, isolating failure to run JSON. And fixing it DOES NOT require server restart: ReloadKeyAfterFailure (MCPBridge.c:373-398) rereads key when backoff hits ceiling. Fix JSON, wait ~20 s, [MCP-POC] poll key reloaded appears and peer returns to last_poll_age_s 0.2. That saves the boot.

    ⚠ Player spawn needle cannot presuppose gender. The example Create entity type 'SurvivorM_ —suggested by wait_for description itself— fails in silence with a female character: 300 s timeout with player already in world and Create entity type 'SurvivorF_Helga' written to RPT. Use Create entity type 'Survivor.

BRIDGE GOTCHAS THAT COST ONE RUN EACH (added 2026-08-18)

Verified in-game on 2026-08-18 during ATM cell test battery. All six cost at least one run each, and five of six produce a verdict accusing the mod without the mod having any issue (6 runs, 0 actual mod failures). Check them BEFORE writing first probe.

  1. dayz_test_run DOES NOT load @DayZ_MCP by default, and returns succeeded anyway. Both processes launch alive, the game works, and the bridge stays silent. The symptom you receive (server_poll_stale / client_not_polling / ready.reason=no_run) points to bridge or key, not to mod set, so time is lost in the wrong place. Gate: pass extra_mods=["@DayZ_MCP"] and confirm in server log that define DayZ_MCP appears in all four modules, or look for [MCP-POC] lines.

  2. logs_since does not accept its own marker. It RETURNS it as dict {path: [offsets]} and its parameter requires string: Pydantic ValidationError. Incremental draining is impossible. Workaround: read entire log at end of sequence and assign responses in order, verifying alignment with some field from event itself (a type, an id). If two probes share that field, mark ambiguous_alignment instead of guessing.

  3. wait_for(log_matches) does not work to wait for YOUR response. With default lookback_lines=200, a line from previous probe satisfies pattern instantly. And with lookback_lines=0 it has been seen timing out with line already present in client log, returning a line from another flow in observed. Use it as opportunistic wait; verdict comes from polling logs_since.

  4. Player inventory is NOT reset between runs. Second run finds what first left behind, nothing fits anymore and dotation fails silently (create_failed, or endow of 0 units). To chain: dayz_test_stop, delete <mission>\storage_1\players.db with backup, and relaunch (~3 min). WARNING: clean=true DOES NOT do this — forces Build=true and passes -clear to AddonBuilder, meaning rebuilds the PBO and breaks binary identity, which is precisely what an A/B test cannot afford. Balance/state that mod saves in server profile SURVIVES deletion.

  5. inventory_give returns create_failed whether classname does not exist or does not fit. They are indistinguishable. Before blaming inventory, verify classname exists: grep in mission types.xml and test with a control vanilla item (Apple works). And do not presuppose mod config classnames exist: they can point to a mod not loaded, in which case exact classname count gives 0 forever and entire feature looks broken without being broken.

  6. Do not believe a verdict without looking at client log. Many mod events are written by CLIENT, not server. In test battery originating this section, automatic verdict said FAIL or INCONCLUSIVE six times in a row while client log showed operations executing properly. Dangerous failure mode of a cell is not "does not measure": it is "measures poorly and accuses the mod", and that propagates to project documents. If a verdict says FAIL, open client log before recording it.

  • world_spawn with ok=1 DOES NOT prove object stays where you asked (added 2026-08-21, DayZ-MCP council). IsSpawnReady (MCPBridge.c:2729-2753) takes ACTUAL position of object itself, searches objects at that position, and considers itself ready if it finds itself. An object is always where it is: gate is tautological and satisfied for any live object, even if physics is already ejecting it. Does not compare against REQUESTED position, does not measure drift, and does not require inter-tick stability. Real case: spawn at urban point with ok=1 and vehicle ending up at Y = -40 km. Distinct from inverted coords failure above, which times out: this gives false PASS. Rule: after any world_spawn that matters, confirm with object_inspect or entities_query that distance to requested position is as expected, and repeat reading a few seconds later to rule out drift. A playbook verdict looking only at ok is invalid.

THE LOOP

  1. Launch via dayz-test.ps1 … -ExtraMods "@DayZ_MCP" (wait until client and server are in; BUG-009: client autoconnect is flaky — higher -ServerWait / retry).
  2. Gate bridge_status (PREREQUISITES.3).
  3. Scene conditions (comparable captures): world_time_set at noon (all 5 args year/month/day/hour=12/minute=0 are mandatory) and world_weather_set(overcast=1.0). Overcast sky = diffuse light: eliminates specular glint from direct sun that burns weapons/materials to white and hides detail (A6_SR2M finding 2026-06-17). DO NOT use time_multiplier=0 before pending animations (freezes sim).
  4. Playbook depending on mod type (below).
  5. Report with evidence.

PLAYBOOKS (pass/fail criteria by type)

All start from spawn. world_spawn(type=<classname>, pos=[x,y,z]) → PASS if ok and without unknown_type/spawn_failed; save actual pos for subsequent steps.

Static object / container / building

  • Load: spawn ok (above). FAIL → classname does not resolve (mod not mounted: absolute !Workshop paths, see dayz-test-ingame; or CfgPatches does not register).

  • Visible + textured + winding: orbit camera (≥4 poses — front/side/back/overhead) with camera_set + capture_screenshot; inspect each PNG. PASS = object visible (not invisible), without missing textures (no solid magenta/white/black), plausible proportions, without inverted faces or holes (winding). Hole/missing-face from one angle and solid from opposite = inverted winding. Before failing a model on textures, look at the vanilla terrain and sky in the same frame: if they are flat too, the client did not load its textures and the frame says nothing about the model (dayz-test-ingame references/session-findings.md, "H2R import (2026-10)").

  • Collision: scene_raycast(from_pos, to) (default method="rvproxy": LOD intersection in the intersect mode) aimed at the object in each of geom, view and fire: the battery below for a small object or an item, multi-point for a building (walls, corners, floor). PASS = rays that should hit yield hit=true with object_type/object_class of object. No hit where it should hit = ViewGeo/FireGeo missing or improperly resolved (LODs). (Changed 2026-10-03: this bullet asked for rays "from ≥2 angles", which do not tell the causes below apart.)

  • Ray battery and its controls (added 2026-10-03; the battery of dayz-p3d-audit "Absolute winding check" rule 6, fired on DayZDiag 1.29.163709 on 2026-10-02, dayz-mcp run 606a5dbb) [EXACT][CLAIM-MCPV-COLLISION-BATTERY]: nine rays per mode.

    • One vertical ray down the object's axis. On a solid box whose collision spans its own axis, like the measured kit box, a LOD recentred by a missing autocenter=0 (dayz-p3d-audit killer #3) still sits on that ray, so a miss there is not the recentring. On an object with gaps or several separate parts the shifted collision can leave the axis: check that the ray crosses the collider both where it is modelled and where the recentring would put it.
    • Four horizontal rays through the middle, one from each side, and two more heights on one side.
    • Two rays from inside the object outward: a sound object answers entry 0, exit 1 at distance 0.

    Fire the same battery, in the same run, at two controls: an object from the same PBO and load path, which separates the model from the build and the loading, and a vanilla object of the same physics layer (physLayer; WoodenCrate sets none and takes item_small from Inventory_Base, DZ/data/config.cpp:3152; for a static, the Land_Container_1Aoh control under WHAT IT DOES NOT COVER). In that run the LFPowerGrid kit box took 0 of 27, while the same PBO's logic-gate kit and WoodenCrate took 21 of 21 each (the battery without the two extra heights). The battery locates a miss; it does not name the cause. When the suspect is the winding, only a pair that changes the winding alone decides: the kit's paired run in rule 6 did; the Rule 12 pair, which also turned the Visual LOD and the normals, supports the cause without deciding it.

  • Picking an item up proves nothing about its collision (added 2026-10-03; vanilla 1.29 and bridge source read, the pickup seen in the same run) [EXACT][CLAIM-MCPV-PICKUP-NO-RAY]. Vanilla targeting casts RaycastRVProxy from the camera, 5 m, with the default ObjIntersectView (4_world/classes/useractionscomponent/actiontargets.c:241-255, 3_game/global/dayzphysics.c:88), and at a camera pitch of −45° or lower it also takes the objects of a 30°, 3 m cone and scores them by their distance to that ray, with no hit on them needed (actiontargets.c:324-325, :531-532, :843-848). The take action's target condition then checks only the distance to the object's position: ActionTakeItemToHands uses CCTObject (4_world/classes/useractionscomponent/actions/interact/actiontakeitemtohands.c:13, 4_world/classes/useractionscomponent/targetconditionscomponents/cctobject.c:10-24), and its other conditions (takeable, not being placed or deleted, attachment state, room in the hands, and since 1.30 a code lock the player cannot detach; actiontakeitemtohands.c:31-46) do not look at collision either. action_use builds its world target from the nearest object of the class, with componentIndex -1 and the object's position as the cursor hit, and casts no ray (MCPClientBridge.c:3769, :3783, :3861). In that run action_use(ActionTakeItemToHands) put the kit box in the player's hands while all 27 rays of its battery missed it. Read collision from scene_raycast against a same-layer control. intersect="view" is the cursor's mode, but the bridge casts a 0.05 m sphere when the radius is 0 (MCPBridge.c:2496, :2528-2531), where the vanilla ray has none. The cone path is read in the source, not measured: no MCP verb sets the camera pitch.

  • Physics and player collision (added 2026-10-02, measured on DayZDiag 1.29.163709) [EXACT][CLAIM-MCPV-COLLISION-PROBES]: scene_raycast(method="bullet", radius=0) casts DayZPhysics.RayCastBullet in the server's physics world, restricted to the layers BUILDING, DOOR, VEHICLE, ROADWAY, TERRAIN, ITEM_SMALL, ITEM_LARGE and FENCE (MCPBridge.c:2983-3004); the default rvproxy intersects the LODs instead. Count a hit only when object_type is the target and the position is where its face should be: a vertical ray through a box without collision returns hit=1 on the terrain. A miss alone does not prove the object has no physics shape (its layer may be outside the mask), and a hit does not mean the player collides (the WoodenCrate below). For player collision the run teleported the player 4 m from the object's centre and called player_move(to=<4 m past the centre, on the far side>, speed="walk", hold_s=10), then read the end position with query_player_state (server). Blocked means arrived:false AND the player stopped just before the face, after the full hold (about 0.36 m before it on that run's 2 m boxes); released_by:"hold" only says the hold expired, and arrived:false anywhere else is INCONCLUSIVE. Free means arrived:true (7.5 m in about 5 s); walk the same distance and bearing on open ground as the free reference. Every walk of that run went north nearly straight ahead (applied_angle_deg 0, and 0.04 on one walk), so it did not exercise a steering angle or its sign. A walk-through alone does not prove missing collision geometry: a vanilla WoodenCrate (item_small, low) took every ray and did not stop the player, while a HescoBox (item_large) stopped it; that run did not separate the crate's layer from its height.

  • Axis-aligned test fixtures: try rotation=64, then check the pose (added 2026-10-02, same run): rotation=0 leaves the bridge's RF_DEFAULT (512, the config's placement), which yawed an Inventory_Base probe about 10 degrees (a side-face reading moved 0.22 m across 1.2 m of the face); rotation=64 spawned the same box with its faces on the world axes (equal readings at both offsets), on flat concrete. scripts/3_game/ce/centraleconomy.c gives 64 two names, RF_IGNORE ("object will spawn as model was created", :57) and RF_RANDOMROT (:63); the result agrees with the first comment and does not settle how the engine reads the value. Before trusting face coordinates, check the pose: two parallel rays at one height on a vertical face catch a yaw (unequal readings) but not a tilt, so also read scene_raycast(method="bullet") normals on two faces that are not parallel, such as a side and the top (a tilt about one face's normal leaves that normal unchanged), and check that each lies along its axis, allowing for the ground: the statics below read up to 0.31 degrees off the axis, the terrain about as much, the items on it. Read the fixture again a few seconds later. It may change an item's configured resting side; slopes and settling were not measured. The normal of a default rvproxy reply is not a face normal (added 2026-10-02, two runs) [EXACT][CLAIM-MCPV-RVPROXY-NORMAL]: the bridge copies the engine's RaycastRVResult.dir (MCPBridge.c:2958), for a ray the "direction and size of the intersection" (scripts/3_game/global/dayzphysics.c:104), as enforce-script-reference ("Surface normals") found on house walls. In this run and in run cf2d6bb3 it lay along the ray in all 190 rvproxy hits on an object, the box yawed about 10 degrees included ((-1.963, 0, 0) and (-1.966, 0, 0)), and its length is the ray's path through the object: (-2.1, 0, 0) across a 2 m box is its width plus the 0.05 m sphere at each side. bullet returns the hit face's normal (MCPBridge.c:2998): a unit vector in all 40 of its hits, up to 0.31 degrees off the axis on the HouseNoDestruct statics and on the axis on the items. (Corrected 2026-10-02: this entry read the pose from the returned normal lying along the axis, citing (-2.1, 0, 0); with the default method it always does.) An item can come out with its sides swapped, and none of these checks shows it (measured 2026-10-02 on DayZDiag 1.29.163709, dayz-mcp run cf2d6bb3) [EXACT][CLAIM-MCPV-ITEM-YAW]: one MLOD held two 2 m boxes, A (x -3..-1) in Component01 and B (x 1..3) in Component02, and a twin had B in no component; each model was spawned, binarized and as MLOD, with flags=8389668 and rotation=64 as HouseNoDestruct and as Inventory_Base (item_large). On the four statics the west box was A, as modelled: it answered as component 0 (Component01; Component02 reads 1), and on the twins it was the only box that took rays. On the four items the boxes had swapped sides, as a turn of 180 degrees about Y leaves them: the west box answered as component 1, and on the twins every hit was component 0 on the east box while the west box took no ray. The boxes are symmetric in z, so these rays cannot tell that half-turn from a mirror in x. Parallel rays read equal on the items too, and the normals pointed the same way as on the statics, since the swap keeps every face on the axes; a fixture symmetric about its origin, like the single box above, cannot show it, and object_inspect returns memory points in model space (GetMemoryPointPos, MCPBridge.c:2240), not the pose. So give the fixture sides a ray can tell apart and check which answers where: one component per side, read from the component of rvproxy hits (geom, view or fire; the bridge leaves it 0 on bullet hits, MCPBridge.c:2983-3004), or a collider on one side only. Put the parts off-centre in z as well to tell a half-turn from a mirror, and probe along z too: a quarter-turn moves parts that lie along x onto the z axis. telemetry_read(mode="object_at") returns the object's GetOrientation() (MCPBridge.c:3137); that run did not read it. Not measured: whether the swap is fixed or random (all four items swapped; 64 is also RF_RANDOMROT), other rotation and flags values, base classes and layers, and the cause.

  • Standing on top: move the player before reading its height (added 2026-10-02, measured on DayZDiag 1.29.163709 in a later run, on 2 m boxes) [EXACT][CLAIM-MCPV-STAND-PROBE]: a second reading of the object's physics body next to the walk-into probe above, on its top instead of a side face. An idle player is not a probe. After player_teleport(pos=[x, <top + 0.07>, z], skip_clearance_check=true) the player kept the teleport height (y 340.6000) and did not fall, on a box top and above open ground alike: the server read it twice over 3-4 s (query_player_state), and above open ground the client's physics position (the start_pos that player_move reports) still read it 15 s after the teleport (the worn-items section below saw the same after a teleport to y=160). Every query_player_state of these probes read godmode on, the DayZ_MCP default; the run did not separate the bridge, godmode and the engine as the cause. A short move applies the fall: the run teleported the player above the centre of each top, called player_move(angle_deg=0, speed="walk", hold_s=0.5), then query_player_state. Above open ground the player dropped to the ground (y 340.6000 to 338.459); on the boxes, three Inventory_Base items at least 4 m from their neighbours (two outward-wound, MLOD and binarized, and one inward-wound), the server's y matched the top to within 0.0001 m (spawn y + 2.000 m, where scene_raycast(method="bullet") hit it) and its x, z lay 0.70-0.75 m from the centre, inside the 2 m top. Read the server's position after the move: with x, z still inside the top's footprint, y at the top's height there means the player stands on it and y at the ground means it fell through; an endpoint off the footprint, or any other height, is INCONCLUSIVE. Start above the centre of an isolated top (no other support at that height within the walk's reach, or the player can end on it), and run the same teleport and move above open ground as the falling reference. Keep the move short: 0.5 s took the player 0.70-0.75 m by the server's position read after the move, with the edge 1 m away; a top whose nearest edge is closer than that can be walked off in 0.5 s, and the endpoint check then reads INCONCLUSIVE.

  • Placement: telemetry_read(mode="object_at", type=<classname>, pos=<spawn_pos>, radius=2) → found=true, pos ~ spawn, reasonable orientation. PASS = not buried or floating (cross-reference pos.y with visuals).

Item / arma

  • Load + visible/textured/winding as above, with emphasis on proportions vs real-world reference and on post-import geometry (orientation, winding) — where generated/imported meshes tend to fail.
  • telemetry_read object_at → attachment_count, health01. Telemetry PASS = found + healthy stats.
  • Collision: as for a static object, the ray battery with its two controls. Picking the item up, by hand or with action_use, does not test it (static-object playbook, "Picking an item up proves nothing about its collision").

Vehicle (placement/structure only)

  • Load + visible + collision + telemetry. vehicle_enter(pos) → seated=true confirms seat. telemetry_read → engine_on_server, wheel_count, fuel_fraction.
  • vehicle_enter SEATS player (placement/seat). To DRIVE: drivability ladder (§DRIVABILITY + references/acceptance-ladder.md) covers autonomous driving via owner-side verbs (vehicle_get_in_client/engine_set/vehicle_control/vehicle_telemetry).

CAPTURAR ARMA ALZADA / ADS (raise client-side) [VERIFIED-SR2M gate iter36→37]

To validate RAISED/aimed weapon pose (e.g. support hand grip) there is no player input tool. Weapon raise is forced IN THE MOD, client-side — captured character is client's LOCAL player, so server init.c override DOES NOT alter the pose client renders (exact symptom: server log states raised=1 but capture shows weapon LOWERED).

Drop-in: a modded class MissionGameplay in a gate mod (declares a missionScriptModule in its class defs, files[]={"Mod/Scripts/5_Mission"}; build -PackOnly so .c survives packing):

modded class MissionGameplay
{
    override void OnUpdate(float t)
    {
        super.OnUpdate(t);
        PlayerBase p = PlayerBase.Cast(GetGame().GetPlayer()); if (!p) return;
        HumanInputController h = p.GetInputController(); if (!h) return;
        h.OverrideRaise(HumanInputControllerOverrideType.ENABLED, true);  // ENABLED persiste; ONE_FRAME parpadea -> idle
    }
};

Key takeaways:

  • 3rd-person aim pose depends SOLELY on IsRaised() (dayzplayerimplement.c:1742, AimingModel) → sustained raise is enough. DO NOT call SetIronsights(): forces ironsight camera which fights MCP free-cam, and server-side left weapon untextured.
  • WeaponADS() (human.c:86) is INPUT flag without script override (human.c:253-274) → always 0 even if ADS works. Success signal = IsRaised() / client log, NOT WeaponADS().
  • Keep OverrideRaise(ENABLED) server-side (init.c) as well so server agrees.
  • Judge grip by hand at NATIVE resolution (crop orbit frame), never rescaled contact-sheet. Grip mechanism + geometric parity: skill dayz-animation-pipeline (references/weapon-in-hands.md).

TOOL → WHAT IT VERIFIES

Tool Verifies Failure signal
world_spawn classname loads unknown_type / spawn_failed → mod not mounted
camera_set + capture_screenshot render: visible, textures, winding, proportions invisible / magenta / holes
scene_raycast (default rvproxy) LOD collision (Geometry/ViewGeo/FireGeo, by intersect) no hit where it should hit
scene_raycast(method="bullet") a physics shape on the masked layers (static-object playbook) no hit on the target where it should hit; a miss alone is not proof
player_move walk + query_player_state the player stopped by the object (static-object playbook) arrived:true through it; a walk-through alone is not proof
telemetry_read (object_at) placement, orientation, attachments, health found=false / buried pos
bridge_status peer liveness (gate) last_poll_age_s=null → bridge down
world_time_set / world_weather_set reproducible scene for captures —

WHAT IT DOES NOT COVER (ALWAYS declare in report)

  • Player and UI actions: open/close doors, interactive inventory, shooting, reloading, menus. There is no generic player input tool. (Driving IS covered — ladder §DRIVABILITY / references/acceptance-ladder.md with owner-side verbs.) For a building, geometry/collision YES; doors NO → manual test.

  • exec_enforce does not execute on the headless diag server (GATE4B-LIM, engine limitation like MakeScreenshot) — do not rely on it to "execute arbitrary verification logic".

  • telemetry_read is exposed as-is (BUG-010/011/012, hardening pending): does not certify large JSONL fixtures or extreme ranges.

  • CONTINUOUS actions (with progress bar): action_use STARTS them but does NOT COMPLETE them (measured 2026-09-07, LFPowerGrid, ledger entry fb-20260907-184749-3fc1). Returns ok=1, started=1 and the server effect never arrives: OnFinishProgressServer does not fire and the target remains in the world (entities_query at 0.003 m after two attempts with 60 s and 45 s waits). key_press is not the way out: it documents itself "not OS input, key-up, hold", and a continuous action needs SUSTAINED input. This immediately kills dismantling, deploying/deploy, and crafting, which is precisely how a mod moves money and persistent objects.

    • What CAN be affirmed, and it is not little: the CONDITION is evaluated for real, so started=1 means "valid candidate" and serves as a measure that the mod offers the action on that target in that state. Always verify it with a negative control that must come out red (an excluded target returns condition_failed), or started=1 proves nothing.
    • Corollary that bites separately: since deploying from a kit is a continuous action, there is no way via MCP to create a truly persistent object — world_spawn uses default flags and does not survive restart. Add that dayz_test_stop does not shut down gracefully (the next startup prints ... was not closed. Always shut down the server gracefully) and no test of OnStoreSave/OnStoreLoad between restarts is conclusive via MCP today. If the result comes out "did not persist", that is the harness, NOT the mod: do not report it as a bug.
  • class Doors (Building) doors do NOT open by MCP without door_index (measured 2026-09-07, LFSecure I-0/I-4, PBO L4): action_use(ActionOpenDoors, classname=<door>) returns condition_failed even with the player 1.4 m away, because the bridge builds the ActionTarget with componentIndex=-1 and Building.GetDoorIndex(-1) (native, 3_game/entities/building.c:28, "index of the door based on the view geometry component index") resolves no door. object_anim(source=<door source>, phase=1.0) answers phase=1, but the engine's door controller returns it to its "wanted" phase (re-read phase=0) and IsDoorOpen(index) stays false, so every action that needs an open door also returns condition_failed. Without door_index, opening/closing, sound and sync were a MANUAL test (the user's F) and MCP could only verify "starts closed" (object_anim reads phase=0); see the update below.

  • Update (measured 2026-10-01, DayZDiag 1.29.163709, test building whose door component is a button on a moving piece) [EXACT]: action_use with ActionOpenDoors/ActionCloseDoors and door_index DOES open and close the door even there. object_anim (SetAnimationPhaseNow) on the door's source still cannot hold a static pose: the door settles at ajar with phase 0.07 instead of the requested phase — doors cannot be posed statically. For the verdict, use object_doors and rays.

  • setup_failed is a FALSE NEGATIVE for local instantaneous actions (IsLocal() && IsInstant(): ActionTogglePlaceObject, ActionDropItemSimple; measured 2026-09-07): the bridge checks GetRunningAction()==null right after PerformActionStart, and an instantaneous action has already finished. The hologram appeared and the object fell to the ground in both cases. Rule: with setup_failed on an instantaneous action, verify the EFFECT (capture, entities_query of dropped object) before marking the action as failed.

  • scene_raycast: entry=0 is TERRAIN and normal is NOT a unit normal (measured 2026-09-07 with intersect=fire and geom): a vertical ray against the ground returns hit=1, object_type="", surface_type=cp_grass|cp_concrete2, entry=0, exit=0; against an object it returns entry=1. The normal field is RaycastRVResult.dir as-is, which in line-object collision is "direction AND SIZE of the intersection" (3_game/global/dayzphysics.c:104): measured magnitudes 0.16-0.42. Its direction is the ray's own ("Axis-aligned test fixtures" above), so it says nothing about the face: never read it as a normal nor use it as a threshold (dot >= 0.9 is never reached); a face normal comes from method="bullet". (Corrected 2026-10-02: this line said to use it only as direction (sign/axis).) A mod that filters !hit.entry discards natural ground (hologram that never snaps to ground: LFSecure I-1). (Qualified 2026-10-03: a ray that starts inside an object also reads entry=0: the inside rays of run 606a5dbb read entry 0, exit 1 at distance 0 on the controls. Tell terrain by its empty object_type, not by entry=0 alone; entry=1 holds for hits from outside.)

  • Collision probe with vanilla CONTROL before blaming the mesh (measured 2026-09-07, LFSecure L3 -> L4): if scene_raycast does not hit a mod static, repeat the SAME ray (view, fire, and geom; from outside AND from inside) against a vanilla static spawned next to it (world_spawn(type="Land_Container_1Aoh"): flat walls, House, IsBuilding() true, also useful as a wall for holograms). Control HIT + mod MISS in all modes and from both sides = reversed collision convex components (inverted winding in Geometry/View/Fire: ODOL preserves them, engine does not see them); control HIT + mod HIT only from inside = reversed faces only in visuals. With the source winding restored (L4) the same ray gave the front face at +0.079 m and a wall of 0.42 m. The correction rule lives in dayz-p3d-audit (0% agreement = discrepancy, not direction). (Qualified 2026-10-03: the two readings above name the likely cause, not a measured one; only a pair that changes the winding alone decides it, as "Ray battery and its controls" in the static-object playbook says.)

REPORTING

A report with: criteria table (criterion · PASS/FAIL/INFO · evidence), PNGs and telemetry/raycast JSONs as evidence, global verdict, and a "to manual test" section with what is not covered (doors, shooting, etc.). Context cost: each capture weighs ~25k tokens (~240-320 px) — batch orbit-pose captures and do NOT re-read a PNG except to verify something concrete (images inflate context quickly). Hard budget ~25k tokens/image: do not request higher resolution.

TROUBLESHOOTING

Symptom Cause Fix
claude mcp list → × Failed to connect claude mcp list is NOT reliable: gives false Failed with the server operational. E4 contention on port 8765 (ExclusiveThreadingHTTPServer lock, fail-closed) was the PRE-broker failure mode verify FIRST with ToolSearch (mcp__dayz-mcp__* tools available? → all OK, ignore Failed). Broker registration --client (since 2026-06-24) overcomes E4 contention: N sessions share the server without fighting for 8765, and orphan-guard releases orphans alone. If tools are truly missing: register in broker mode (--client) and open NEW session (tools load at startup)
tools do not appear in session server was registered AFTER opening session open a new session (MCPs load at startup)
bridge_status.server_peer.last_poll_age_s = null server bridge does not poll check dayz_mcp.json in server_profiles + key; confirm @DayZ_MCP mounted (absolute paths !Workshop)
client_peer … null (server ok) client does not connect or client_profiles\dayz_mcp.json missing BUG-009 (flaky autoconnection): larger -ServerWait / retry; seed client config
version_state = legacy_blocked --require-version ON against a bridge not sending ver= deploy 4B PBO (sends ver=4~…), or register server without --require-version for that run
byte-identical captures between poses grab caught a stale desktop frame (not render) [EXACT] PrintWindow(hwnd, hdc, PW_RENDERFULLCONTENT=2) on the client's main window DOES capture the D3D game area — full scene in >20 captures even with another window covering it and without taking focus, as long as the Windows session is unlocked and the display is on (measured in game, DayZDiag 1.29, 2026-09-28). A black game area means the display is off or the session is locked, not that the route cannot read D3D. CopyFromScreen only works with the window in front, and a covered DayZDiag also drops to ~20 FPS; validate on a crop of the game area, not whole-frame variance (corrects the LL-247 entry of 2026-08-12)
tool timeout and then "zombie" commands on reconnect BUG-024: timeout leaves command queued; bridge executes it on return after a timeout, reconcile with bridge_status before continuing

REFERENCES

  • dayz-test-ingame — build/deploy/launch (this skill composes it with -ExtraMods "@DayZ_MCP").
  • DayZ_MCP_dev\tools\README-mcp.md — startup order + bridge troubleshooting.
  • DayZ_MCP_dev\HANDOFF.md (LIVE-STATE) — server invariants, 11 tools, GATE4B-LIM, backlog.
  • _shared\dayz-conventions.md — L2 (LODs, ViewGeo/FireGeo, DayZ response format).
  • Precedent of camera+orbit capture: A6's gate-mcp.ps1 (window-grab by orbit, dayz-test-ingame finding 2026-06-17) — alternative batch sweep to agent driving tools.

VEHICLE: repeatable smoke recipe (added 2026-06-24)

Visual smoke of a CarScript vehicle driven by MCP, verified end-to-end on MercedesAMGLF 2026-06-24. Repeatable without re-deriving:

  1. Mission = stock dayzOffline.chernarusplus (from DayZServer install), NOT a Phase 0 mount-probe void main(): mount-probe spawns no player → client does not render the world and capture comes out black. Stock spawns player (CreateCharacter→CreatePlayer) → free-cam with rendered world. Pass it with -Mission "<...>\dayzOffline.chernarusplus".

  2. Bridge seed in profiles generated by dayz-test.ps1: dayz_mcp.json {"url":"http://127.0.0.1:8765/","key":"<key>","pollHz":5} (ASCII) in <Mod>_dev\_server\profiles\ and ..\_client\profiles\. The bridge reads it from $profile: (server MCPBridge.c:125, client MCPClientBridge.c:211); key = DayZ_MCP_dev\tools\.dayz_mcp.key. Seed BEFORE launch (the bridge reads config in its init, only once). Do not use install-mcp.ps1 -Register (re-registers broker mode --client).

  3. Launch: dayz-test.ps1 -Mod <Mod> -Mode all -Build -PackOnly -ExtraMods "@DayZ_MCP" -Mission "<...>\dayzOffline.chernarusplus" -ServerWait 240. -PackOnly mandatory in mods with .c (binarize drops them → NO_IGNITER). Call the .ps1 via absolute path (P:\ is subst).

  4. Readiness: stock runs CE (InitOffline) ~1-3 min; during CE bridge_status comes out STALE (last_poll_age_s grows even though version_state=ok) — do NOT spawn there. Wait for connected to server in server's script*.log and for bridge_status to return fresh (<1 s). Poll log host-direct with PowerShell, NOT bash Monitor (inherits bindfs cache, LL-142).

  5. Smoke (grouped, R5): world_time_set(year,month,day,hour=12,minute=0) (all 5 mandatory) + world_weather_set overcast=1.0 → world_spawn <Class> pos≈[player+~10] → wait 30 s (survives without native crash = LL-099 ruled out) → camera_set (cam_mode "lookat", cam_pos+look_at) + capture_screenshot + scene_raycast + telemetry_read object_at. Healthy telemetry = found=1, health01=1, velocity 0.

  6. Flaky capture: grab sometimes catches loading screen or client's "Continue" menu overlay instead of render. If it happens: wait for settle (~30-40 s in background — foreground sleep is blocked in this environment) and recapture; use several angles. Top-down that clearly reveals proxy (mis)alignment: cam_pos=[carX+3, 16, carZ+1] look_at=[carX, ground+0.1, carZ]. ~25k tokens/image — batch captures, do not re-read a PNG except to verify something concrete. A frame flat everywhere, vanilla terrain and sky included, is not a flaky grab of the model: withhold its texture verdict, check that the client window has focus and capture again after settling, since textured runs have opened with 4-11 s of flat frames; if the scene stays flat, its visual evidence is SETUP_FAIL and the run is relaunched (dayz-test-ingame references/session-findings.md, "H2R import (2026-10)").

  7. User's eye > capture when render is ambiguous: in MercedesAMGLF grab was flaky and user reading was reliable diagnosis of winding and proxy alignment. If there is a human in the loop, cross-check with them. (Case s3 2026-06-24: I was about to sign PASS on faint renders; user's eye caught proxy misalignment I could not resolve → correct FAIL.)

  8. SHARED SESSION. Port 2302 and Steam client remain single resources, but exclusion is coordinated with the runbook's FIFO lease, not attributing processes nor evicting other sessions. dayz_test_run acquires and maintains exclusion; retain run_id and terminate that same run with dayz_test_stop. NEVER kill a process to unlock the box: if state does not reconcile, retain the process and declare degraded shutdown.

  9. "Wheels = sheet/flat disk" is NOT a proxy bug. A world_spawn of a CarScript without attachments leaves wheel_count=0/attachment_count=0 → only hub/disk is visible, without tires. Expected in visual smoke; real wheels require attachments (physics phase), out of scope for smoke.

  10. legacy_blocked ("poll did not include ver=") is usually INCOMPLETE INIT, not version mismatch (added 2026-06-28). Refines the homonymous row in TROUBLESHOOTING: with 4B PBO deployed, right after launching server bridge_status can come out legacy_blocked/last_poll_age_s=null because the bridge has not yet completed the handshake; transitions to ok with ver=4~… when server mission LOADS completely (~1-2 min). Do NOT redeploy nor re-register for that — wait and re-check. It is only a real mismatch if it stays legacy_blocked with mission already loaded (client connected, world rendered). Origin: SUB_BRZ Phase 5 2026-06-28.

  11. Historical pattern superseded 2026-07-15. cmd start/.bat avoided a background job losing its child, but created a process outside the registered lifecycle. For any current smoke, use exclusively dayz_test_run, retain its run_id and terminate only that run with dayz_test_stop. No unmanaged fallback exists to bypass the lifecycle guard.

DRIVABILITY + ACCEPTANCE LADDER (summary — detail in reference)

Phase 5 of DayZ-MCP project added and gated in-game owner-side verbs that DO drive the car (client takes ownership and handles throttle/steer): vehicle_get_in_client(pos) (seats + ownership), engine_set("start"/"stop"), vehicle_control(throttle, steer, brake, handbrake, hold_ttl_s) (SUSTAINED control, fail-closed), vehicle_telemetry(), vehicle_release(), and query_get_in_condition(pos, component) (server peer, diagnoses which of the 7 gates of ActionGetInTransport blocks). On top of them runs the acceptance ladder rip→drivable: ordered rungs R1 spawns → R2 render → R3 get-in available → R4 seated → R5 drives → R6 wheel direction, each reading in-game ground-truth and mapping its failure to a known fix in the SUB_BRZ taxonomy (dayz-vehicles/references/). Reference orchestrator references/drive_ladder.py (drives R1→R6, outputs verdict.json; does NOT apply fixes nor rebuild) + fixtures tests/test_drive_ladder.py.

Full detail (verbs, verified owner-side mechanism, preconditions, spawn placement, R2.5 restore-gameplay, anti-false-green guardrails, ladder table, and failure→fix mapping) → references/acceptance-ladder.md.

(added 2026-07-14) No restore-gameplay tool: for user MANUAL test, relaunch without @DayZ_MCP

camera_set ALWAYS suppresses player control (SuppressGameplay() -> PlayerControlDisable, see §R2.5) and there is NO MCP tool that fires RestoreGameplay() — only internal gate drive_probe_client does it, and it is not exposed as a verb/tool. Practical consequence: after an MCP smoke that used camera_set (free-cam or static-cam lookat), the USER cannot take player control to test the car by hand — their input remains suppressed and there is no verb to revert it on the fly.

Rule: when workflow passes from MCP smoke (automatic) to user manual test (driving, judging feel/aesthetics), relaunch the game WITHOUT @DayZ_MCP (or at least with a client that never received camera_set in that session). A clean client has normal control. If the client was already neutered: reconnecting (Esc -> Disconnect -> Reconnect) recreates the player with clean camera/control; there is no tool shortcut. Origin: SUB_BRZ s35 — time was lost looking for a non-existent restore tool and user had to close the game and ask to relaunch normally.

(added 2026-07-14) Autonomous smoke: world_spawn takes engine [x, y_up, z], and capture with sleeping display = black frame (SP-060)

Dos caveats de smoke MCP autonomo verificados in-vivo (SUB_BRZ s32):

  1. world_spawn takes vector in ENGINE order [x, y_up, z_north] (MCPBridge.c:1638 Vector(x,y,z)), but bridge connect-log prints player position as <x, z_north, y_up>. Passing the log triplet VERBATIM spawns the object at ~6 km altitude -> IsSpawnReady (2.0 m radius) is never satisfied -> job timeout + found=0, and engine auto-deletes the orphan (NETWORK (E): Will delete object ... outside world coords). Cost 3 timeouts in a row. Rule: convert <x,z,y> -> [x,y,z] before every world_spawn/camera_set; after a spawn timeout, grep RPT for outside world coords BEFORE retrying (distinguishes bad-coords from slow-spawn). Verifiable with scene_raycast to terrain (gives real y_up).
  2. Capturing with the display asleep = BLACK frame even though the client runs (on 2026-07-11 a locked session with LockApp also gave black frames; since 2026-09-14 the capture backend fails outright on a locked session instead, see point 4). Fix: bring the client window to the foreground + input wiggle (mouse / F15) before EVERY capture_screenshot. Misleading symptom: it looks like "the mod's render is broken" and it is the compositor.
  3. (minor) Spawn adjacent to player can fall INSIDE a building -> probe 3-4 scene_raycast to clear terrain before choosing pos.
  4. [EXACT] A locked Windows session is a distinct capture failure (added 2026-09-14, SUB_BRZ s93): with LogonUI alive, capture_screenshot does not return a black frame — it fails outright with capture_backend_failed on every attempt while the game client stays alive and probing. Before budgeting captures in an unattended run, run Get-Process LogonUI first: with a locked session there is no host capture at all, for the MCP capture and for any window-grab script. (measured in game, DayZ 1.30.164014 Exp)

Origin: SUB_BRZ s32 MCP smoke (2026-07-11): 3 world_spawn timeouts with raw log pos + 2 black captures with LockApp; both resolved with the above.

(added 2026-07-14) Telemetry numeric gates: calibrate against MEASURED PHYSICAL FLOOR, not ideal fixtures (SP-061)

Invariant for any acceptance-ladder / numeric gate on in-game telemetry (car drive_ladder, spikes, future harnesses):

  1. A threshold calibrated with ideal mathematical fixtures is a gate that no real physics passes. The engine has a native noise floor (body dither between SetVelocity and reading; client network interpolator). Before setting a threshold: MEASURE the floor in a real run (metric p95 on real data), threshold = floor x margin (>=2x), and document the measured numbers next to the constant. Two
Files (dayz-modding-knowledge-pack)
  • references
    • acceptance-ladder.md 21.2 KB
      Loading…
    • dayz-1-30-mcp-verify.md 15.2 KB
      Loading…
    • drive_ladder.py 21.4 KB
      Loading…
  • tests
    • test_drive_ladder.py 9.4 KB
      Loading…
  • SKILL.md 109.4 KB
    ---
    name: dayz-mcp-verify
    description: >
      Auto-test a DayZ mod in-game through dayz-mcp without keyboard or OCR:
      spawn a classname, orbit/capture, raycast collision, inspect
      placement/attachments/telemetry and emit PNG+JSON evidence. Compose with
      dayz-test-ingame; dayz_test_run/dayz_test_stop own the managed lifecycle,
      then this skill drives the bridge. Use for "auto-probar el mod", "verificar
      in-game con MCP", visual smoke/re-test, "comprobar que el .p3d carga/se
      ve/colisiona", automated spawn+capture+raycast, or the vehicle acceptance
      ladder (spawn→render→get-in→drive→wheel direction). Covers static objects,
      items/weapons, buildings without doors and vehicle placement/drivability.
      Player UI, door interaction, inventory use and firing remain manual.
      Also: ScriptConsoleTabRegistry, IsHeadless roboclient, UA_AM_INIT action inject.
    ---
    
    # DayZ MCP verify — auto-test in-game vía tools MCP
    
    ## GATE 0 — ask WHO is driving, before touching anything (added 2026-08-07)
    (until 1.29: managed `dayz_test_run` / `dayz_test_stop` and Mode=all capture still hold.) (since 1.30: Diag Script Console tabs register via `ScriptConsoleTabRegistry`; `IsHeadless()` names roboclients; SP `PerformActionStart` no-ops while pending. Details: [dayz-1-30-mcp-verify.md](references/dayz-1-30-mcp-verify.md).)
    
    **Before the first `dayz-mcp` tool in a verification run, ask the user whether
    they are driving or the MCP is.** Neither is assumed. A single question per run, not per
    capture.
    
    Why it is a gate and not a preference: **with the user present, their manual cycle is faster
    and yields better results** — spawns with VPP in seconds and evaluates the whole scene at a glance,
    while MCP loop needs to position camera, capture, and chain tools. MCP wins when
    the user is NOT there: early morning, unattended run, or while attending another front. Furthermore,
    changing mode is not free midway (clean manual test requires relaunching without
    `@DayZ_MCP`), so the decision is made at the start of the cycle or paid twice.
    
    | Situation | Who drives |
    |---|---|
    | User present and available | **Them** (VPP + direct judgment) — MCP only if they ask |
    | User absent / unattended run | **MCP**, and report is left for them with evidence |
    | Doubt | **Ask.** Never assume |
    
    What does NOT change: MCP remains mandatory for what a human cannot measure by eye
    (telemetry, numerical raycast, exact placement, repeatable series). There you do not ask, you use it.
    
    Measurement that originated gate (2026-08-07, corpus of 276 sessions): 63% of wall-clock time in a full
    cycle falls on user side, and 71% of their actual verifications are automatable with
    today's tools. That it is automatable does not imply it should be automated: with them present,
    their cycle rules.
    
    ## WHAT THIS DOES
    
    Drives an already launched DayZDiag client, via `dayz-mcp` MCP server tools, to
    verify a mod without human intervention: spawns object, views it from multiple angles
    (camera + window-grab), checks collision via raycast, reads placement/telemetry, and
    produces a report with pass/fail criteria and evidence. It is the automated **observation**
    loop bridging the gap between "PBO compiles/deploys" and "looks and behaves properly
    in-game", for the class of properties that DO NOT require keyboard input.
    
    Server-authoritative + passive pixel capture. Control and data are engine-native
    (spawn, raycast, telemetry, camera); sole non-native piece is visual capture
    (window-grab of rendered client — `MakeScreenshot` is broken in diag, T165276).
    
    ## COMPOSITION — public lifecycle + MCP verification
    
    Build/deploy/launch belongs to **`dayz-test-ingame`** (its environment preflight runs on its own:
    `P:\` mounted, junction `P:\Mods`, AddonBuilder, `allowFilePatching`). This skill invokes it
    with MCP mod added and then drives. Bridge verbs do not start or terminate
    processes; public test tools do orchestrate managed lifecycle.
    
    Before operational flow, read canonical protocol:
    `<runbooks>\dayz-mcp-agent-session-protocol.md`.
    [EXACT][CLAIM-R21-MCP-ORCHESTRATED-TEST] Execute lifecycle with
    `dayz_test_run` and stop it with `dayz_test_stop` on exact `run_id`. Both
    tools possess FIFO queue, lease, heartbeat, and release; do not wrap them in
    a second `session_acquire`. Reserve `session_*` primitives for
    low-level mutations not already encapsulated. Every lifecycle is
    identified by `run_id`: sharing mod does not grant ownership. Under retail
    quarantine only reads are allowed; if whoever opened retail cannot close it via
    UI, declare `manual_cleanup_required`.
    
    **Bridge startup sequence (rev. 2026-09-06): `dayz_test_run` → `session_acquire_wait` →
    verbs. Never probe before adopting.** "Do not wrap launch in another lease" does not mean run
    remains yours: upon completion, `dayz_test_run` RELEASES its owner lease (daemon audit:
    `session_release_finished reason=owner_release` right after launch) and run transitions to `RUNNING_IDLE`
    without owner (`release_owner`, `process_lifecycle.py:958-976`). From that instant the idle run fence
    rejects ALL `/enqueue` on that run, **reads included**: `_enqueue_run_rejection` discards flag
    `mutation` (`loopback.py:1293-1296`) and for `RUNNING_IDLE` returns `run_not_owned` (`:1317-1318`) with
    hint "This run has no owner (RUNNING_IDLE). Adopt the existing run before dispatching." (`:99-102`,
    `:1323-1329`). The counter-intuitive part: `bridge_status` counter is named
    `fence.mutation_rejects_by_code` (`:2821-2822`) and counts reads as well. Every verb crossing
    bridge falls there (`query_*`, telemetry, raycast, captures, `world_spawn`…) and also
    `wait_for(players_at_least|players_at_most)`, which polls with `query_all_players` (`server.py:2645-2650`).
    `wait_for(log_matches)` does NOT fall: reads log files without touching bridge (`server.py:2603-2637`,
    `:2686-2697`).
    
    1. `dayz_test_run(...)` → retain `run_id`.
    2. Optional without adopting: `wait_for(log_matches, "…")` to wait for startup via RPT.
    3. `session_acquire_wait(purpose=…)`: grant adopts the ONLY ownerless `RUNNING_IDLE` run and
       declares it in `adopted_run` (`_adopt_on_grant`, `loopback.py:3119-3120`, `:3193-3230`). Check
       `adopted_run.ok` before first verb. With multiple idle runs it answers
       `adopted_run.error = "multiple_idle_runs"` and adopts none (`:3202-3208`): `dayz_test_stop`
       surplus run and repeat.
    4. `wait_for(players_at_least, 1)` and remaining verbs.
       - [EXACT] The adopted lease expires by itself (added 2026-09-27, LFPowerGrid, three runs): it lasts 120 s and is NOT renewed internally, fresh MCP client or not. Send `session_heartbeat` at least every ~90 s during the whole run, including while a human plays. Past the deadline the run goes ownerless again (`grace.remaining_s` counts down) and the daemon stops it (`lifecycle_stop_outcome: stopped`), even with the user in front of the game. (measured in game, DayZ 1.30.164014 Exp)
    5. `session_release` → `dayz_test_stop(run_id)`.
    
    With an MCP client prior to `8f5727f` of DayZ_MCP (2026-09-06) rejection arrived as a
    BARE `remote_error`, without code or hint (ledger entry `fb-20260906-193626-f45d`, first attributed to a
    client without polling); with current client it arrives as `run_not_owned: This run has no owner
    (RUNNING_IDLE)…`. In both cases remedy is adopting, neither retrying nor relaunching. This rule corrects
    step 1 of recipe SP-292 and clarifies first bullet of SP-152, below.
    
    Two lease failures around long waits (measured in game sessions, 2026-09-28): (1) `wait_for` over the log does NOT renew the lease — a wait longer than ~2 min expired with `lease_expired`; interleave `session_heartbeat` between waits. (2) When a user message interrupts an in-flight call (a long `wait_for`), the next `session_heartbeat` answers `lease_invalid: token was never valid for this client`; if the run is still alive, `session_acquire_wait` readopts it. Also: `dayz_test_close` shuts the run down in order, with a termination line on both sides. [EXACT]
    
    ### Companion externo: dayz-labs
    
    [EXACT][CLAIM-R21-MCP-COMPANION-AUTHORITY]
    `external_companion_no_lifecycle_authority`. Release dayz-labs v0.1.35,
    reviewed at pinned commit
    `dbd6ad3e54e30c81a9aeb88fcb9f60f007804c2a`, can serve as reference or
    optional companion. Its `start/stop/restart` verbs are excluded while
    DayZ_MCP holds a run: only `dayz_test_run` / `dayz_test_stop` on exact
    `run_id` govern that lifecycle. Do not install or update companion
    as part of a gate; always document the examined `pinned_version`.
    
    Its interface is WPF and captures its own application:
    `wpf_not_layout_evidence`. A correct capture from dayz-labs does not validate the
    parser, proportions, clipping, or semantics of a DayZ `.layout`; UI
    viewer needs its own render and comparison against in-game evidence.
    
    The `dayz_test_run` request must select `Mode=all`, build when PBO
    changed, and `@DayZ_MCP` as additional dependency:
    
    - `-Mode all` (server + client) is MANDATORY: visual capture reads from **rendered
      client**. A headless `-Mode server` has no window to grab.
    - `@DayZ_MCP` is loaded alongside the mod under test; both peers (server + client bridge) poll the
      MCP server loopback.
    
    ## PREREQUISITES (gate before driving)
    
    1. **`dayz-mcp` registered and connectable.** PRIMARY gate: are tools
       `mcp__dayz-mcp__*` available in session? (ToolSearch finds them → gate PASS). `claude mcp list` is
       SECONDARY and NOT reliable: gives false `× Failed to connect` with server operational — do not block
       on it if ToolSearch sees tools. Tools are only available in a session started
       WITH server already registered (broker registration `--client`, see TROUBLESHOOTING).
    2. **Bridge config seeded.** In-game bridge reads `dayz_mcp.json` (url + key + pollHz) from
       its profiles; MCP server uses `<DayZ_MCP_dev>\tools\.dayz_mcp.key`. Seed the SAME key in
       launch profiles with `install-mcp.ps1` pointing to directories generated by `dayz-test.ps1`:
    
       ```powershell
       <DayZ_MCP_dev>\tools\install-mcp.ps1 `
         -ServerProfiles "<TargetMod>_dev\_server\profiles" `
         -ClientProfiles "<TargetMod>_dev\_client\profiles" `
         -MissionPath "<...>\mpmissions\dayzOffline.chernarusplus"
       ```
    
       `[verify on first run]` — generic seeding (arbitrary mod + `@DayZ_MCP` via
       `dayz-test.ps1`) was until now only exercised through `run-fase3.ps1`. The FIRST run
       of this skill validates that bridge finds config in these paths; if `bridge_status`
       reports `last_poll_age_s = null`, config is not where bridge looks for it — adjust
       path and declare it.
    3. **`bridge_status` green.** ALWAYS first call: `bridge_status`. `server_peer` must
       have fresh `last_poll_age_s` (not null). For capture, `client_peer` as well. `never
       polled` → bridge did not start (config/key/startup) → abort and diagnose, do not keep
       driving blindly.
    4. **Mods passed via `extra_mods`/`base_mods` must be REAL DIRECTORY under `P:\Mods`
       (→ `!Workshop`); Steam junctions ARE NOT valid.** Two layers, confusing them costs a session:
       - Public boundary `_valid_public_mod` (`DayZ_MCP_dev\tools\dayz_mcp\dayz_test_tool.py:75-85`)
         rejects `:`, `\` and `/` across **all** projects → absolute workshop path never passes
         through tool. That is by design, NOT a gap in your project's policy. *(Updated 2026-10-03: the
         boundary now also accepts an absolute path inside the selected project's `mod_roots`;
         `_valid_public_mod` calls `dayz_test_request._valid_mod_entry` (`dayz_test_tool.py:269-272`,
         `dayz_test_request.py:222-233`, DayZ_MCP_dev `506de5d`). A workshop path lies outside them and
         still fails, with `bad_mod`.)*
       - Subscribed mods exposed by Steam in `!Workshop` (`@CF`, `@Dabs Framework`,
         `@VPPAdminTools`) are **Junctions** to `steamapps\workshop\content\221100\<id>`, and path
         identity guard rejects them → `dayz_test_failed`, which is the generic catch-all of
         `server.py:1101` and **swallows the real cause**.
    
       **Operational consequence**: CF/Dabs/VPP are only loaded by declaring them with **absolute path** in
       project `default_base_mods` inside launcher `request-policy.json` — which is how
       SUB_BRZ and LFHeli declare them. Mods that are real directories (`@DayZ_MCP`, `@LFHeliCore`, mod
       under test) do go via `extra_mods` with relative name.
    
       Diagnosis in one command:
       `Get-Item '<!Workshop>\<@Mod>' -Force | Select-Object LinkType` → `Junction` = relative does not work.
       Measured 2026-08-02 with `preflight=true` (pure dry-check: `dayz_test_worker.py:533-534` returns
       before build and launching anything): without mods OK · `@DayZ_MCP` OK · `@A6_SR2M` OK · `@CF` FAIL ·
       `base_mods=["@CF"]` FAIL.
    
       [EXACT][CLAIM-MCPV-JUNCTION-EXTRA-MODS-130] *(Corrected 2026-10-26, stable box, DayZDiag
       1.30.164200.)* A Steam junction did pass in `extra_mods`: `@SurvivorAnims`, a mount-point
       junction in `!Workshop` (Workshop item 2918418331), passed `preflight=true` with project
       `DayZ_MCP` and then loaded in two runs, server and client (`-mod=P:\Mods\@DayZ_MCP;P:\Mods\@SurvivorAnims;...`
       in the RPT header, `World` module at 2349 files with its scripts). The rejection above was measured
       on 2026-08-02 with `@CF`. Run the preflight on the junction you need before going through
       `request-policy.json`.
    
       **When the mod under test does not compile, test a probe copy of it** (added 2026-10-03,
       measured 2026-10-02, dayz-mcp run 606a5dbb) [EXACT][CLAIM-MCPV-PROBE-COPY], for example when
       its build packed another session's untracked test scripts:
       - copy the deployed PBO entry for entry without those entries (every other entry byte-identical,
         the same header properties, the SHA-1 trailer recomputed) into a probe folder of its own under
         `P:\Mods`;
       - host it in another approved project whose `default_base_mods` carry what the mod needs (CF and
         Dabs there): an absolute workshop path in `base_mods` fails with `bad_mod`, since each entry
         must be a folder name or an absolute path inside the project's `mod_roots`
         (`dayz_test_tool.py:399`, `dayz_test_request.py:222-233`);
       - writing under `P:\Mods` changes what every later run can load: ask the owner in chat first (in
         that session the agent harness's auto-mode permission check blocked the write until the owner
         agreed), and move the probe out of `P:\Mods` when done.
    
       In that run the copy (641 of the 645 entries) compiled the mission module, and its models were
       the deployed ones byte for byte.
    
       ⚠ **Before blaming the bridge for `version_blocked`/`last_poll_age_s=null`**: check that
       `key` of `dayz_mcp.json` in project profiles is the SAME as
       `DayZ_MCP_dev\tools\.dayz_mcp.key`. A stale key gives 401 and bridge never polls, with
       symptom identical to "mod is not loaded". Key rotations leave behind projects
       not exercised since then (2026-08-02: MERCEDES_AMGLF and LFPowerGrid with old key,
       SUB_BRZ/LFHeli/DayZ_MCP with current key).
    
       ⚠⚠ **The symptom is NOT always `version_blocked` / `last_poll_age_s=null`** — and believing so
       costs the session just the same (measured 2026-08-17 in LFPowerGrid, with this warning already written above and
       overlooked). With stale key the peer can read **`version_state: ok` with
       `last_poll_age_s` of 1.485 s**: it is data from LAST good poll, which may belong to another
       already dead run. A dead bridge reads like healthy this way. The telltale signature is in
       game script log: `[MCP-POC] poll error=5` (server) / `[MCP-CLIENT] client poll error=5`
       (client). That **5 is `EREST_ERROR_CLIENTERROR`** (`scripts\3_game\http\restapi.c:16-17`), meaning
       daemon returned 401 — 401 DOES NOT appear anywhere on game side.
       Two-command gate before blaming anything:
       - Compare key of **each** `dayz_mcp.json` the run will use against keyfile. These are two
         paths and `$profile:` wins over `$mission:` (`MCPBridge.c:145-149`, `MCPClientBridge.c:234-237`);
         if profiles key is missing, bridge falls back to mission key, which is usually the stale one.
         Same length (43) is NOT proof: compare the bytes.
       - `Invoke-WebRequest "http://127.0.0.1:8765/poll?key=<keyfile content>"` → 200
         `{"commands":[]}` proves daemon and live key are fine, isolating failure to run JSON.
       **And fixing it DOES NOT require server restart**: `ReloadKeyAfterFailure` (`MCPBridge.c:373-398`)
       rereads key when backoff hits ceiling. Fix JSON, wait ~20 s,
       `[MCP-POC] poll key reloaded` appears and peer returns to `last_poll_age_s` 0.2. That saves the boot.
    
       ⚠ **Player spawn needle cannot presuppose gender.** The example
       `Create entity type 'SurvivorM_` —suggested by `wait_for` description itself— **fails in
       silence** with a female character: 300 s timeout with player already in world and
       `Create entity type 'SurvivorF_Helga'` written to RPT. Use `Create entity type 'Survivor`.
    
    ## BRIDGE GOTCHAS THAT COST ONE RUN EACH (added 2026-08-18)
    
    Verified in-game on 2026-08-18 during ATM cell test battery. All six cost at least
    one run each, and **five of six produce a verdict accusing the mod without the mod
    having any issue** (6 runs, 0 actual mod failures). Check them BEFORE writing first probe.
    
    1. **`dayz_test_run` DOES NOT load `@DayZ_MCP` by default, and returns `succeeded` anyway.** Both
       processes launch alive, the game works, and the bridge stays silent. The symptom you receive
       (`server_poll_stale` / `client_not_polling` / `ready.reason=no_run`) points to bridge or
       key, not to mod set, so time is lost in the wrong place.
       **Gate**: pass `extra_mods=["@DayZ_MCP"]` and confirm in server log that define
       `DayZ_MCP` appears in all four modules, or look for `[MCP-POC]` lines.
    
    2. **`logs_since` does not accept its own `marker`.** It RETURNS it as dict {path: [offsets]} and its
       parameter requires string: Pydantic ValidationError. Incremental draining is impossible.
       **Workaround**: read entire log at end of sequence and assign responses in order,
       verifying alignment with some field from event itself (a type, an id). If two probes
       share that field, mark `ambiguous_alignment` instead of guessing.
    
    3. **`wait_for(log_matches)` does not work to wait for YOUR response.** With default
       `lookback_lines=200`, a line from previous probe satisfies pattern instantly. And with
       `lookback_lines=0` it has been seen timing out with line already present in client log,
       returning a line from another flow in `observed`. Use it as opportunistic wait; verdict
       comes from polling `logs_since`.
    
    4. **Player inventory is NOT reset between runs.** Second run finds what
       first left behind, nothing fits anymore and dotation fails silently (`create_failed`, or endow of 0
       units). To chain: `dayz_test_stop`, delete
       `<mission>\storage_1\players.db` with backup, and relaunch (~3 min).
       **WARNING**: `clean=true` DOES NOT do this — forces `Build=true` and passes `-clear` to AddonBuilder, meaning
       **rebuilds the PBO** and breaks binary identity, which is precisely what an A/B test cannot
       afford. Balance/state that mod saves in server profile SURVIVES deletion.
    
    5. **`inventory_give` returns `create_failed` whether classname does not exist or does not fit.**
       They are indistinguishable. Before blaming inventory, verify classname exists: grep in mission
       `types.xml` and test with a control vanilla item (`Apple` works). And do not
       presuppose mod config classnames exist: they can point to a mod not
       loaded, in which case exact classname count gives 0 forever and entire feature looks
       broken without being broken.
    
    6. **Do not believe a verdict without looking at client log.** Many mod events are written by
       CLIENT, not server. In test battery originating this section, automatic verdict said
       FAIL or INCONCLUSIVE six times in a row while client log showed operations
       executing properly. Dangerous failure mode of a cell is not "does not measure": it is
       **"measures poorly and accuses the mod"**, and that propagates to project documents. If a verdict
       says FAIL, open client log before recording it.
    
    - **`world_spawn` with `ok=1` DOES NOT prove object stays where you asked** (added 2026-08-21,
      DayZ-MCP council). `IsSpawnReady` (`MCPBridge.c:2729-2753`) takes ACTUAL position of object
      itself, searches objects at that position, and considers itself ready if it finds itself. An object
      is always where it is: gate is tautological and satisfied for any live object, even if physics
      is already ejecting it. Does not compare against REQUESTED position, does not measure drift, and does not require
      inter-tick stability. Real case: spawn at urban point with `ok=1` and vehicle ending up at
      **Y = -40 km**. Distinct from inverted coords failure above, which times out: this gives
      false PASS. **Rule: after any `world_spawn` that matters, confirm with `object_inspect` or
      `entities_query` that distance to requested position is as expected, and repeat reading a few
      seconds later to rule out drift.** A playbook verdict looking only at `ok` is invalid.
    
    ## THE LOOP
    
    1. **Launch** via `dayz-test.ps1 … -ExtraMods "@DayZ_MCP"` (wait until client and server
       are in; BUG-009: client autoconnect is flaky — higher `-ServerWait` / retry).
    2. **Gate** `bridge_status` (PREREQUISITES.3).
    3. **Scene conditions** (comparable captures): `world_time_set` at noon
       (all 5 args `year/month/day/hour=12/minute=0` are mandatory) and `world_weather_set(overcast=1.0)`. Overcast sky = diffuse light: eliminates
       specular glint from direct sun that burns weapons/materials to white and hides detail
       (A6_SR2M finding 2026-06-17). DO NOT use `time_multiplier=0` before pending animations
       (freezes sim).
    4. **Playbook** depending on mod type (below).
    5. **Report** with evidence.
    
    ## PLAYBOOKS (pass/fail criteria by type)
    
    All start from spawn. `world_spawn(type=<classname>, pos=[x,y,z])` → PASS if `ok` and without
    `unknown_type`/`spawn_failed`; save actual `pos` for subsequent steps.
    
    ### Static object / container / building
    - **Load**: spawn ok (above). FAIL → classname does not resolve (mod not mounted: absolute
      `!Workshop` paths, see dayz-test-ingame; or `CfgPatches` does not register).
    - **Visible + textured + winding**: orbit camera (≥4 poses — front/side/back/overhead) with
      `camera_set` + `capture_screenshot`; inspect each PNG. PASS = object visible (not invisible), without
      missing textures (no solid magenta/white/black), plausible proportions, without inverted faces
      or holes (winding). Hole/missing-face from one angle and solid from opposite = inverted
      winding. Before failing a model on textures, look at the vanilla terrain and sky in the same frame: if they are flat too, the client did not load its textures and the frame says nothing about the model (`dayz-test-ingame` `references/session-findings.md`, "H2R import (2026-10)").
    - **Collision**: `scene_raycast(from_pos, to)` (default `method="rvproxy"`: LOD intersection in the
      `intersect` mode) aimed at the object in each of `geom`, `view` and `fire`: the battery below for a
      small object or an item, multi-point for a building (walls, corners, floor). PASS = rays that
      should hit yield `hit=true` with `object_type`/`object_class` of object. No hit where it should
      hit = ViewGeo/FireGeo missing or improperly resolved (LODs). *(Changed 2026-10-03: this bullet
      asked for rays "from ≥2 angles", which do not tell the causes below apart.)*
    - **Ray battery and its controls** (added 2026-10-03; the battery of `dayz-p3d-audit` "Absolute
      winding check" rule 6, fired on DayZDiag 1.29.163709 on 2026-10-02, dayz-mcp run 606a5dbb)
      [EXACT][CLAIM-MCPV-COLLISION-BATTERY]: nine rays per mode.
      - One vertical ray down the object's axis. On a solid box whose collision spans its own axis,
        like the measured kit box, a LOD recentred by a missing `autocenter=0` (`dayz-p3d-audit`
        killer #3) still sits on that ray, so a miss there is not the recentring. On an object with gaps
        or several separate parts the shifted collision can leave the axis: check that the ray crosses
        the collider both where it is modelled and where the recentring would put it.
      - Four horizontal rays through the middle, one from each side, and two more heights on one side.
      - Two rays from inside the object outward: a sound object answers `entry 0, exit 1` at distance 0.
    
      Fire the same battery, in the same run, at two controls: an object from the same PBO and load
      path, which separates the model from the build and the loading, and a vanilla object of the same
      physics layer (`physLayer`; `WoodenCrate` sets none and takes `item_small` from `Inventory_Base`,
      `DZ/data/config.cpp:3152`; for a static, the `Land_Container_1Aoh` control under WHAT IT DOES NOT
      COVER). In that run the LFPowerGrid kit box took 0 of 27, while the same PBO's logic-gate kit and
      `WoodenCrate` took 21 of 21 each (the battery without the two extra heights). The battery locates
      a miss; it does not name the cause. When the suspect is the winding, only a pair that changes the
      winding alone decides: the kit's paired run in rule 6 did; the Rule 12 pair, which also turned the
      Visual LOD and the normals, supports the cause without deciding it.
    - **Picking an item up proves nothing about its collision** (added 2026-10-03; vanilla 1.29 and
      bridge source read, the pickup seen in the same run) [EXACT][CLAIM-MCPV-PICKUP-NO-RAY]. Vanilla
      targeting casts `RaycastRVProxy` from the camera, 5 m, with the default `ObjIntersectView`
      (`4_world/classes/useractionscomponent/actiontargets.c:241-255`, `3_game/global/dayzphysics.c:88`),
      and at a camera pitch of −45° or lower it also takes the objects of a 30°, 3 m cone and scores them
      by their distance to that ray, with no hit on them needed (`actiontargets.c:324-325`, `:531-532`,
      `:843-848`). The take action's target condition then checks only the distance to the object's
      position: `ActionTakeItemToHands` uses `CCTObject`
      (`4_world/classes/useractionscomponent/actions/interact/actiontakeitemtohands.c:13`,
      `4_world/classes/useractionscomponent/targetconditionscomponents/cctobject.c:10-24`), and its other
      conditions (takeable, not being placed or deleted, attachment state, room in the hands, and since 1.30 a
      code lock the player cannot detach; `actiontakeitemtohands.c:31-46`)
      do not look at collision either. `action_use`
      builds its world target from the nearest object of the class, with `componentIndex -1` and the
      object's position as the cursor hit, and casts no ray (`MCPClientBridge.c:3769`, `:3783`,
      `:3861`). In that run `action_use(ActionTakeItemToHands)` put the kit box in the player's hands
      while all 27 rays of its battery missed it. Read collision from `scene_raycast` against a
      same-layer control. `intersect="view"` is the cursor's mode, but the bridge casts a 0.05 m sphere
      when the radius is 0 (`MCPBridge.c:2496`, `:2528-2531`), where the vanilla ray has none. The cone
      path is read in the source, not measured: no MCP verb sets the camera pitch.
    - **Physics and player collision** (added 2026-10-02, measured on DayZDiag 1.29.163709)
      [EXACT][CLAIM-MCPV-COLLISION-PROBES]: `scene_raycast(method="bullet", radius=0)` casts
      `DayZPhysics.RayCastBullet` in the server's physics world, restricted to the layers BUILDING,
      DOOR, VEHICLE, ROADWAY, TERRAIN, ITEM_SMALL, ITEM_LARGE and FENCE (`MCPBridge.c:2983-3004`); the
      default `rvproxy` intersects the LODs instead. Count a hit only when `object_type` is the target
      and the position is where its face should be: a vertical ray through a box without collision
      returns `hit=1` on the terrain. A miss alone does not prove the object has no physics shape (its
      layer may be outside the mask), and a hit does not mean the player collides (the `WoodenCrate`
      below).
      For player collision the run teleported the player 4 m from the object's centre and called
      `player_move(to=<4 m past the centre, on the far side>, speed="walk", hold_s=10)`, then read the
      end position with `query_player_state` (server). Blocked means `arrived:false` AND the player
      stopped just before the face, after the full hold (about 0.36 m before it on that run's 2 m
      boxes); `released_by:"hold"` only says the hold expired, and `arrived:false` anywhere else is
      INCONCLUSIVE. Free means `arrived:true` (7.5 m in about 5 s); walk the same distance and bearing on
      open ground as the free reference. Every walk of that run went north nearly straight ahead
      (`applied_angle_deg` 0, and 0.04 on one walk), so it did not exercise a steering angle or its
      sign.
      A walk-through alone does not prove missing collision geometry: a vanilla `WoodenCrate`
      (`item_small`, low) took every ray and did not stop the player, while a `HescoBox` (`item_large`)
      stopped it; that run did not separate the crate's layer from its height.
    - **Axis-aligned test fixtures: try `rotation=64`, then check the pose** (added 2026-10-02, same
      run): `rotation=0` leaves the bridge's `RF_DEFAULT` (512, the config's placement), which yawed an
      `Inventory_Base` probe about 10 degrees (a side-face reading moved 0.22 m across 1.2 m of the face);
      `rotation=64` spawned the same box with its faces on the world axes (equal readings at both
      offsets), on flat concrete. `scripts/3_game/ce/centraleconomy.c` gives 64 two names, `RF_IGNORE`
      ("object will spawn as model was created", :57) and `RF_RANDOMROT` (:63); the result agrees with
      the first comment and does not settle how the engine reads the value. Before trusting face
      coordinates, check the pose: two parallel rays at one height on a vertical face catch a yaw
      (unequal readings) but not a tilt, so also read `scene_raycast(method="bullet")` normals on two
      faces that are not parallel, such as a side and the top (a tilt about one face's normal leaves
      that normal unchanged), and check that each lies along its axis, allowing for the ground: the
      statics below read up to 0.31 degrees off the axis, the terrain about as much, the items on it.
      Read the fixture again a few seconds later. It may change an item's configured resting side;
      slopes and settling were not measured.
      The `normal` of a default `rvproxy` reply is not a face normal (added 2026-10-02, two runs)
      [EXACT][CLAIM-MCPV-RVPROXY-NORMAL]: the bridge copies the engine's `RaycastRVResult.dir`
      (`MCPBridge.c:2958`), for a ray the "direction and size of the intersection"
      (`scripts/3_game/global/dayzphysics.c:104`), as `enforce-script-reference` ("Surface normals")
      found on house walls. In this run and in run cf2d6bb3 it lay along the ray in all 190 `rvproxy`
      hits on an object, the box yawed about 10 degrees included ((-1.963, 0, 0) and (-1.966, 0, 0)),
      and its length is the ray's path through the object: (-2.1, 0, 0) across a 2 m box is its width
      plus the 0.05 m sphere at each side. `bullet` returns the hit face's normal (`MCPBridge.c:2998`):
      a unit vector in all 40 of its hits, up to 0.31 degrees off the axis on the `HouseNoDestruct`
      statics and on the axis on the items. *(Corrected 2026-10-02: this entry read the pose from the
      returned `normal` lying along the axis, citing (-2.1, 0, 0); with the default method it always
      does.)*
      An item can come out with its sides swapped, and none of these checks shows it (measured
      2026-10-02 on DayZDiag 1.29.163709, dayz-mcp run cf2d6bb3) [EXACT][CLAIM-MCPV-ITEM-YAW]: one MLOD
      held two 2 m boxes, A (x -3..-1) in `Component01` and B (x 1..3) in `Component02`, and a twin had
      B in no component; each model was spawned, binarized and as MLOD, with `flags=8389668` and
      `rotation=64` as `HouseNoDestruct` and as `Inventory_Base` (`item_large`). On the four statics the
      west box was A, as modelled: it answered as component 0 (`Component01`; `Component02` reads 1),
      and on the twins it was the only box that took rays. On the four items the boxes had swapped
      sides, as a turn of 180 degrees about Y leaves them: the west box answered as component 1, and on
      the twins every hit was component 0 on the east box while the west box took no ray. The boxes are
      symmetric in z, so these rays cannot tell that half-turn from a mirror in x. Parallel rays read
      equal on the items too, and the normals pointed the same way as on the statics, since the swap
      keeps every face on the axes; a fixture symmetric about its origin, like the single box above,
      cannot show it, and `object_inspect` returns memory points in model space (`GetMemoryPointPos`,
      `MCPBridge.c:2240`), not the pose. So give the fixture sides a ray can tell apart and check which
      answers where: one component per side, read from the `component` of `rvproxy` hits (`geom`,
      `view` or `fire`; the bridge leaves it 0 on `bullet` hits, `MCPBridge.c:2983-3004`), or a
      collider on one side only. Put the parts off-centre in z as well to tell a half-turn from a
      mirror, and probe along z too: a quarter-turn moves parts that lie along x onto the z axis.
      `telemetry_read(mode="object_at")` returns the object's `GetOrientation()` (`MCPBridge.c:3137`);
      that run did not read it. Not measured: whether the swap is fixed or random (all four items
      swapped; 64 is also `RF_RANDOMROT`), other `rotation` and `flags` values, base classes and layers,
      and the cause.
    - **Standing on top: move the player before reading its height** (added 2026-10-02, measured on
      DayZDiag 1.29.163709 in a later run, on 2 m boxes) [EXACT][CLAIM-MCPV-STAND-PROBE]: a second
      reading of the object's physics body next to the walk-into probe above, on its top instead of a
      side face. An idle player is not a probe. After
      `player_teleport(pos=[x, <top + 0.07>, z], skip_clearance_check=true)` the player kept the
      teleport height (y 340.6000) and did not fall, on a box top and above open ground alike: the
      server read it twice over 3-4 s (`query_player_state`), and above open ground the client's
      physics position (the `start_pos` that `player_move` reports) still read it 15 s after the
      teleport (the worn-items section below saw the same after a teleport to y=160). Every
      `query_player_state` of these probes read godmode on, the DayZ_MCP default; the run did not
      separate the bridge, godmode and the engine as the cause. A short move applies the fall: the run
      teleported the player above the centre of each top, called
      `player_move(angle_deg=0, speed="walk", hold_s=0.5)`, then `query_player_state`. Above open
      ground the player dropped to the ground (y 340.6000 to 338.459); on the boxes, three
      `Inventory_Base` items at least 4 m from their neighbours (two outward-wound, MLOD and binarized,
      and one inward-wound), the server's y matched the top to within 0.0001 m (spawn y + 2.000 m,
      where `scene_raycast(method="bullet")` hit it) and its x, z lay 0.70-0.75 m from the centre,
      inside the 2 m top. Read the server's position after the move: with x, z still inside the top's
      footprint, y at the top's height there means the player stands on it and y at the ground means
      it fell through; an endpoint off the footprint, or any other height, is INCONCLUSIVE. Start above
      the centre of an isolated top (no other support at that height within the walk's reach, or the
      player can end on it), and run the same teleport and move above open ground as the falling
      reference. Keep the move short: 0.5 s took the player 0.70-0.75 m by the server's position read
      after the move, with the edge 1 m away; a top whose nearest edge is closer than that can be
      walked off in 0.5 s, and the endpoint check then reads INCONCLUSIVE.
    - **Placement**: `telemetry_read(mode="object_at", type=<classname>, pos=<spawn_pos>, radius=2)`
      → `found=true`, `pos` ~ spawn, reasonable `orientation`. PASS = not buried or floating
      (cross-reference `pos.y` with visuals).
    
    ### Item / arma
    - Load + visible/textured/winding as above, with **emphasis on proportions vs real-world
      reference** and on post-import geometry (orientation, winding) — where generated/imported
      meshes tend to fail.
    - `telemetry_read object_at` → `attachment_count`, `health01`. Telemetry PASS = found + healthy
      stats.
    - Collision: as for a static object, the ray battery with its two controls. Picking the item up, by
      hand or with `action_use`, does not test it (static-object playbook, "Picking an item up proves
      nothing about its collision").
    
    ### Vehicle (placement/structure only)
    - Load + visible + collision + telemetry. `vehicle_enter(pos)` → `seated=true` confirms
      seat. `telemetry_read` → `engine_on_server`, `wheel_count`, `fuel_fraction`.
    - `vehicle_enter` SEATS player (placement/seat). To DRIVE: drivability ladder
      (§DRIVABILITY + `references/acceptance-ladder.md`) covers autonomous driving via owner-side verbs
      (`vehicle_get_in_client`/`engine_set`/`vehicle_control`/`vehicle_telemetry`).
    
    ## CAPTURAR ARMA ALZADA / ADS (raise client-side) [VERIFIED-SR2M gate iter36→37]
    
    To validate RAISED/aimed weapon pose (e.g. support hand grip) there is no player input
    tool. Weapon raise is forced IN THE MOD, **client-side** — captured character is client's LOCAL
    player, so server `init.c` override DOES NOT alter the pose client renders
    (exact symptom: server log states `raised=1` but capture shows weapon LOWERED).
    
    Drop-in: a `modded class MissionGameplay` in a gate mod (declares a `missionScriptModule` in its
    `class defs`, `files[]={"Mod/Scripts/5_Mission"}`; build `-PackOnly` so `.c` survives packing):
    
    ```c
    modded class MissionGameplay
    {
        override void OnUpdate(float t)
        {
            super.OnUpdate(t);
            PlayerBase p = PlayerBase.Cast(GetGame().GetPlayer()); if (!p) return;
            HumanInputController h = p.GetInputController(); if (!h) return;
            h.OverrideRaise(HumanInputControllerOverrideType.ENABLED, true);  // ENABLED persiste; ONE_FRAME parpadea -> idle
        }
    };
    ```
    
    Key takeaways:
    - 3rd-person aim pose depends SOLELY on `IsRaised()` (`dayzplayerimplement.c:1742`, AimingModel) →
      sustained raise is enough. DO NOT call `SetIronsights()`: forces ironsight camera which fights MCP
      free-cam, and server-side left weapon untextured.
    - `WeaponADS()` (`human.c:86`) is INPUT flag without script override (`human.c:253-274`) → always 0
      even if ADS works. Success signal = `IsRaised()` / client log, NOT `WeaponADS()`.
    - Keep `OverrideRaise(ENABLED)` server-side (init.c) as well so server agrees.
    - Judge grip by hand at NATIVE resolution (crop orbit frame), never rescaled
      contact-sheet. Grip mechanism + geometric parity: skill `dayz-animation-pipeline`
      (`references/weapon-in-hands.md`).
    
    ## TOOL → WHAT IT VERIFIES
    
    | Tool | Verifies | Failure signal |
    |---|---|---|
    | `world_spawn` | classname loads | `unknown_type` / `spawn_failed` → mod not mounted |
    | `camera_set` + `capture_screenshot` | render: visible, textures, winding, proportions | invisible / magenta / holes |
    | `scene_raycast` (default `rvproxy`) | LOD collision (Geometry/ViewGeo/FireGeo, by `intersect`) | no hit where it should hit |
    | `scene_raycast(method="bullet")` | a physics shape on the masked layers (static-object playbook) | no hit on the target where it should hit; a miss alone is not proof |
    | `player_move` walk + `query_player_state` | the player stopped by the object (static-object playbook) | `arrived:true` through it; a walk-through alone is not proof |
    | `telemetry_read` (object_at) | placement, orientation, attachments, health | `found=false` / buried pos |
    | `bridge_status` | peer liveness (gate) | `last_poll_age_s=null` → bridge down |
    | `world_time_set` / `world_weather_set` | reproducible scene for captures | — |
    
    ## WHAT IT DOES NOT COVER (ALWAYS declare in report)
    
    - **Player and UI actions**: open/close doors, interactive inventory, shooting, reloading,
      menus. There is no generic player input tool. (Driving IS covered — ladder
      §DRIVABILITY / `references/acceptance-ladder.md` with owner-side verbs.) For a building, geometry/collision YES;
      **doors NO** → manual test.
    - **`exec_enforce`** does not execute on the headless diag server (GATE4B-LIM, engine limitation like
      MakeScreenshot) — do not rely on it to "execute arbitrary verification logic".
    - **`telemetry_read`** is exposed as-is (BUG-010/011/012, hardening pending): does not certify
      large JSONL fixtures or extreme ranges.
    - **CONTINUOUS actions (with progress bar): `action_use` STARTS them but does NOT COMPLETE them**
      (measured 2026-09-07, LFPowerGrid, ledger entry `fb-20260907-184749-3fc1`). Returns `ok=1, started=1` and the
      server effect **never arrives**: `OnFinishProgressServer` does not fire and the target remains in
      the world (`entities_query` at 0.003 m after two attempts with 60 s and 45 s waits). `key_press`
      is **not** the way out: it documents itself "not OS input, key-up, hold", and a continuous action
      needs SUSTAINED input. This immediately kills **dismantling, deploying/deploy, and crafting**, which
      is precisely how a mod moves money and persistent objects.
      - **What CAN be affirmed, and it is not little**: the CONDITION is evaluated for real, so
        `started=1` means "valid candidate" and serves as a measure that the mod **offers** the action
        on that target in that state. Always verify it with a negative control that must come out
        red (an excluded target returns `condition_failed`), or `started=1` proves nothing.
      - **Corollary that bites separately**: since deploying from a kit is a continuous action, **there is no
        way via MCP to create a truly persistent object** — `world_spawn` uses default flags
        and does not survive restart. Add that `dayz_test_stop` does not shut down gracefully (the
        next startup prints `... was not closed. Always shut down the server gracefully`) and
        **no test of `OnStoreSave`/`OnStoreLoad` between restarts is conclusive via MCP today**.
        If the result comes out "did not persist", that is the harness, NOT the mod: do not report it as a bug.
    
    - **`class Doors` (`Building`) doors do NOT open by MCP without `door_index`** (measured 2026-09-07, LFSecure I-0/I-4, PBO L4):
      `action_use(ActionOpenDoors, classname=<door>)` returns `condition_failed` even with the player 1.4 m away,
      because the bridge builds the `ActionTarget` with `componentIndex=-1` and `Building.GetDoorIndex(-1)` (native,
      `3_game/entities/building.c:28`, "index of the door based on the view geometry component index") resolves no
      door. `object_anim(source=<door source>, phase=1.0)` answers `phase=1`, but the engine's door controller returns
      it to its "wanted" phase (re-read `phase=0`) and `IsDoorOpen(index)` stays false, so every action that needs an
      open door also returns `condition_failed`. Without `door_index`, opening/closing, sound and sync were a MANUAL
      test (the user's F) and MCP could only verify "starts closed" (`object_anim` reads `phase=0`); see the update below.
    - Update (measured 2026-10-01, DayZDiag 1.29.163709, test building whose door component is a button on a moving piece) [EXACT]: `action_use` with `ActionOpenDoors`/`ActionCloseDoors` and `door_index` DOES open and close the door even there. `object_anim` (`SetAnimationPhaseNow`) on the door's source still cannot hold a static pose: the door settles at `ajar` with phase 0.07 instead of the requested phase — doors cannot be posed statically. For the verdict, use `object_doors` and rays.
    - **`setup_failed` is a FALSE NEGATIVE for local instantaneous actions** (`IsLocal() && IsInstant()`:
      `ActionTogglePlaceObject`, `ActionDropItemSimple`; measured 2026-09-07): the bridge checks
      `GetRunningAction()==null` right after `PerformActionStart`, and an instantaneous action has already finished.
      The hologram appeared and the object fell to the ground in both cases. Rule: with `setup_failed` on an instantaneous
      action, verify the EFFECT (capture, `entities_query` of dropped object) before marking the action as failed.
    - **`scene_raycast`: `entry=0` is TERRAIN and `normal` is NOT a unit normal** (measured 2026-09-07 with
      `intersect=fire` and `geom`): a vertical ray against the ground returns `hit=1`, `object_type=""`,
      `surface_type=cp_grass|cp_concrete2`, `entry=0`, `exit=0`; against an object it returns `entry=1`. The
      `normal` field is `RaycastRVResult.dir` as-is, which in line-object collision is "direction AND SIZE of the
      intersection" (`3_game/global/dayzphysics.c:104`): measured magnitudes 0.16-0.42. Its direction is the
      ray's own ("Axis-aligned test fixtures" above), so it says nothing about the face: never read it as a normal
      nor use it as a threshold (`dot >= 0.9` is never reached); a face normal comes from `method="bullet"`.
      *(Corrected 2026-10-02: this line said to use it only as direction (sign/axis).)* A mod that filters
      `!hit.entry` discards natural ground (hologram that never snaps to ground: LFSecure I-1).
      *(Qualified 2026-10-03: a ray that starts inside an object also reads `entry=0`: the inside rays of
      run 606a5dbb read `entry 0, exit 1` at distance 0 on the controls. Tell terrain by its empty
      `object_type`, not by `entry=0` alone; `entry=1` holds for hits from outside.)*
    - **Collision probe with vanilla CONTROL before blaming the mesh** (measured 2026-09-07, LFSecure L3 -> L4):
      if `scene_raycast` does not hit a mod static, repeat the SAME ray (view, fire, and geom; from outside AND
      from inside) against a vanilla static spawned next to it (`world_spawn(type="Land_Container_1Aoh")`: flat
      walls, `House`, `IsBuilding()` true, also useful as a wall for holograms). Control HIT + mod MISS in all
      modes and from both sides = reversed collision convex components (inverted winding in Geometry/View/Fire:
      ODOL preserves them, engine does not see them); control HIT + mod HIT only from inside = reversed faces only in
      visuals. With the source winding restored (L4) the same ray gave the front face at +0.079 m and a wall
      of 0.42 m. The correction rule lives in `dayz-p3d-audit` (0% agreement = discrepancy, not direction).
      *(Qualified 2026-10-03: the two readings above name the likely cause, not a measured one; only a pair
      that changes the winding alone decides it, as "Ray battery and its controls" in the static-object
      playbook says.)*
    
    ## REPORTING
    
    A report with: criteria table (criterion · PASS/FAIL/INFO · evidence), PNGs and telemetry/raycast
    JSONs as evidence, global verdict, and a **"to manual test"** section with what is
    not covered (doors, shooting, etc.). Context cost: each capture weighs ~25k tokens (~240-320
    px) — **batch** orbit-pose captures and do NOT re-read a PNG except to verify something
    concrete (images inflate context quickly). Hard budget ~25k tokens/image: do not request
    higher resolution.
    
    ## TROUBLESHOOTING
    
    | Symptom | Cause | Fix |
    |---|---|---|
    | `claude mcp list` → `× Failed to connect` | `claude mcp list` is NOT reliable: gives false `Failed` with the server operational. E4 contention on port 8765 (`ExclusiveThreadingHTTPServer` lock, fail-closed) was the PRE-broker failure mode | verify FIRST with ToolSearch (`mcp__dayz-mcp__*` tools available? → all OK, ignore `Failed`). Broker registration `--client` (since 2026-06-24) overcomes E4 contention: N sessions share the server without fighting for 8765, and orphan-guard releases orphans alone. If tools are truly missing: register in broker mode (`--client`) and open NEW session (tools load at startup) |
    | tools do not appear in session | server was registered AFTER opening session | open a new session (MCPs load at startup) |
    | `bridge_status.server_peer.last_poll_age_s = null` | server bridge does not poll | check `dayz_mcp.json` in server_profiles + key; confirm `@DayZ_MCP` mounted (absolute paths `!Workshop`) |
    | `client_peer … null` (server ok) | client does not connect or `client_profiles\dayz_mcp.json` missing | BUG-009 (flaky autoconnection): larger `-ServerWait` / retry; seed client config |
    | `version_state = legacy_blocked` | `--require-version` ON against a bridge not sending `ver=` | deploy 4B PBO (sends `ver=4~…`), or register server without `--require-version` for that run |
    | byte-identical captures between poses | grab caught a stale desktop frame (not render) | [EXACT] `PrintWindow(hwnd, hdc, PW_RENDERFULLCONTENT=2)` on the client's main window DOES capture the D3D game area — full scene in >20 captures even with another window covering it and without taking focus, as long as the Windows session is unlocked and the display is on (measured in game, DayZDiag 1.29, 2026-09-28). A black game area means the display is off or the session is locked, not that the route cannot read D3D. `CopyFromScreen` only works with the window in front, and a covered DayZDiag also drops to ~20 FPS; validate on a crop of the game area, not whole-frame variance (corrects the LL-247 entry of 2026-08-12) |
    | tool timeout and then "zombie" commands on reconnect | BUG-024: timeout leaves command queued; bridge executes it on return | after a timeout, reconcile with `bridge_status` before continuing |
    
    ## REFERENCES
    
    - `dayz-test-ingame` — build/deploy/launch (this skill composes it with `-ExtraMods "@DayZ_MCP"`).
    - `DayZ_MCP_dev\tools\README-mcp.md` — startup order + bridge troubleshooting.
    - `DayZ_MCP_dev\HANDOFF.md` (LIVE-STATE) — server invariants, 11 tools, GATE4B-LIM, backlog.
    - `_shared\dayz-conventions.md` — L2 (LODs, ViewGeo/FireGeo, DayZ response format).
    - Precedent of camera+orbit capture: A6's `gate-mcp.ps1` (window-grab by orbit,
      dayz-test-ingame finding 2026-06-17) — alternative batch sweep to agent driving tools.
    
    
    ## VEHICLE: repeatable smoke recipe (added 2026-06-24)
    
    Visual smoke of a CarScript vehicle driven by MCP, verified end-to-end on MercedesAMGLF
    2026-06-24. Repeatable without re-deriving:
    
    1. **Mission = stock `dayzOffline.chernarusplus`** (from DayZServer install), NOT a Phase 0
       mount-probe `void main()`: mount-probe spawns no player → client does not render the world and
       capture comes out black. Stock spawns player (`CreateCharacter`→`CreatePlayer`) → free-cam with rendered
       world. Pass it with `-Mission "<...>\dayzOffline.chernarusplus"`.
    2. **Bridge seed in profiles generated by `dayz-test.ps1`**: `dayz_mcp.json`
       `{"url":"http://127.0.0.1:8765/","key":"<key>","pollHz":5}` (ASCII) in `<Mod>_dev\_server\profiles\`
       and `..\_client\profiles\`. The bridge reads it from `$profile:` (server `MCPBridge.c:125`, client
       `MCPClientBridge.c:211`); key = `DayZ_MCP_dev\tools\.dayz_mcp.key`. Seed BEFORE launch (the
       bridge reads config in its init, only once). Do not use `install-mcp.ps1 -Register` (re-registers
       broker mode `--client`).
    3. **Launch**: `dayz-test.ps1 -Mod <Mod> -Mode all -Build -PackOnly -ExtraMods "@DayZ_MCP" -Mission
       "<...>\dayzOffline.chernarusplus" -ServerWait 240`. `-PackOnly` mandatory in mods with `.c`
       (binarize drops them → NO_IGNITER). Call the `.ps1` via absolute path (P:\ is subst).
    4. **Readiness**: stock runs CE (`InitOffline`) ~1-3 min; during CE `bridge_status` comes out
       STALE (`last_poll_age_s` grows even though `version_state=ok`) — do NOT spawn there. Wait for `connected to
       server` in server's `script*.log` and for `bridge_status` to return fresh (<1 s). Poll
       log host-direct with PowerShell, NOT bash Monitor (inherits bindfs cache, LL-142).
    5. **Smoke** (grouped, R5): `world_time_set(year,month,day,hour=12,minute=0)` (all 5 mandatory) + `world_weather_set overcast=1.0` → `world_spawn
       <Class> pos≈[player+~10]` → wait 30 s (survives without native crash = LL-099 ruled out) →
       `camera_set` (cam_mode **"lookat"**, `cam_pos`+`look_at`) + `capture_screenshot` + `scene_raycast` +
       `telemetry_read object_at`. Healthy telemetry = `found=1`, `health01=1`, `velocity 0`.
    6. **Flaky capture**: grab sometimes catches loading screen or client's "Continue" menu overlay
       instead of render. If it happens: wait for settle (~30-40 s in background — foreground sleep is
       blocked in this environment) and recapture; use several angles. Top-down that clearly reveals proxy
       (mis)alignment: `cam_pos=[carX+3, 16, carZ+1]` `look_at=[carX, ground+0.1, carZ]`. ~25k
       tokens/image — batch captures, do not re-read a PNG except to verify something concrete. A frame flat everywhere, vanilla terrain and sky included, is not a flaky grab of the model: withhold its texture verdict, check that the client window has focus and capture again after settling, since textured runs have opened with 4-11 s of flat frames; if the scene stays flat, its visual evidence is `SETUP_FAIL` and the run is relaunched (`dayz-test-ingame` `references/session-findings.md`, "H2R import (2026-10)").
    7. **User's eye > capture** when render is ambiguous: in MercedesAMGLF grab was flaky and
       user reading was reliable diagnosis of winding and proxy alignment. If there is a human in
       the loop, cross-check with them. (Case s3 2026-06-24: I was about to sign PASS on faint renders; user's
       eye caught proxy misalignment I could not resolve → correct FAIL.)
    
    8. **SHARED SESSION.** Port 2302 and Steam client remain single resources, but
       exclusion is coordinated with the runbook's FIFO lease, not attributing processes nor evicting
       other sessions. `dayz_test_run` acquires and maintains exclusion; retain `run_id` and
       terminate that same run with `dayz_test_stop`. NEVER kill a process to unlock the box:
       if state does not reconcile, retain the process and declare degraded shutdown.
    
    9. **"Wheels = sheet/flat disk" is NOT a proxy bug.** A `world_spawn` of a CarScript without attachments leaves
       `wheel_count=0`/`attachment_count=0` → only hub/disk is visible, without tires. Expected in visual smoke; real
       wheels require attachments (physics phase), out of scope for smoke.
    
    10. **`legacy_blocked` ("poll did not include ver=") is usually INCOMPLETE INIT, not version mismatch (added
        2026-06-28).** Refines the homonymous row in TROUBLESHOOTING: with 4B PBO deployed, right after launching server
        `bridge_status` can come out `legacy_blocked`/`last_poll_age_s=null` because the bridge has not yet completed the
        handshake; transitions to `ok` with `ver=4~…` when server mission LOADS completely (~1-2 min). Do NOT redeploy nor
        re-register for that — wait and re-check. It is only a real mismatch if it stays `legacy_blocked` with mission already
        loaded (client connected, world rendered). Origin: SUB_BRZ Phase 5 2026-06-28.
    
    11. **Historical pattern superseded 2026-07-15.** `cmd start`/`.bat` avoided a background job
        losing its child, but created a process outside the registered lifecycle. For any current
        smoke, use exclusively `dayz_test_run`, retain its `run_id` and terminate only that run with
        `dayz_test_stop`. No unmanaged fallback exists to bypass the lifecycle guard.
    
    ## DRIVABILITY + ACCEPTANCE LADDER (summary — detail in reference)
    
    Phase 5 of DayZ-MCP project added and gated in-game owner-side verbs that DO **drive** the
    car (client takes ownership and handles throttle/steer): `vehicle_get_in_client(pos)` (seats +
    ownership), `engine_set("start"/"stop")`, `vehicle_control(throttle, steer, brake, handbrake,
    hold_ttl_s)` (SUSTAINED control, fail-closed), `vehicle_telemetry()`, `vehicle_release()`, and
    `query_get_in_condition(pos, component)` (server peer, diagnoses which of the 7 gates of
    `ActionGetInTransport` blocks). On top of them runs the **acceptance ladder** rip→drivable:
    ordered rungs **R1 spawns → R2 render → R3 get-in available → R4 seated → R5 drives → R6
    wheel direction**, each reading in-game ground-truth and mapping its failure to a known fix in the
    SUB_BRZ taxonomy (`dayz-vehicles/references/`). Reference orchestrator `references/drive_ladder.py`
    (drives R1→R6, outputs `verdict.json`; does NOT apply fixes nor rebuild) + fixtures `tests/test_drive_ladder.py`.
    
    **Full detail** (verbs, verified owner-side mechanism, preconditions, spawn placement,
    R2.5 restore-gameplay, anti-false-green guardrails, ladder table, and failure→fix mapping) →
    `references/acceptance-ladder.md`.
    
    
    ## (added 2026-07-14) No restore-gameplay tool: for user MANUAL test, relaunch without @DayZ_MCP
    
    `camera_set` ALWAYS suppresses player control (`SuppressGameplay()` -> `PlayerControlDisable`, see
    §R2.5) and **there is NO MCP tool that fires `RestoreGameplay()`** — only internal gate `drive_probe_client`
    does it, and it is not exposed as a verb/tool. Practical consequence: after an MCP smoke that used `camera_set`
    (free-cam or static-cam lookat), the USER cannot take player control to test the car by hand
    — their input remains suppressed and there is no verb to revert it on the fly.
    
    Rule: when workflow passes from MCP smoke (automatic) to **user manual test** (driving, judging
    feel/aesthetics), **relaunch the game WITHOUT `@DayZ_MCP`** (or at least with a client that never received
    `camera_set` in that session). A clean client has normal control. If the client was already neutered:
    reconnecting (Esc -> Disconnect -> Reconnect) recreates the player with clean camera/control; there is no tool
    shortcut. Origin: SUB_BRZ s35 — time was lost looking for a non-existent restore tool and user had
    to close the game and ask to relaunch normally.
    
    ## (added 2026-07-14) Autonomous smoke: world_spawn takes engine [x, y_up, z], and capture with sleeping display = black frame (SP-060)
    
    Dos caveats de smoke MCP autonomo verificados in-vivo (SUB_BRZ s32):
    
    1. **`world_spawn` takes vector in ENGINE order `[x, y_up, z_north]`** (`MCPBridge.c:1638` `Vector(x,y,z)`), but bridge connect-log prints player position as `<x, z_north, y_up>`. Passing the log triplet VERBATIM spawns the object at ~6 km altitude -> `IsSpawnReady` (2.0 m radius) is never satisfied -> job timeout + `found=0`, and engine auto-deletes the orphan (`NETWORK (E): Will delete object ... outside world coords`). Cost 3 timeouts in a row. Rule: convert `<x,z,y>` -> `[x,y,z]` before every `world_spawn`/`camera_set`; after a spawn timeout, grep RPT for `outside world coords` BEFORE retrying (distinguishes bad-coords from slow-spawn). Verifiable with `scene_raycast` to terrain (gives real y_up).
    2. **Capturing with the display asleep = BLACK frame** even though the client runs (on 2026-07-11 a locked session with LockApp also gave black frames; since 2026-09-14 the capture backend fails outright on a locked session instead, see point 4). Fix: bring the client window to the foreground + input wiggle (mouse / F15) before EVERY `capture_screenshot`. Misleading symptom: it looks like "the mod's render is broken" and it is the compositor.
    3. (minor) Spawn adjacent to player can fall INSIDE a building -> probe 3-4 `scene_raycast` to clear terrain before choosing pos.
    4. [EXACT] A locked Windows session is a distinct capture failure (added 2026-09-14, SUB_BRZ s93): with `LogonUI` alive, `capture_screenshot` does not return a black frame — it fails outright with `capture_backend_failed` on every attempt while the game client stays alive and probing. Before budgeting captures in an unattended run, run `Get-Process LogonUI` first: with a locked session there is no host capture at all, for the MCP capture and for any window-grab script. (measured in game, DayZ 1.30.164014 Exp)
    
    Origin: SUB_BRZ s32 MCP smoke (2026-07-11): 3 `world_spawn` timeouts with raw log pos + 2 black captures with LockApp; both resolved with the above.
    
    ## (added 2026-07-14) Telemetry numeric gates: calibrate against MEASURED PHYSICAL FLOOR, not ideal fixtures (SP-061)
    
    Invariant for any acceptance-ladder / numeric gate on in-game telemetry (car drive_ladder, spikes, future harnesses):
    
    1. **A threshold calibrated with ideal mathematical fixtures is a gate that no real physics passes.** The engine has a native noise floor (body dither between SetVelocity and reading; client network interpolator). Before setting a threshold: MEASURE the floor in a real run (metric p95 on real data), threshold = floor x margin (>=2x), and document the measured numbers next to the constant. Two

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.