PHASE 1: Environment & Configuration Check Step 1.1: Environment Variables Check Verify GITHUB_REPO and GITHUB_TOKEN are set Check .env file exists and is readable Log what values are found (without exposing tokens) Step 1.2: File Permissions Check Test read/write access to critical directories: app logs backups version.txt app, config, database, public, resources, routes, vendor Step 1.3: Database Connectivity Check Test database connection Verify migrations table exists Check if we can read/write to database Step 1.4: Queue Configuration Check Verify queue driver configuration Check if jobs table exists (novation_inov_jobs) Test basic queue operations PHASE 2: GitHub API Testing Step 2.1: API Connectivity Test Test connection to GitHub API without authentication Verify we can reach https://api.github.com/repos/{repo}/releases Log response status and basic info Step 2.2: Repository Access Test Test with authentication if token provided Verify repository exists and is accessible Check if releases endpoint returns data Step 2.3: Release Data Parsing Test Parse release data structure Verify version comparison logic Check ZIP download URLs are present PHASE 3: Job Queue Testing Step 3.1: Job Creation Test Test creating UpdateJob record Verify job data is stored correctly Check job dispatching (without actual execution) Step 3.2: Queue Processing Test Test /process-jobs endpoint Verify jobs are picked up from queue Check job execution environment Step 3.3: Progress Tracking Test Test progress updates to UpdateJob Verify progress polling works Check log appending functionality PHASE 4: Update Process Testing (DRY RUN MODE) Step 4.1: Download Testing Test ZIP download from GitHub Verify file integrity Check extraction process (without replacing files) Step 4.2: File Replacement Testing Test file backup creation Verify atomic file operations Check rollback capability Step 4.3: Database Migration Testing Test migration status check Verify migration rollback capability Check database backup/restore Step 4.4: Post-Update Tasks Testing Test cache clearing operations Verify maintenance mode Check notification system PHASE 5: End-to-End Integration Testing Step 5.1: Full Dry Run Run complete update process in dry-run mode Verify all steps work together Check error handling and cleanup Step 5.2: Verification Testing Test update verification logic Check version file updates Verify system integrity checks Step 5.3: Rollback Testing Test rollback procedures Verify backup restoration Check system recovery PHASE 6: Production Enablement Step 6.1: Remove Debug Code Remove dry-run flags Clean up debug logging Restore production behavior Step 6.2: Final Testing Test complete update cycle Verify production environment Document the process Debugging Rules for Each Step: Add logging/checkpoints before actual operations Test with dry-run mode - log what WOULD happen Verify logs show expected behavior Fix any issues found in logs Only proceed when current step logs show success Document what was fixed/learned Ready to start with Step 1.1? We begin by checking environment variables and adding logging to verify the basic setup.