From 82edc2a0a7ea53806f645a275f83e751df35d7c0 Mon Sep 17 00:00:00 2001 From: Yuriy Mayatnikov Date: Wed, 27 May 2026 14:22:03 +0300 Subject: [PATCH] v0.2.0-rc.3 fixup: relax wedged-escape trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the WEDGED_REASONS check — noProgressReason is a string that may or may not be set when the bot is stuck. Fire pillar-up purely on "no horizontal progress ≥ 60s, no hostile in 6m, placeable block in inv". Pillar-up is a constructive no-op when it's not needed (places one dirt under self) so the false-positive cost is small. Live observation: rc.3 was deployed and bot was wedged with tunnel-out repeatedly aborted on stone, but wedged-escape never fired because the runtime's noProgressReason wasn't in my whitelist. Removing the gate lets the trigger actually engage. Co-Authored-By: Claude Opus 4.7 --- runtime/reflex.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/runtime/reflex.js b/runtime/reflex.js index 50b3bae..420292f 100644 --- a/runtime/reflex.js +++ b/runtime/reflex.js @@ -370,22 +370,22 @@ function metricRecoverySkill(ctx, plannedSkillId) { return null; } -// v0.2.0-rc.3 — wedged-emergency escape. When the bot has been at the -// same coarse position for ≥ 60s AND the runtime says we're stuck -// ("wedged", "no_reachable_target"), AND there's no immediate hostile -// (defendReflex would have handled it), AND we have a placeable block -// in inventory, dispatch survive.pillar-up to climb vertically out of -// pit terrain. This breaks the tunnel-out-fail-fall-back-to-flee loop -// observed live in the rc.2 deploy. +// v0.2.0-rc.3 — wedged-emergency escape. When the bot has not made +// meaningful horizontal progress for ≥ 60s AND there's no immediate +// hostile (defendReflex would have handled it) AND a placeable block +// is in inventory, dispatch survive.pillar-up to climb vertically out +// of pit terrain. Breaks the tunnel-out-fail-fall-back-to-flee loop +// observed live in the rc.2 deploy. noProgressReason is a hint, not +// required — pillar-up only writes blocks underneath, so even if the +// real cause is something else, the worst case is +1 dirt placed. const WEDGED_MIN_MS = 60_000; -const WEDGED_REASONS = new Set(["no_reachable_target", "awaiting_action_cooldown", "planner_empty"]); function wedgedEscapeSkill(ctx) { const s = ctx.snapshot; if (!s) return null; if (s.closestHostile && (s.closestHostile.distance ?? Infinity) < 6) return null; - if (!WEDGED_REASONS.has(s.noProgressReason)) return null; const lastMove = ctx.lastSignificantMoveAt ?? 0; + if (!lastMove) return null; // need at least one tick of position tracking if (Date.now() - lastMove < WEDGED_MIN_MS) return null; // Last attempted escape was recent? give it room. if (ctx.skillBackoff?.["survive.pillar-up"] && Date.now() < ctx.skillBackoff["survive.pillar-up"]) {