Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,76 @@ write_installation_record() {
# Write installation record
write_installation_record

# Validate kit directories specified in templates
echo ""
echo "Validating kit directories..."

Comment on lines +212 to +215
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. /home/uploads warning missing 📎 Requirement gap ⛯ Reliability

The install script changes add warnings for missing kit paths but do not check whether
/home/uploads exists and emit the required non-blocking warning text. This fails the specified
installation-time visibility requirement for missing /home/uploads.
Agent Prompt
## Issue description
The install script must warn (without failing) if `/home/uploads` is missing, and the warning text must match the compliance requirement exactly.

## Issue Context
Current PR adds kit-path validation warnings, but does not implement the required `/home/uploads` presence check and exact warning string.

## Fix Focus Areas
- bin/install.sh[212-215]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

missing_kits=()
config_dir=$(readlink -f "config")

for template_file in config/*_template.yml; do
# Skip if no files match the pattern
[ -e "$template_file" ] || continue

template_name=$(basename "$template_file")

# Extract upload_extra value using yq
upload_extra=$(yq -r '.upload_extra // "none"' "$template_file" 2>/dev/null || echo "none")

# Skip if upload_extra is 'none', empty, or null
if [[ "$upload_extra" == "none" ]] || [[ -z "$upload_extra" ]] || [[ "$upload_extra" == "null" ]]; then
continue
fi

# Check if upload_extra is an array or a string
is_array=$(yq -r '.upload_extra | type' "$template_file" 2>/dev/null || echo "null")

if [[ "$is_array" == "array" ]]; then
# It's an array, process each element
while IFS= read -r path; do
if [[ "$path" != "none" ]] && [[ -n "$path" ]]; then
if [[ ! -e "$path" ]]; then
missing_kits+=("$template_name:$path")
fi
fi
done < <(yq -r '.upload_extra[]' "$template_file" 2>/dev/null)
else
# It's a string, split by spaces
IFS=' ' read -ra paths <<< "$upload_extra"
for path in "${paths[@]}"; do
if [[ "$path" != "none" ]] && [[ -n "$path" ]]; then
if [[ ! -e "$path" ]]; then
missing_kits+=("$template_name:$path")
fi
fi
done
fi
done

# Display warning if there are missing kits
if [ ${#missing_kits[@]} -gt 0 ]; then
echo ""
echo "======================================================================"
echo "WARNING: Missing Kit Directories"
echo "======================================================================"
echo ""
echo "The following kit files/directories specified in templates do not exist:"
echo ""
for entry in "${missing_kits[@]}"; do
template=$(echo "$entry" | cut -d':' -f1)
path=$(echo "$entry" | cut -d':' -f2-)
echo " - $template: $path"
done
echo ""
echo "These kits are required for certain benchmarks to run properly."
echo "Wrappers depending on these kits may fail until they are provided."
echo ""
echo "Please ensure the required kits are placed at the specified locations"
echo "or update the template files in $config_dir to reflect the correct paths."
echo "======================================================================"
echo ""
fi

echo "Before you can run Zathras:"
echo "****Ensure ~/.local/bin is in your path"
echo "****Set up a scenario file"
Expand Down
Loading