Public: anyone can read this; nobody can change it.

azure-gate: gate result from the assert exit code, not ssh (fix false-failure after PASS) #158

Merged opened this view on origin

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

Two runs (r416, r425) passed every cold-start assertion but were reported FAILED and torn down: rungate decided success from ssh's exit code, and reaping the assert's orphaned kubectl port-forward dropped the SSH channel (255) after a clean PASS.

Notes

shipped merged

opened this view on origin

Two runs (r416, r425) passed every cold-start assertion but were reported FAILED and torn down:

COLDSTART GATE PASS: all assertions passed
==> gate: FATAL: coldstart gate FAILED
Connection to <ip> closed by remote host.

run_gate decided success from ssh's exit code, and reaping the assert's orphaned kubectl port-forward dropped the SSH channel (255) after a clean PASS. Root cause: pkill -f <pattern> matches against a process's full command line, and the bash -c running pkill has the pattern in its own argv — so it self-kills its shell (the #156 attempt narrowed the pattern but the literal was still present).

Fix:

  1. Decide by the assert's own exit code — echo GATE_RC=$? after the assert, success = the output contains GATE_RC=0, never ssh's exit. The gate already works end to end; this stops a dropped channel from lying about a PASS.
  2. Reap with a [f]-bracketed pattern port-forward svc/[f]orgejo-http — the regex matches the kubectl process but is not literally present in this command's argv, so it can't self-kill (verified on the NixOS host: shell survives, GATE_RC detected).
  3. _timeout backstops a failed reap; live output still streams via tee.

This is the last blocker — deploy → germinate → assert all pass; this makes the gate report the pass.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs