Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: wait for terminal Git status in stale-lock robot
time-attack44650581b75a
diff --git a/scripts/persistence/crash-robot.ts b/scripts/persistence/crash-robot.tsindex 250dda5ad8..7e62b43f8f 100644--- a/scripts/persistence/crash-robot.ts+++ b/scripts/persistence/crash-robot.ts@@ -250,7 +250,7 @@ async function processFault(config: RobotConfig, world: World, model: ReferenceMawait runSteps(world, model, config.schedule);const deadline = Date.now() + 30_000;let stuck = await gitEffects();- while (Date.now() < deadline && stuck.some(e => e.state === 'running' || !e.error_code)) { await Bun.sleep(250); stuck = await gitEffects(); }+ while (Date.now() < deadline && stuck.some(e => e.state === 'running' || !typedGitErrors.has(e.error_code ?? ''))) { await Bun.sleep(250); stuck = await gitEffects(); }for (const e of stuck) if (!e.error_code || !typedGitErrors.has(e.error_code)) {model.violate({ class: 'wedge', detail: `stale index.lock: git effect ${e.id} is ${e.state} without a typed error (${e.error_code})` });}