Skip to content

FLT-322 fix brief 3: sync-push shadow wiring (Gronktayvius)

Read docs/flt-322-sync-push-brief.md and docs/flt-322-sync-push-fix-brief.md: their requirements stand. The first rule: nothing here may change whether or how the push and the peer pulls happen. This is a bounded repair with a normal shell, which Cedric's sandbox lacks. This is separate from your replay run: do not touch fleet-harness-wt.

Working directory: C:\Users\fives\source\repos\fleet-repo-sync-wt\WT-0cdb-FLT-322. Edit sync-push.ps1, tests/sync-push-shadow.Tests.ps1, docs/flt-322-sync-push-report.md. Keep the UTF-8 BOM on sync-push.ps1; losing it breaks every fleet push under Windows PowerShell 5.1. Do not push. Do not commit: the orchestrator commits after re-running. No test may reach a real machine; always -SkipPeers -SkipMacs.

Failures, from the orchestrator's real run

=== powershell passed=17 failed=4 total=21
  hanging gate: pushes within limit, logs timeout, kills gate and sleeper :: Expected $null or empty, but got System.Diagnostics.Process (powershell).
  producer Pass: pushes and records publish exit and ref count :: Expected 7, but got $null.
  publish verdict-looking output never decides the result :: Expected 0, but got $null.
  real Release gate: pushes and records producer Block NoManifest :: Expected 0, but got $null.
=== pwsh passed=19 failed=2 total=21
  hanging gate: same message.
  real Release gate: Expected 0, but got 3.

Fix

  1. publishExitCode is null under 5.1. Start-Process -PassThru needs its process handle cached right after start ($null = $p.Handle) or ExitCode reads null. Confirm this is the cause before relying on it.
  2. Hanging gate: a stand-in's child is still alive after the timeout. Find out why. Is the tree kill not finishing inside its bound, or is the sleeper outside the tree? Fix the real cause. The wait on taskkill must stay bounded, so the kill cannot become a new way to delay the push. If a test asserts too early, bound a wait in the test. Do not delete the assertion.
  3. Real gate publish exits 3 when the repo has no manifest. That is a defect in the gate, and the orchestrator fixes it later in fleet-harness. So here: log the real publishExitCode, and leave the test expecting 0, failing for that reason alone. Name it in the report.
  4. The existing tests/fleet-repo-sync.Tests.ps1 was 19 of 19 in a fresh process and 0 of 19 when run after the shadow tests in the same PowerShell session. Find out whether the shadow tests leak environment or state. Their AfterAll must restore everything they set.

Check

Bound every run to 10 minutes. These are the commands, each in a fresh process:

pwsh -NoProfile -NonInteractive -File docs/run-shadow-tests.ps1 powershell
pwsh -NoProfile -NonInteractive -File docs/run-shadow-tests.ps1 pwsh
pwsh -NoProfile -NonInteractive -File docs/run-shadow-tests.ps1 existing

Write that small runner file yourself. It sets FORGE_SMOKE_REAL_BIN to C:\Users\fives\source\repos\fleet-harness-wt\WT-0cdb-FLT-322\src\Forge.Gates.Smoke.Cli\bin\Release\net10.0\forge-smoke.exe, sets FRS_TEST_HOST, imports Pester 5 or later, and prints passed, failed and each failure message.

Done

docs/flt-322-sync-push-report.md updated, short, with real output for all three. Everything passes except the one named publish test. If a permission denial stops you, record the exact denied call and stop. Do not look for another route.