From 36e547a896b941e246dacb26e6defc4a0a90475e Mon Sep 17 00:00:00 2001 From: Yuriy Mayatnikov Date: Tue, 26 May 2026 12:45:13 +0300 Subject: [PATCH] fix(runtime/actions): require horizontal escape movement --- runtime/actions.js | 6 +++--- runtime/skills/explore-far.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/actions.js b/runtime/actions.js index 48fa519..9e52a4d 100644 --- a/runtime/actions.js +++ b/runtime/actions.js @@ -525,12 +525,12 @@ async function escapePit(bot, maxSteps = 3) { } // Let jump physics settle before deciding whether escape-pit worked. - // A mid-jump Y delta is not freedom; require horizontal movement or a - // sustained one-block climb before reporting success. + // Vertical-only motion is not freedom from a wedged shaft; require real + // horizontal movement, otherwise fall through to the tunnel-out skill. await new Promise((r) => setTimeout(r, 500)); const moved = horizontalDistance(before, bot.entity.position); const climbed = verticalGain(before, bot.entity.position); - if (moved >= 0.75 || climbed >= 0.9) { + if (moved >= 0.75) { return { ok: true, code: "done", detail: { mode: "escape-pit-up", moved, climbed } }; } info("action", `escape-pit moved only ${moved.toFixed(2)} horizontally (dy=${climbed.toFixed(2)}) → tunnel-out`); diff --git a/runtime/skills/explore-far.js b/runtime/skills/explore-far.js index 329fd90..60d7a34 100644 --- a/runtime/skills/explore-far.js +++ b/runtime/skills/explore-far.js @@ -187,12 +187,12 @@ async function escapePit(bot, maxSteps = 3) { } // Let jump physics settle before deciding whether escape-pit worked. - // A mid-jump Y delta is not freedom; require horizontal movement or a - // sustained one-block climb before reporting success. + // Vertical-only motion is not freedom from a wedged shaft; require real + // horizontal movement, otherwise fall through to the tunnel-out skill. await new Promise((r) => setTimeout(r, 500)); const moved = horizontalDistance(before, bot.entity.position); const climbed = verticalGain(before, bot.entity.position); - if (moved >= 0.75 || climbed >= 0.9) { + if (moved >= 0.75) { return { ok: true, code: "done",