What broke
A login page counted as "up" for seven weeks
Portal's status card checked an app's public URL when the app had no local address. Cloudflare Access answered with its login page, the card counted that as "up", and an app with every container stopped looked alive for seven weeks.
The short version
What went wrongThe status check counted any HTTP response as up. With no local address it probed the public URL, and Cloudflare Access's login page showed an app with all containers stopped as green for seven weeks.
How we found itThe post doesn't say who noticed first. A code comment dates the finding to 19 November 2026, and the fix commit gives the length as seven weeks.
The rule nowA login redirect from Access means unknown, and container state then decides. Any 5xx means down. A health check has to be able to fail, and if it can't see the app, it must say so.
This post documents something Claude got wrong. The claim rests on a commit or a file, not on memory. All of Claude's mistakes
Portal is the app that runs our app park. Each app gets a card, and the card has a dot: green for up, red for down, grey for unknown. For seven weeks one app’s dot was green while every container behind it was stopped.
Claude wrote the status check, like all the code in our repositories. The fault was in that code. Claude’s fix commit on 19 November 2026 sums it up:
[The app] showed up for seven weeks with every container stopped: without a local address the public URL was probed, and Cloudflare Access answers with its login.
What the check did
Portal finds out whether an app is alive by sending it an HTTP request. When an app has a local address on the server, the check goes there and reaches the app directly. When an app has no local address, the check falls back to the app’s public URL.
Our public URLs sit behind Cloudflare Access. Anyone who isn’t logged in gets redirected to the Access login page, and Access does that before the request ever reaches the app. So the check sent a request, got a redirect to a login page, and took that as a sign of life.
In the part of the diff we have, the old code set the result to “up” as soon as the request came back with a response. The commit title, “an Access login page or a 5xx no longer counts as up”, says what that meant in practice. A redirect to a login page counted as up. So did a server error. The check had no way to fail as long as something on the internet answered.
The app’s containers were stopped. Cloudflare was not. Cloudflare kept answering, so the dot stayed green.
How it was found
The material doesn’t say who noticed first or how. What it does say: a code comment in the new status module dates the finding to 19 November 2026, and the commit message gives the length as seven weeks. We have no other measurement of that period. The seven weeks is how long the app had been showing as up while it was down, as written in the commit.
The fix
Claude moved the up-or-down decision out of the server code and into a small module of its own. It has two steps and is covered by its own tests.
Step one: read the HTTP answer honestly.
- A redirect to a Cloudflare Access login page, when the app has no local address, now gives “unknown”, not “up”. The reason recorded is that the app is behind Cloudflare Access and the app itself was not measured. In the comment’s words, an answer from Access is not an answer from the app.
- Any 5xx answer counts as down. The comment names 502, 503 and 530: Cloudflare or the app answers, but the app behind it is down or failing.
- Other answers still count as up. A 401 from the app’s local address means the app is there and wants a login. A redirect from the app itself, such as a local redirect to its own login page, is the app answering. A redirect to some other site is still treated as up.
Step two: when the HTTP check doesn’t know, the containers decide.
Portal already knows which containers belong to which app and what state they are in. If the HTTP step returns “unknown”, that container state settles it:
- If the app’s containers are up, partly up or starting, the card shows up, with a reason like “3 of 3 containers running”.
- If none of them run, the card shows down, with the reason “none of the containers are running”.
- If the app has no containers on the server at all, it is down, with that as the reason.
- If the service that reports container state didn’t answer, the result stays “unknown”. Portal doesn’t guess.
A result the HTTP check is sure of is never overridden by the containers. A real 200 from the app stays up.
The dot’s tooltip changed too. Before, down was always “not responding” and unknown was always “unknown”. Now the card shows the reason: the status code for a 5xx, or “none of the containers are running”, or “behind Cloudflare Access” for an unknown. When the dot is red or grey, it says why.
The tests
The commit adds a test file for the new module. It needs no network, and it runs as part of Portal’s regular check script, so it runs with every other test. It covers the cases above:
- An Access login redirect from the public URL gives unknown. A local redirect to a login page gives up. A redirect elsewhere gives up.
- 530 and 502 give down. 401 and 307 give up.
- When the result is unknown, running containers give up, stopped containers give down with the reason, no containers give down, and a silent container service keeps it unknown.
- A sure result is not overridden.
One of the test cases replays the incident directly: an unknown result from Access, combined with an app whose containers are all stopped, must come out as down with the reason “none of the containers are running”.
What we take from it
The old check could only fail if nothing answered at all. In a setup where a proxy and a login wall sit in front of every app, that almost never happens. A check that can’t fail tells you nothing, however green it looks.
The fix doesn’t make the public-URL probe smarter at guessing. It admits that the probe can’t see the app and hands the question to something that can: the container state on the server. And it adds a third answer, “unknown”, for when neither source knows.
The rule
A response from a login page is not proof that the app is alive. A login redirect from Cloudflare Access means “unknown”, and the container state settles it. Any 5xx means down. A health check has to be able to fail, and if it can’t see the app, it has to say so.