Truth File strategy: never seed from latest, calibrate or detect
CheckModpackUpdates: - Reads .modpack-checker.json Truth File from server filesystem - Falls back to manifest.json, extracts fileID, writes Truth File - NEVER seeds current_version from latest API result - Unknown version → status: pending_calibration (not up_to_date) - Removed seedCurrentVersion heuristic — replaced with Truth File - writeTruthFile() helper writes .modpack-checker.json via Wings ModpackAPIController: - calibrate() now writes Truth File after DB update - Persists across server reinstalls and cron runs wrapper.tsx: - pending_calibration: shows "Version unknown" + "Identify Version" button - Ignored servers: muted card with "Resume" button (not hidden) - Extracted renderCalibrateDropdown() for reuse - Error state shows message instead of vanishing Migration: - Updates existing unknown+detected rows to pending_calibration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f39b6d6c67
commit
27b2744786
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Documents the new 'pending_calibration' status value.
|
||||
* The status column is VARCHAR so no schema change needed —
|
||||
* this migration updates any 'unknown' status rows that have
|
||||
* a detected platform but no current_version.
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
DB::table('modpackchecker_servers')
|
||||
->where('status', 'unknown')
|
||||
->whereNotNull('platform')
|
||||
->whereNull('current_version')
|
||||
->update(['status' => 'pending_calibration']);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
DB::table('modpackchecker_servers')
|
||||
->where('status', 'pending_calibration')
|
||||
->update(['status' => 'unknown']);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user