You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
team-github.test.ts 'returns gracefully' test calls real gh — network-dependent unit test fails during GitHub outages #1364
Evidence (2026-08-06/07, during the GitHub Partial System Outage)
src/__tests__/team-github.test.ts > fetchTeamGitHubData > returns gracefully when gh CLI succeeds or fails failed on main's Unit Tests during the Actions outage (run 31120464069, second attempt — the first attempt's jobs were outage-cancelled). Same commit passes locally (33/33) with a healthy gh. Nothing in the triggering merge (PR #1342, gemini-builder retirement) touches this area.
Unlike its vi.mocked siblings, this test (line ~241) deliberately invokes the REAL fetchTeamGitHubData → real gh CLI, asserting only that it returns a result object rather than throwing ('In CI, gh may not be authenticated; in dev, it may work'). That makes it a unit test with a live network dependency: during the outage, gh produced a failure mode (timeout/hang or an error shape) that either escaped the graceful path or blew the test timeout — indistinguishable from a regression in the CI signal, and it paged the CI cron accordingly.
Fix directions (either acceptable)
Make it hermetic: drive the graceful-degradation contract through the same mock seam the sibling tests use, covering the specific failure shapes (nonzero exit, ENOENT, timeout/kill, garbage stdout). The 'never throws on real gh' property, if wanted at all, belongs in an integration suite that tolerates network flake, not in Unit Tests.
If the real-gh smoke is kept: bound it (short timeout, explicit catch-all assertion) and mark it skip-on-network-failure — but note this still leaves a nondeterministic unit test, so option 1 is preferred.
Also worth checking while in there: whether the outage failure mode revealed an actual gap in fetchTeamGitHubData's graceful handling (if the failure was a THROW rather than a test timeout, the production path has an uncaught error shape — the CI log's failure detail will say which).
Another occurrence, 2026-09-04T10:34Z, on PR #1616 (head 3a4e01d): fetchTeamGitHubData > returns gracefully when gh CLI succeeds or fails timed out at 5000ms in the Unit Tests job (run 33863815640). The same suite passed on the previous head 78b5a86 minutes earlier; the two heads differ only by a porch status.yaml commit, so the failure is independent of the change under test. Rerun requested on the same head. This is the fixed-step intermittent pattern: it only surfaces at the pr gate, where CI must be green on a stationary head, so each hit costs a full rerun cycle.
Activity
amrmelsayed commentedon Sep 4, 2026
Another occurrence, 2026-09-04T10:34Z, on PR #1616 (head 3a4e01d):
fetchTeamGitHubData > returns gracefully when gh CLI succeeds or failstimed out at 5000ms in the Unit Tests job (run 33863815640). The same suite passed on the previous head 78b5a86 minutes earlier; the two heads differ only by a porch status.yaml commit, so the failure is independent of the change under test. Rerun requested on the same head. This is the fixed-step intermittent pattern: it only surfaces at the pr gate, where CI must be green on a stationary head, so each hit costs a full rerun cycle.