Repository navigation
Conversation
…2306 Signed-off-by: Nik Cubrilovic <[email protected]>
…2306 Signed-off-by: Nik Cubrilovic <[email protected]>
This branch has not been deployed
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.
Closes #2306
--render-cdp <url>and[render] cdp_urlrender pages in a Chrome the user runs, over the DevTools Protocol. Newcdp-renderDocumentFetcher inpackages/fetchers(no new dependency: JSON over the runtime's WebSocket), wired in the audit controller;autoreusescreateHybridDocumentFetcher.Acceptance criteria
--render-cdp <endpoint> --render-mode allrenders every crawled HTML page and the report marks it rendered. Evidence: live run ofsquirrel auditagainst a fake CDP browser, signed out:render: {requested:true, mode:"all", pagesRendered:2}, stored pagesfetcher_id = cdp-render; unit test "returns the rendered DOM with the main document's status, headers and redirect chain".auto: only client-rendered shells open in the browser. Live run: browser visited only/a(the shell),mode:"auto"; test "renderStrategy auto is the HTTP-first hybrid".fallbackReason: "Chrome endpoint unreachable (connection refused)", 0 of 2 rendered, console line "Local browser rendering fell back to plain HTTP (...)"; test "goes to plain HTTP for the whole run, once and with the reason".respect_robotsdefaults to false, so a robots-disallowed page is crawled in plain HTTP too; with it on, the crawler skips it before the fetcher.--render-cdpwith--httprefused ("--render-cdp and --http cannot be combined"); also refused with--renderand--render-mode off. Test: "validateAuditFlags with --render-cdp".docs/guides/browser-rendering.mdx(new section),docs/cli/audit.mdx,docs/configuration/index.mdx.Also: per-page failure, timeout, bot wall (401/403/429/503) and non-HTML fall back to plain HTTP; non-public hosts no longer turn rendering off when a local Chrome is set; shell completions updated; changelog entry added.
Verification (run in foreground)
bun scripts/changelog.ts checkOK;scripts/test-suites.ts --checkOK;make validatein docs/ OK (78 pass);bun run docs:checkOK.--run rest3978 pass 0 fail;--run cli4682 pass, 14 skip, 0 fail. New tests:packages/fetchers/src/cdp-render.test.ts(10),apps/cli/tests/controllers/render-cdp-2306.test.ts(14).Agent skill: the squirrelscan skill may want a line about
--render-cdp; a skills issue is for the maintainer to file.