Skip to content

Re-render a module failure that the host shell moved under - #5934

Draft
backspace wants to merge 1 commit into
mainfrom
cs-12696-dont-publish-a-module-resolution-failure-as-a-cached-error
Draft

Re-render a module failure that the host shell moved under#5934
backspace wants to merge 1 commit into
mainfrom
cs-12696-dont-publish-a-module-resolution-failure-as-a-cached-error

Conversation

@backspace

@backspace backspace commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This relates to the Tuesday production hosted site downtime, which happened again today.

Claude: The indexer stores a failed render as the card's content, which is right when the card is broken and wrong when the page that rendered it was running a bundle the realm server has already stopped serving. A prerender tab holding the pre-deploy host bundle, rendering post-deploy realm source, throws has no exported member — a fact about a transient bundle mismatch. Persisted as an error document it becomes what every anonymous reader gets, in ~25ms from cache, until an unrelated reindex happens to revisit the row. Twice in three days that turned a bundle-coexistence window of a few minutes into an outage of roughly seventy.

The prerender server is the only party that can tell those apart, because it is the one that learns the shell changed. It now reads its adopted host-shell token when a visit starts and again when the render returns, and a visit whose two tokens differ AND whose result is a module-resolution failure is rendered once more before being returned. The recycle that moved the token is already in flight by then, so the second attempt lands on a page warmed against the current shell. One attempt only: if it fails again the failure is the card's, and the caller is owed an answer.

The tokens are recorded on the response either way. On a failure they are the evidence for how it should be read; on a success they let an operator attribute a render to a bundle without matching timestamps against deploy logs.

Two limits worth stating. A render that both starts and finishes before this server hears about the change still looks steady to it — narrowing that needs the token stamped per page rather than per server. And a page that warmed its shell from a realm-server task that had not rolled yet carries a token that never appears to move at all; the cross-artifact CI guard is what removes that class rather than this.

The indexer stores a failed render as the card's content, which is right when
the card is broken and wrong when the page that rendered it was running a
bundle the realm server has already stopped serving. A prerender tab holding
the pre-deploy host bundle, rendering post-deploy realm source, throws
`has no exported member` — a fact about a transient bundle mismatch. Persisted
as an error document it becomes what every anonymous reader gets, in ~25ms
from cache, until an unrelated reindex happens to revisit the row. Twice in
three days that turned a bundle-coexistence window of a few minutes into an
outage of roughly seventy.

The prerender server is the only party that can tell those apart, because it
is the one that learns the shell changed. It now reads its adopted host-shell
token when a visit starts and again when the render returns, and a visit whose
two tokens differ AND whose result is a module-resolution failure is rendered
once more before being returned. The recycle that moved the token is already
in flight by then, so the second attempt lands on a page warmed against the
current shell. One attempt only: if it fails again the failure is the card's,
and the caller is owed an answer.

The tokens are recorded on the response either way. On a failure they are the
evidence for how it should be read; on a success they let an operator
attribute a render to a bundle without matching timestamps against deploy
logs.

Two limits worth stating. A render that both starts and finishes before this
server hears about the change still looks steady to it — narrowing that needs
the token stamped per page rather than per server. And a page that warmed its
shell from a realm-server task that had not rolled yet carries a token that
never appears to move at all; the cross-artifact CI guard is what removes that
class rather than this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Host Test Results

    1 files      1 suites   2h 6m 25s ⏱️
4 595 tests 4 581 ✅ 14 💤 0 ❌
4 610 runs  4 596 ✅ 14 💤 0 ❌

Results for commit e463c70.

Realm Server Test Results

    1 files      1 suites   18m 11s ⏱️
2 359 tests 2 359 ✅ 0 💤 0 ❌
2 442 runs  2 442 ✅ 0 💤 0 ❌

Results for commit e463c70.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant