vibe-and-thrive 1.6.7 → 1.6.8
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/verify.sh +22 -5
package/package.json
CHANGED
package/ralph/verify.sh
CHANGED
|
@@ -432,22 +432,27 @@ run_fastapi_response_check() {
|
|
|
432
432
|
|
|
433
433
|
[[ ${#fastapi_dirs[@]} -eq 0 ]] && return 0
|
|
434
434
|
|
|
435
|
+
local failed=0
|
|
435
436
|
for dir in "${fastapi_dirs[@]}"; do
|
|
436
437
|
echo -n " FastAPI response models ($dir)... "
|
|
437
438
|
|
|
438
439
|
local output
|
|
440
|
+
local log_file="$RALPH_DIR/last_fastapi_response_check.log"
|
|
441
|
+
|
|
439
442
|
if output=$(python3 "$check_script" "$dir" 2>&1); then
|
|
440
443
|
print_success "passed"
|
|
444
|
+
rm -f "$log_file"
|
|
441
445
|
else
|
|
442
|
-
|
|
446
|
+
print_error "failed"
|
|
443
447
|
echo ""
|
|
444
|
-
echo "$output" | head -
|
|
445
|
-
#
|
|
446
|
-
|
|
448
|
+
echo "$output" | head -40 | sed 's/^/ /'
|
|
449
|
+
# Save for failure context so Claude can fix
|
|
450
|
+
echo "$output" > "$log_file"
|
|
451
|
+
failed=1
|
|
447
452
|
fi
|
|
448
453
|
done
|
|
449
454
|
|
|
450
|
-
return
|
|
455
|
+
return $failed
|
|
451
456
|
}
|
|
452
457
|
|
|
453
458
|
# Run all checks defined in config.json
|
|
@@ -987,5 +992,17 @@ save_failure_context() {
|
|
|
987
992
|
grep -E "^\s*(error|warning|Error|ARG|F841|B007|SIM|-->)" "$RALPH_DIR/last_precommit_failure.log" | head -50
|
|
988
993
|
echo ""
|
|
989
994
|
fi
|
|
995
|
+
|
|
996
|
+
if [[ -f "$RALPH_DIR/last_fastapi_response_check.log" ]]; then
|
|
997
|
+
echo "--- FastAPI Response Model Failure ---"
|
|
998
|
+
echo "Add Pydantic response_model to these endpoints for proper Swagger docs:"
|
|
999
|
+
echo ""
|
|
1000
|
+
cat "$RALPH_DIR/last_fastapi_response_check.log"
|
|
1001
|
+
echo ""
|
|
1002
|
+
echo "Fix by adding response_model parameter or return type annotation:"
|
|
1003
|
+
echo ' @router.get("/items", response_model=list[ItemSchema])'
|
|
1004
|
+
echo " async def get_items() -> list[ItemSchema]:"
|
|
1005
|
+
echo ""
|
|
1006
|
+
fi
|
|
990
1007
|
} > "$context_file"
|
|
991
1008
|
}
|