Run a development environment health check or diagnose operational issues. Use for env setup verification, build/connection problems, failed loads, stale data, schema drift, or ETL errors. Trigger when the user asks 'is MySQL running', 'why won't it build', 'is my environment broken', 'why did the load fail', 'is my data stale', 'check schema drift', 'what loads ran today', 'catch up missed loads', or any variation. Usage: /check-health [full|quick|loads|freshness|schema|catchup]
First: Read fed_prospector/.env to get the DB_PASSWORD value. MySQL user is fed_app, database is fed_contracts. mysql is on PATH — no need to use a full path.
Verify all development dependencies are working. Default mode is quick.
Run these in parallel:
mysql -u fed_app -p"$DB_PASSWORD" -e "SELECT 1" fed_contractsfed_prospector/.venv/ and run python --versiondotnet --versiongit statusAll quick checks, plus:
dotnet build api/FedProspector.slnxfed_prospector/.venv/Scripts/python.exe -c "import fed_prospector"mysql -u fed_app -p"$DB_PASSWORD" -e "SELECT COUNT(*) AS table_count FROM information_schema.tables WHERE table_schema='fed_contracts'" fed_contractsfed_prospector/.env existsPresent a checklist:
[PASS] MySQL connectivity
[PASS] Python 3.14.3
[FAIL] C# build - error details...
| Problem | Fix |
|---|---|
| MySQL not running | E:/mysql/bin/mysqld.exe --basedir=E:/mysql --datadir=E:/mysql/data --console --secure-file-priv="" |
| Python packages missing | Activate venv, then pip install -r requirements.txt |
| C# build fails | dotnet restore api/FedProspector.slnx |
| .env missing | Copy from thesolution/credentials.example.yml template |
Use these when the argument is loads, freshness, schema, or catchup.
loads)python fed_prospector/main.py health load-history
Options: --source SAM_OPPORTUNITY, --days 7, --status FAILED, --limit 20
freshness)python fed_prospector/main.py health check
Shows freshness per source with alerts (OK/WARN/STALE/NEVER). Add --json for machine-readable output.
schema)python fed_prospector/main.py health check-schema
Options: --table <name> (single table), --verbose (show all checked), --fix (generate ALTER statements)
catchup)python fed_prospector/main.py job catchup --dry-run
Shows what would run. Remove --dry-run to execute. Add --include-all for unsafe/long-running jobs.
python fed_prospector/main.py job run --list # see available jobs
python fed_prospector/main.py job run <job_name> # run one
| Pattern | Fix |
|---|---|
| Rate limit exceeded | Wait 24h or use --key 2 (1000/day tier) |
| Connection timeout | Check MySQL is running (/dev-stack status) |
| Load stuck in RUNNING | Likely crashed mid-load — re-run the loader |
| Schema drift after DDL change | health check-schema --fix, apply the ALTER output |
| Stale data alerts | job catchup to recover missed loads |
| SAM.gov API quirks | See thesolution/reference/09-SAM-API-QUIRKS.md |
| Data quality issues | See thesolution/reference/08-DATA-QUALITY-ISSUES.md |