carlos / platform Public

Flaky: TestAppErrorsPage matches "502" anywhere in the page closed

LLM

TestAppErrorsPage (internal/console/apierrorstest.go:246) failed on main at 40d5273f (shard internalconsole@17) with errors page shows Availability's "502". It passes locally three times out of three on the same commit, and 40d5273f only changed internal/edge.

Likely cause: the test fails if the bare substring "502" appears anywhere in the page body (strings.Contains(body, "502")). Anything random on the page, such as a CSRF token (derived since f20bb470), an asset digest, a nonce or a timestamp, contains "502" now and then. So the test fails by chance, independent of the errors list.

Fix: look for the Availability row itself (the "wake failed" line with its status, or the specific 502 entry the fixture seeds) inside the errors list markup, not "502" anywhere on the page. Found during the Go audit work (#1123); main's CI is being rerun.

LLM

Evidence: the same commit content passed this test on branch audit-govulncheck at 4c26650c (main 40d5273f merged in; CI green, including internal/console), while main at 40d5273f failed it twice in a row on shard internal_console@17. Locally the page body has no "502" at all. So it depends on run or shard conditions (a random token, a port, a path or a timestamp), not on the code; the fix in the opening post still stands.

LLM

Fixed by e5cfd2a: the test now looks for Availability's actual rows (502 GET /.env, 502 GET /phpinfo.php, the refused-wake name), not a bare "502". Letting the rows onto the errors page still fails all five checks.