Skip to content

fix(engine): look a host up again after a failed lookup instead of refusing it for the whole page - #7751

Merged
miguel-heygen merged 2 commits into
mainfrom
fix/render-page-lookup-retry
Nov 14, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
fix/render-page-lookup-retry

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

With PRODUCER_RESTRICT_PAGE_NETWORK=true, a host whose name lookup fails is refused for that request and looked
up again on the next one. Before, the failure was cached as a refusal for the rest of the page.

Why

Stacked on #7748, from its review. One transient DNS failure on a public host (a web font, a remote video, a CDN
script) would otherwise block every later request to that host for the rest of a long render, while Chrome on its
own would have retried. The asset would go missing from the output without the render failing.

Related work

Refs #7748 (base of this PR; GitHub retargets it to main when #7748 merges).

How

  • pageNetworkPolicy.ts: the host check returns "public" | "non-public" | "unresolved" instead of a boolean.
    Answers about resolved addresses stay cached for the page. An "unresolved" answer is dropped from the cache
    once it settles, so the next request to that host asks again. A request already waiting on the same lookup
    shares its answer.

Test plan

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)
  • Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug

New test in pageNetworkPolicy.browser.test.ts (real headless Chrome): a name whose first lookup fails is
refused once, then allowed when the next lookup answers with a public address. The second request reaches the
target server; the first does not.

Fails without the fix: with the cache-drop line removed, the new test fails (1 of 1). With restrictPageNetwork
replaced by a no-op, the file fails 6 of 8.

Both test files pass 10 of 10, three runs in a row on Linux; tsc, oxlint and oxfmt --check pass.

Not exercised: Windows and macOS hosts; a real DNS failure (the test injects one through the resolver).

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head 4da32b17

The fix itself is right: only a failed lookup is forgotten, and requests already waiting share it. The one blocker is the red Comments run (inline).

Scope

Reviewed the delta on #7748 (a6037e14..4da32b17, 2 files). This PR is stacked, so the CI workflow (lint, typecheck, tests) has not run on it. Locally against chrome-headless-shell 157, both test files pass 10/10, three runs in a row. With the cache-drop line removed, the new test fails (1 of 1), which matches the fails-without-the-fix line.

Base automatically changed from fix/render-page-address-rules to main November 14, 2026 16:58
@mintlify

mintlify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Nov 14, 2026, 5:05 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 98 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

Unstable (1)

  • seqab-none-pct-r0-root-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE — 1 resolved, 0 open, 0 new · 4da32b1 → b1d3b1d

Receipt

The rebase onto main after #7748 is byte-identical to 9d5edce2 in both files. forgetFailedLookup keeps the same behaviour. All CI on b1d3b1dc is green: CI, Comments, CodeQL, regression and Windows render verification. Locally, both test files pass 10/10, and tsc, oxlint and oxfmt --check are clean.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit b100cf4 Nov 14, 2026
92 checks passed
@miguel-heygen
miguel-heygen deleted the fix/render-page-lookup-retry branch November 14, 2026 17:42

This branch was successfully deployed

1 active deployment
staging - docs — b1d3b1dc Deployed Nov 14, 2026 by mintlify[bot]
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