diff --git a/tools-sync/scripts/sync_repos.ps1 b/tools-sync/scripts/sync_repos.ps1 index eca6f60..ed064a0 100644 --- a/tools-sync/scripts/sync_repos.ps1 +++ b/tools-sync/scripts/sync_repos.ps1 @@ -51,7 +51,7 @@ function Invoke-Doctor([string]$Why) { $doctor = Join-Path $PSScriptRoot "gitea_doctor.ps1" if (-not (Test-Path $doctor)) { Write-Host "gitea_doctor.ps1 not found; cannot repair the server."; return $false } Write-Host "" - Write-Host "=== transport fault ($Why) - running gitea_doctor -Fix ===" + Write-Host "=== gitea transport check/repair ($Why) ===" $dargs = @("-RepoUrl", $RepoUrl, "-Fix") if ($AllowDestructive) { $dargs += "-AllowDestructive" } & $doctor @dargs @@ -143,6 +143,16 @@ if ($DryRun) { } if ($r.Code -ne 0) { Write-Host $r.Out; Fail "push failed (auth? see skill Phase 1)." } Assert-RemoteInSync $ClaudeSkills $Branch + # ls-remote only proves the ref plane works. A sync run can push happily while the + # server hands out empty packs, and then no other machine can fetch what we just + # pushed - which is precisely how the 2026-08 outage hid. The doctor's transport + # probe is a few KB and returns without touching ssh when everything is fine, so + # "in sync" is only reported once fetching actually works. + if (-not $NoDoctor) { + if (-not (Invoke-Doctor "post-sync fetchability probe")) { + Fail "this machine's work is on the server, but the server cannot serve packs: no other machine can fetch it. Not a successful sync - see the skill's Phase 1.5." + } + } } # ---------- Phase 2: junction reconciliation (~\.codex\skills) ----------