From ea92c2e850ddc823443a2e5bb019b701f50b2c87 Mon Sep 17 00:00:00 2001 From: stan44 Date: Fri, 27 Feb 2026 11:31:31 -0600 Subject: [PATCH] Removed the three stale "Current repository caveat" --- scripts/README.md | 15 +++------------ scripts/WORKFLOWS.md | 4 ++-- scripts/migration-gate.ps1 | 21 ++++++++++++++++----- scripts/nuget-export-cache.ps1 | 2 +- scripts/nuget-import-cache.ps1 | 2 +- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index c941759..997637a 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -264,10 +264,7 @@ Current behavior: 3. runs Python parity harness test discovery 4. optionally runs API contract test discovery -Current repository caveat: - -- This clean repo currently does **not** contain `tests/` or `Journal.Api/`. -- Running full gate without matching files will fail. +If `tests/` is absent, Python parity and API contract steps are skipped automatically with a clear message — the sidecar build and smoke tests still run. ### `nuget-export-cache.ps1` @@ -285,10 +282,7 @@ Behavior: - writes `nuget-cache-manifest.txt` - outputs zip -Current repository caveat: - -- Script references `Journal.Api/Journal.Api.csproj`. -- If `Journal.Api` is absent, export fails unless script is adjusted. +Primes restore for `Journal.Sidecar`, `Journal.WebGateway`, and `Journal.SmokeTests`. ### `nuget-import-cache.ps1` @@ -303,10 +297,7 @@ Behavior: - extracts zip into repo root - runs restore for selected projects via `dotnet-min.ps1` -Current repository caveat: - -- Script references `Journal.Api/Journal.Api.csproj`. -- If `Journal.Api` is absent, import validation step fails unless script is adjusted. +Validates restore for `Journal.Sidecar`, `Journal.WebGateway`, and `Journal.SmokeTests`. ## Environment Variables Used diff --git a/scripts/WORKFLOWS.md b/scripts/WORKFLOWS.md index 14f43c1..e3972b4 100644 --- a/scripts/WORKFLOWS.md +++ b/scripts/WORKFLOWS.md @@ -101,7 +101,7 @@ Partial run: .\scripts\migration-gate.ps1 -SkipSmoke -SkipApi ``` -Current clean repo caveat: `tests/` and `Journal.Api/` are not present, so full gate will fail until those assets are available. +If `tests/` is absent, Python parity and API contract steps are skipped with a clear message. ## 9) NuGet Cache Export/Import (Offline-ish Restore) @@ -117,7 +117,7 @@ Import: .\scripts\nuget-import-cache.ps1 -InputZip .\nuget-cache-export.zip ``` -Current clean repo caveat: both scripts reference `Journal.Api/Journal.Api.csproj`. +Validates restore for `Journal.Sidecar`, `Journal.WebGateway`, and `Journal.SmokeTests`. ## 10) Quick Troubleshooting diff --git a/scripts/migration-gate.ps1 b/scripts/migration-gate.ps1 index e621cbd..c0d2e09 100644 --- a/scripts/migration-gate.ps1 +++ b/scripts/migration-gate.ps1 @@ -25,14 +25,25 @@ try { } Write-Host "migration-gate: running parity harness + fixture matrix..." - $env:PARITY_HARNESS_REPORT = $parityReport - & python -m unittest discover -s tests -p "test_parity_harness.py" -v - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + $testsDir = Join-Path $repoRoot "tests" + if (Test-Path $testsDir) { + $env:PARITY_HARNESS_REPORT = $parityReport + & python -m unittest discover -s tests -p "test_parity_harness.py" -v + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + } + else { + Write-Host "migration-gate: skipping parity harness — tests/ directory not found." + } if (-not $SkipApi) { Write-Host "migration-gate: running API contract tests..." - & python -m unittest discover -s tests -p "test_api_contract.py" -v - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + if (Test-Path $testsDir) { + & python -m unittest discover -s tests -p "test_api_contract.py" -v + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + } + else { + Write-Host "migration-gate: skipping API contract tests — tests/ directory not found." + } } else { Write-Host "migration-gate: skipping API contract tests (--SkipApi)." diff --git a/scripts/nuget-export-cache.ps1 b/scripts/nuget-export-cache.ps1 index 4c9cc61..bee1a64 100644 --- a/scripts/nuget-export-cache.ps1 +++ b/scripts/nuget-export-cache.ps1 @@ -13,7 +13,7 @@ if (-not (Test-Path $outputDir)) { Write-Host "Priming restore cache..." & (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.Sidecar/Journal.Sidecar.csproj" if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.Api/Journal.Api.csproj" +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.WebGateway/Journal.WebGateway.csproj" if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } & (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.SmokeTests/Journal.SmokeTests.csproj" if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } diff --git a/scripts/nuget-import-cache.ps1 b/scripts/nuget-import-cache.ps1 index aced5e8..dad8f04 100644 --- a/scripts/nuget-import-cache.ps1 +++ b/scripts/nuget-import-cache.ps1 @@ -16,7 +16,7 @@ Expand-Archive -Path $inputPath -DestinationPath $repoRoot -Force Write-Host "Running restore with local cache..." & (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.Sidecar/Journal.Sidecar.csproj" if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.Api/Journal.Api.csproj" +& (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.WebGateway/Journal.WebGateway.csproj" if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } & (Join-Path $PSScriptRoot "dotnet-min.ps1") restore "Journal.SmokeTests/Journal.SmokeTests.csproj" if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }