An empty Stripe checkout page made a guard report the wrong product
The alert described a product mismatch that was not there
On October 10, 2026, a checkout guard reported that a payment link did not belong to the expected product. The wording presented a product mismatch as an observed fact. It could be read as saying that a payment link for one brand was showing another brand’s product.
That was a consequential claim in this environment. All the products shared a Stripe account, and there had already been an incident in which a payment for one product was picked up by another product’s webhook and granted unlimited reading access. An alert suggesting another cross-product payment problem therefore described something that warranted immediate investigation.
But the production checkout was healthy. When the guard ran over a stable network connection, all 12 of its 12 checks passed.
The discrepancy was in what the guard claimed to have established. Its message said that the product was wrong. The evidence available to the failing check was an empty string. It had not successfully read the checkout page and found a different product. It had failed to obtain the text needed to make that comparison.
That distinction became the focus of the fix: preserve the difference between a defect observed in production and an inspection that could not reach a conclusion.
A missing match became a claim about the product
The checkout check waited for a fixed sleep, then read the page body:
const seen = await p3.evaluate(() => document.body.innerText || '');
The next assertion searched that text for the expected product name. If the regular expression did not match, the guard emitted a message saying that the payment link was not for that product.
The assertion assumed that the page had rendered by the time the sleep ended. When the Stripe checkout page had not rendered, seen contained zero characters. An empty string could not match the expected name, so the assertion failed.
The mechanical result was consistent with the code: no match meant failure. The explanation attached to that result was unsupported. The guard turned “the expected name was not found in the text we obtained” into “this link belongs to the wrong product,” without first establishing that it had obtained usable page text.
There was no separate outcome for that missing evidence. The guard had only PASS and FAIL. A check that could not inspect its target had to fall into one of those categories, and this one fell into FAIL with a production-defect message.
The existing lesson had been to avoid treating CANNOT_CHECK as PASS. This incident exposed the opposite mistake. Treating an incomplete inspection as success can conceal a problem. Treating it as a confirmed failure can send someone looking for an incident that does not exist. Here, the wording pointed directly toward a payment-routing concern that had a relevant history.
The same check had already overstated its evidence
This was the second false alarm from the same stage of the guard.
Previously, it had used textContent, which included the contents of <script> elements. That inspection counted the word “expired” eight times and reported that the link had been disabled.
The two failures involved different text-reading behavior, but both attached a stronger conclusion to the collected material than the material supported. In the earlier case, script contents contributed to a claim about the state of the payment link. In the later case, the absence of rendered text contributed to a claim about the identity of the product.
Switching the text-reading property was therefore not enough to establish a trustworthy check. The later code used innerText, but it still needed to establish that rendering had produced something it could inspect.
The useful question was not simply whether the expected string appeared. It was whether the guard had reached a state in which that comparison meant what the failure message said it meant.
For the empty-page case, the supported report was narrow: the page had not produced readable text within the wait. There was no product-name evidence to report. The fix made that limit explicit instead of letting an empty observation inherit the meaning of a failed product assertion.
The fix separated unavailable evidence from failed assertions
The guard gained a CANNOT_CHECK outcome, displayed with ⛔. Its exit codes now distinguished a real failure from an incomplete inspection: a genuine failure used rc=1, while a check that could not complete used rc=2.
The notification heading also changed. It reported how many stages could not be checked and stated that this outcome was not a production defect. That gave the alert a meaning consistent with the guard’s actual observation.
The checkout stage stopped relying on a fixed sleep. A waitText() helper polled for rendered text for up to 25 seconds. If the page remained empty, the guard reported that it had not rendered, including the zero-character observation and the time spent waiting. It did not proceed to judge the product name.
The Stripe API checks received a corresponding distinction. A request that did not reach the service was handled as an inability to check. An API response containing an error was handled as a failed assertion. The implementation separated failure to obtain a response from an error actually returned by the API.
Another stage that failed during the same run also changed. It had waited for networkidle, requiring a 500-millisecond interval without network activity. Playwright's own API documentation marks networkidle as discouraged for exactly this reason, telling callers not to rely on it and to use web assertions instead. With slow beacons or data fetching, including immediately after network recovery, that condition could remain unmet even after 30 seconds and cause healthy production to fail the guard.
That stage needed evidence that the page had loaded and a visit signal had appeared. It was changed to wait for load, then wait for the signal itself. The condition became tied to the observation the stage needed.
Test whether your guard can admit it could not check
The fix was verified by returning an empty Stripe checkout page through fault injection. The same fault was applied to both the old and new guards.
The old guard reported the product mismatch and exited with rc=1. Its output reproduced the morning’s alert exactly, including the payment-link identifier. The investigation identified the empty-page path as the source of that alert.
The new guard reported that the page had not rendered after waiting 25 seconds, recorded zero characters, and exited with rc=2. On normal runs, both versions passed all 12 checks with rc=0. The changed behavior was visible when the evidence was unavailable.
That is a concrete test to apply to a guard that depends on an external page: make the inspected page empty and examine both the message and the exit code. Does the guard describe the missing observation, or does it accuse the product of a defect it has not observed?
Review the failure text alongside the assertion. A product-mismatch message needs readable material that supports a product comparison. Zero characters support a report that the text could not be read. An empty result should not silently stand in for a completed measurement.
For navigation checks, inspect the condition being awaited as well. If the required evidence is a page load followed by a visit signal, test for those events. The quietness of all network activity was not the production-health condition this guard needed.
The lesson from this incident is verifiable in the output: an unavailable inspection must remain distinguishable from a failed assertion. The guard should tell its reader what it observed, including when it could not observe enough to decide.
Root Cause is written while shipping small software products — you can see them at TechAthletes.