Skip to content

fix(integration): trust unittest exit code, not 'tail -3 | grep ^OK' (false-fail seen on main today) - #444

Merged
joelteply merged 2 commits into
mainfrom
canary
May 3, 2026
Merged

joelteply merged 2 commits into
mainfrom
canary

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

No description provided.

joelteply and others added 2 commits May 2, 2026 19:49
Pre-fix CI false-failed test_envelope when unittest emitted DeprecationWarning lines after the OK marker — output looked like:

  ..................
  ----------------------------------------------------------------------
  Ran 18 tests in 0.246s

  OK
  /home/runner/.venv/.../resource_warning.py:N: ResourceWarning: ...

`tail -3` captured the last 3 lines (the warning + blank + something), missed the OK marker, scenario_python_units called fail(). Joel hit this on main CI after promote — false-positive failure on a passing test.

Two real bugs in one:
1. Output-parsing for pass detection is fragile against any post-OK noise (warnings, debug prints, etc.). Fix: trust unittest's exit code (0=pass, non-zero=fail).
2. Failure mode emitted only "✗ test_X" with no error context. Debugger can't act. Fix: capture stderr+stdout to tempfile, dump last 30 lines on failure so the actual traceback reaches CI logs.

Both fixes together: false-pass impossible, true-fail actionable. Same pattern as airc's "evidence is for the debugger, not the trash" rule.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…-code

fix(integration): trust unittest exit code, not 'tail -3 | grep ^OK' (false-fail seen on main today)
Copilot AI review requested due to automatic review settings May 3, 2026 00:51
@joelteply
joelteply merged commit e10f4d3 into main May 3, 2026
16 checks passed
@joelteply
joelteply removed the request for review from Copilot May 3, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant