agentic-loop 3.2.9 → 3.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ralph/loop.sh +10 -1
package/package.json
CHANGED
package/ralph/loop.sh
CHANGED
|
@@ -236,6 +236,8 @@ run_loop() {
|
|
|
236
236
|
echo " Saved failure context to: $RALPH_DIR/failures/$story.txt"
|
|
237
237
|
mkdir -p "$RALPH_DIR/failures"
|
|
238
238
|
cp "$RALPH_DIR/last_failure.txt" "$RALPH_DIR/failures/$story.txt" 2>/dev/null || true
|
|
239
|
+
# Clear failure context so it doesn't leak into next story
|
|
240
|
+
rm -f "$RALPH_DIR/last_failure.txt"
|
|
239
241
|
skipped_stories+=("$story")
|
|
240
242
|
# Mark as skipped (not passed, but move on)
|
|
241
243
|
jq --arg id "$story" '(.stories[] | select(.id==$id)) |= . + {skipped: true}' "$RALPH_DIR/prd.json" > "$RALPH_DIR/prd.json.tmp" && mv "$RALPH_DIR/prd.json.tmp" "$RALPH_DIR/prd.json"
|
|
@@ -262,9 +264,16 @@ run_loop() {
|
|
|
262
264
|
return 1
|
|
263
265
|
}
|
|
264
266
|
|
|
267
|
+
# Only load failure context if it's for the CURRENT story (prevents stale context leaks)
|
|
265
268
|
local failure_context=""
|
|
266
269
|
if [[ -f "$RALPH_DIR/last_failure.txt" ]]; then
|
|
267
|
-
|
|
270
|
+
# Check if failure context is for this story (first line contains story ID)
|
|
271
|
+
if grep -q "for $story" "$RALPH_DIR/last_failure.txt" 2>/dev/null; then
|
|
272
|
+
failure_context=$(cat "$RALPH_DIR/last_failure.txt")
|
|
273
|
+
else
|
|
274
|
+
# Stale context from different story - clear it
|
|
275
|
+
rm -f "$RALPH_DIR/last_failure.txt"
|
|
276
|
+
fi
|
|
268
277
|
fi
|
|
269
278
|
|
|
270
279
|
# Temporarily disable errexit to capture build_prompt errors
|