Why this is the first record on this surface
The decision-records loader you are reading output from uses the same gate, for the same reason, and imports the same function. A record about draft visibility, published by a surface whose own draft visibility depends on the fix, is the cheapest possible demonstration that this is a working notebook rather than a retrospective.
The shape of the mistake
The failure was not the condition being wrong. NODE_ENV !== 'production' is a
perfectly good way to ask "am I in a dev server". The failure was that the
question it answered and the question it appeared to answer were different, and
the gap was invisible at the call site.
That is a recurring class in this codebase, and it is why the constitution's standing rule is that a claim must not outrun the check that supports it. Here the claim — "drafts are hidden in production" — was true. It was just also hiding them in preview, and nothing in the name, the condition, or the test suite would have told you.
What changed structurally
Two things, beyond the one-line condition:
- A single authority.
getAppRuntimeEnvironment()is now the only way any surface asks which deployment it is on, so a future gate cannot invent its own answer. - Failing closed. An unrecognised environment resolves to PRODUCTION. The previous behaviour on an unknown value was to show drafts, which is the wrong direction to fail in.