diff --git a/.github/workflows/cultnet-interop.yml b/.github/workflows/cultnet-interop.yml index 6876a76a..4000cc1c 100644 --- a/.github/workflows/cultnet-interop.yml +++ b/.github/workflows/cultnet-interop.yml @@ -65,6 +65,29 @@ jobs: "KOTLIN_JAVA_HOME=$env:JAVA_HOME" | Out-File -FilePath $env:GITHUB_ENV -Append "$kotlinHome\bin" | Out-File -FilePath $env:GITHUB_PATH -Append + - name: Verify CultNet schema contracts stayed consolidated + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + $stray = git ls-files '*.schema.json' | Where-Object { $_ -notmatch '^contracts/cultnet/' } + # -I skips binary files: unity/org.gamecult.cultlib/Runtime/Plugins/GameCult.Networking.dll + # still embeds the retired namespace until it is rebuilt (REC-032 D4, deferred). + $oldNamespace = git grep -I -lE 'GameCult/cultnet-ts/(integration/)?contracts' -- ':!.voidbot' + if ($LASTEXITCODE -eq 2) { + throw "git grep failed" + } + if ($stray) { + Write-Host "Schema files found outside contracts/cultnet/:" + $stray | ForEach-Object { Write-Host " $_" } + } + if ($oldNamespace) { + Write-Host "Files still referencing the retired GameCult/cultnet-ts contracts namespace:" + $oldNamespace | ForEach-Object { Write-Host " $_" } + } + if ($stray -or $oldNamespace) { + throw "CultNet schema contracts drifted out of contracts/cultnet/ (REC-032). See CultLib/contracts/cultnet/ and rewrite any `$id back to https://github.com/GameCult/CultLib/contracts/cultnet/." + } + - name: Install Node dependencies run: npm install --no-package-lock