This guide helps you validate the Phase 1 workflow improvements before merging to main.
Branch: fix/workflow-reliability
Status: Ready for testing
- ✅ 5 retry attempts with exponential backoff
- ✅ Extended timeout to 300 seconds
- ✅ Better error messages
- ✅ VACUUM before each commit
- ✅ Size reduction reporting
- ✅ Expected: 20-30% smaller commits
- ✅ Cache nvd.json and cvelistV5
- ✅ Reduces re-downloads
- ✅ Expected: 80%+ cache hit rate
- ✅ Health metrics in step summary
- ✅ Database statistics
- ✅ Automatic alerts
-
Push the branch to GitHub:
git push -u origin fix/workflow-reliability
-
Trigger workflow manually:
- Go to: https://github.com/RogoLabs/GhostCVEs/actions
- Click "Ghost Hunter - Automated CVE Hunt"
- Click "Run workflow"
- Select branch:
fix/workflow-reliability - Click "Run workflow"
-
Monitor the run:
- Watch for "Optimizing database..." message
- Check retry logic (should see "Push attempt X of 5")
- Verify cache usage ("Using cached data")
- Review step summary for health metrics
-
Verify success:
- Workflow completes successfully
- Database is optimized (check logs for size reduction)
- Push succeeds (may take 1-5 attempts depending on network)
- Health metrics appear in summary
- No errors or warnings
-
Test database optimization:
python -c " import sqlite3 from pathlib import Path db_path = 'ghost_log.db' if Path(db_path).exists(): size_before = Path(db_path).stat().st_size / (1024 * 1024) conn = sqlite3.connect(db_path) conn.execute('VACUUM') conn.execute('ANALYZE') conn.close() size_after = Path(db_path).stat().st_size / (1024 * 1024) saved = ((size_before - size_after) / size_before * 100) if size_before > 0 else 0 print(f'Database: {size_before:.2f}MB -> {size_after:.2f}MB (saved {saved:.1f}%)') "
-
Test the hunt locally:
python main.py --hunt --report --no-banner
-
Check database size:
ls -lh ghost_log.db
-
Push to test branch:
git push -u origin fix/workflow-reliability
- Workflow completes without errors
- Git push succeeds (within 5 retries)
- Database optimization runs
- No data loss or corruption
- Database size reduces by 15%+ after VACUUM
- Cache hit rate > 70% on second run
- Push succeeds on first attempt (if network stable)
- Health metrics show in summary
- Workflow completes in < 15 minutes
- Cache hit rate > 80%
- Database size reduces by 25%+
- No warnings in logs
Once merged to main, monitor for:
-
First 3 Runs (18 hours):
- All pushes succeed
- No timeouts
- Database stays optimized
- Cache working properly
-
First Week:
- Success rate > 95%
- Average workflow time < 15 min
- Database growth controlled
- No critical alerts
-
Metrics to Track:
# Check recent runs gh run list --limit 10 # View specific run gh run view RUN_ID # Check database size trend git log --all --oneline | grep "Ghost Hunt" | head -20
-
Check network status:
curl -I https://github.com
-
Check database size:
ls -lh ghost_log.db # If > 20MB, may need additional optimization -
Manual recovery:
git pull origin main git push origin main
-
Check database integrity:
sqlite3 ghost_log.db "PRAGMA integrity_check" -
Backup and retry:
cp ghost_log.db ghost_log.backup.db sqlite3 ghost_log.db "VACUUM"
-
Check cache key:
- Verify
data/nvd.jsonexists - Check file hash:
sha256sum data/nvd.json
- Verify
-
Clear cache manually:
- Go to: Settings → Actions → Caches
- Delete
cve-data-*caches - Re-run workflow
If critical issues occur:
-
Revert the workflow:
git checkout main git checkout main -- .github/workflows/hunt.yml git commit -m "Revert workflow changes" git push origin main -
Or merge revert PR:
git revert HEAD git push
-
Report issues:
- Create GitHub issue with logs
- Include workflow run ID
- Attach hunt.log if available
-
Create Pull Request:
gh pr create \ --title "Phase 1: Critical Workflow Reliability Fixes" \ --body "$(cat <<'EOF' ## Summary Implements Phase 1 improvements for workflow reliability. ## Changes - Enhanced git push with retry logic - Database optimization before commits - Improved CVE data caching - Workflow health monitoring ## Testing ✅ Tested with workflow_dispatch ✅ All tests passed ✅ No errors or warnings ## Expected Impact - 95%+ push success rate - 20-30% database size reduction - 2-5 minute faster workflows ## Checklist - [x] Tested in feature branch - [x] No breaking changes - [x] Documentation updated - [ ] Ready to merge EOF )"
-
Review and merge:
- Review changes in PR
- Merge when ready
- Monitor first few runs
-
Move to Phase 2:
- After 1 week of stable runs
- Implement database maintenance
- Setup GitHub Releases archiving
If you need help:
- Review logs in GitHub Actions
- Check
hunt.logartifact - Create issue with details
- Tag:
workflow,phase-1,testing
Last Updated: 2026-03-10 Status: Ready for Testing