Repository navigation
fix(web): drive the render over the DevTools protocol — the DOM at a cap, late content waited for - #375
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SSFSKIM
force-pushed
the
web-render-driver
branch
from
October 25, 2026 20:50
1188108 to
0029e80
Compare
…cap, late content waited for Board #130. registry.terraform.io kept headless Chromium busy until the 30 s limit and nothing came back: Chromium's --dump-dom harness waits for the virtual-time budget with no cap once the page has loaded, and the page holds a LaunchDarkly event stream open, so its clock never moves. --timeout caps only the load. The clipper now drives the headless shell itself over --remote-debugging-pipe (clipper/src/cdp.ts; no port, no new dependency): the same load and 10 s virtual-time budget, then a settle in which the page's clock is stepped at about real speed until the DOM has not changed for 500 ms (at most 5 s), and the DOM taken as it stands 3 s inside the limit when the page never settles, with a note. The settle catches what the budget does not wait for: package.elm-lang.org drawn in an animation frame after the budget (6 of 10 runs a 12-word shell under CPU load before, 0 of 10 after), and a worker's request. A render that leaves the page under 50 words now says so. The NetLog is read once Chromium has closed it, since the process can take 10 s more to exit. Proxy (its Boundary, deny list included), egress flags, fresh profile and NetLog evidence are unchanged; the egress trap tests still show 0 TCP connections and 0 UDP packets, and a rendered page requests nothing from a denied host. Decision Log entry and diagnosis in the design. web 0.2.1. Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
SSFSKIM
force-pushed
the
web-render-driver
branch
from
October 25, 2026 20:54
0029e80 to
1a9f78d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Board #130. The
webplugin's renderer now drives headless Chromium over the DevTools protocol on--remote-debugging-pipeinstead of--dump-dom. It returns the DOM at a cap instead of nothing, waits for content that arrives after the virtual-time budget, and says so when a render may be partial or stays thin.web→ 0.2.1 (rebased onto #376 and #377; main is at 0.2.0).Diagnosis
--dump-dom(components/headless/command_handler/headless_command.js) races the load event against--timeout. If the load wins, it setspauseIfNetworkFetchesPendingand waits forvirtualTimeBudgetExpiredwith no cap. registry.terraform.io keeps a LaunchDarkly event stream open from 1.6 s, so the page's clock never advances and nothing is printed. The NetLog of a run killed at 45 s shows the stream as its only unfinished request.--timeoutcannot fix it: with the budget,--timeout=15000and--timeout=3000hang the same way; without the budget, the DOM is dumped at the load event, and the Requirements table was missing in one of two runs.What behaves differently
the page was still loading after 27 s; this is how headless Chromium had rendered it by then.even rendered, the page holds only N words; its content may load later than the render waits, or come from an API the page calls.Browser.close. The headless shell often takes 10 s more to exit.The Decision Log entry in the design lists the alternatives rejected:
--timeout, a WebSocket driver on a port, Playwright, unsticking the clock through the proxy or the Fetch domain, network idle, and a second render.Verification
cd web/clipper && npm test: 0 skipped (Chromium present), including the egress trap test at 0 TCP connections and 0 UDP packets.test/fixtures/fake-chrome.mjs), so they also run in CI: a reply and its event arriving in one read, a page that never spends its budget, a failed navigation, a browser that cannot start.--refresh, words (seconds):aws >= 5.0, "still loading" note (28.8)bash web/tests/run.shpasses locally: 135 clipper tests (0 skipped, Chromium present), the bundle check, 53 mod tests, 55 eval tests.What the rebase changed
extractPage. The thin note now also rides on a markdown stub that stays because its HTML page, even rendered, is thin. That is web: markdown stubs give way to the HTML page; dates that are data survive extraction (board #129, #131) #376's rule that any rendering note goes along with the stub.Boundary.renderDomhands it to the proxy exactly as before. A new real-Chromium test checks that a rendered page requests nothing from a host onWEB_DENY_HOSTS, even oneWEB_ALLOW_HOSTSexempts. With the deny list dropped, the test fails.Residue (not in this PR)
web-clipper-fixesownsextract.ts.Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)