Rename the `rails/` directory to `tools/` for agent discoverability — agents frequently failed to locate helper scripts due to the non-intuitive directory name. Add backward-compat symlink `rails/ → tools/`. New tool suites: - Authentik: auth-token, user-list, user-create, group-list, app-list, flow-list, admin-status (8 scripts) - Coolify: team-list, project-list, service-list, service-status, deploy, env-set (7 scripts) - Woodpecker: pipeline-list, pipeline-status, pipeline-trigger (3 stubs) - GLPI: session-init, computer-list, ticket-list, ticket-create, user-list (6 scripts) - Health: stack-health.sh — stack-wide connectivity check Infrastructure: - Shared credential loader at tools/_lib/credentials.sh - install.sh creates symlink + chmod on tool scripts - All ~253 rails/ path references updated across 68+ files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
92 lines
3.1 KiB
Bash
Executable File
92 lines
3.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Monitor QA queues with graceful handling of missing directories
|
|
# Location: ~/.config/mosaic/tools/qa/qa-queue-monitor.sh
|
|
|
|
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
|
|
echo "=== QA Automation Queue Status ==="
|
|
echo "Project: $(basename "$PROJECT_ROOT")"
|
|
echo "Time: $(date '+%Y-%m-%d %H:%M:%S')"
|
|
echo
|
|
|
|
# Function to count files safely
|
|
count_files() {
|
|
local dir="$1"
|
|
if [ -d "$dir" ]; then
|
|
ls "$dir" 2>/dev/null | wc -l
|
|
else
|
|
echo "0"
|
|
fi
|
|
}
|
|
|
|
# Check Epic-specific queues
|
|
EPIC_BASE="$PROJECT_ROOT/docs/task-management/epics/active"
|
|
if [ -d "$EPIC_BASE" ]; then
|
|
for EPIC_DIR in "$EPIC_BASE"/*/; do
|
|
if [ -d "$EPIC_DIR" ]; then
|
|
EPIC_NAME=$(basename "$EPIC_DIR")
|
|
QA_DIR="$EPIC_DIR/reports/qa-automation"
|
|
|
|
if [ -d "$QA_DIR" ]; then
|
|
echo "Epic: $EPIC_NAME"
|
|
echo " Pending: $(count_files "$QA_DIR/pending")"
|
|
echo " In Progress: $(count_files "$QA_DIR/in-progress")"
|
|
echo " Done: $(count_files "$QA_DIR/done")"
|
|
echo " Escalated: $(count_files "$QA_DIR/escalated")"
|
|
|
|
# Show escalated files if any
|
|
if [ -d "$QA_DIR/escalated" ] && [ "$(ls "$QA_DIR/escalated" 2>/dev/null | wc -l)" -gt 0 ]; then
|
|
echo " ⚠️ Escalated Issues:"
|
|
for file in "$QA_DIR/escalated"/*_remediation_needed.md; do
|
|
if [ -f "$file" ]; then
|
|
echo " - $(basename "$file")"
|
|
fi
|
|
done
|
|
fi
|
|
echo
|
|
fi
|
|
fi
|
|
done
|
|
else
|
|
echo "[WARN] No Epic structure found at: $EPIC_BASE"
|
|
echo
|
|
fi
|
|
|
|
# Check general queue
|
|
GENERAL_DIR="$PROJECT_ROOT/docs/reports/qa-automation"
|
|
if [ -d "$GENERAL_DIR" ]; then
|
|
echo "General (Non-Epic):"
|
|
echo " Pending: $(count_files "$GENERAL_DIR/pending")"
|
|
echo " In Progress: $(count_files "$GENERAL_DIR/in-progress")"
|
|
echo " Done: $(count_files "$GENERAL_DIR/done")"
|
|
echo " Escalated: $(count_files "$GENERAL_DIR/escalated")"
|
|
|
|
# Show escalated files
|
|
if [ -d "$GENERAL_DIR/escalated" ] && [ "$(ls "$GENERAL_DIR/escalated" 2>/dev/null | wc -l)" -gt 0 ]; then
|
|
echo " ⚠️ Escalated Issues:"
|
|
for file in "$GENERAL_DIR/escalated"/*_remediation_needed.md; do
|
|
if [ -f "$file" ]; then
|
|
echo " - $(basename "$file")"
|
|
fi
|
|
done
|
|
fi
|
|
else
|
|
echo "[INFO] No general QA directory found (will be created on first use)"
|
|
fi
|
|
|
|
echo
|
|
echo "=== Recent Activity ==="
|
|
# Show last 5 log entries
|
|
if [ -f "$PROJECT_ROOT/logs/qa-automation.log" ]; then
|
|
tail -5 "$PROJECT_ROOT/logs/qa-automation.log"
|
|
else
|
|
echo "No activity log found"
|
|
fi
|
|
|
|
echo
|
|
echo "=== Queue Processing Tips ==="
|
|
echo "• View pending reports: ls -la $PROJECT_ROOT/docs/reports/qa-automation/pending/"
|
|
echo "• Check stale reports: find $PROJECT_ROOT -path '*/in-progress/*' -mmin +60"
|
|
echo "• Manual escalation: mv {report} {path}/escalated/"
|
|
echo "• View full log: tail -f $PROJECT_ROOT/logs/qa-automation.log"
|