Skip to content

feat(platform): web_fetch renders a page that needs a browser once, through the render lane #5183

Closed

Description

@tale-code-bot

Part 2 of #5036. The Coder split it off on TALE-219, following the triage decision on that task (2026-10-30). Part 1 is worked on TALE-219 and closes #5036 when it lands: web_fetch reads a page's main content, and explains a page it cannot read.

Summary

Chat's web_fetch reads a page with one plain HTTPS GET. Some pages have their content built in the browser by a script. That is a single-page-app shell, such as a ted.europa.eu notice (/<lang>/notice/-/detail/<id>). Such a page has no text to read this way.

After part 1, such a page fails with an explained "the page needs a browser" result, where today it was read as the site's chrome. This issue makes web_fetch read it.

What exists

  • The knowledge crawler's render lane, services/platform/backend/core/node_only/sandbox/render_fetch.ts (renderUrlsInSandbox).
    • It runs headless Chromium in an ephemeral sandbox session, one per batch.
    • Its sessions are ownerType: 'render' and count against the organization's render quota (RenderCapacityError when it is spent).
    • It uses the crawler's user agent and the egress proxy.
  • Part 1 adds services/platform/lib/knowledge/main-content.ts. It reaches feature-train with TALE-219.
    • readPageContent(html, pageUrl) returns the main content, the canonical URL and needsBrowser.
    • unreadablePage(status, text, needsBrowser) returns blocked, needs-browser, empty or null.
    • Together they tell which pages need rendering.

Proposed

  • Render once. When the plain GET's page is needs-browser, retry it once through the render lane and read the rendered HTML with readPageContent. The step says the page was rendered.
  • Quota. A render counts against the existing render quota.
  • When rendering fails. A spent quota, a failed render, or a page still empty after rendering returns part 1's explained failure, with the render's reason.
  • Guards. The SSRF and egress guards stay unchanged.
    • The plain GET (safeFetch and its redirect checks) still decides whether a page may be read at all.
    • The render lane keeps its own guards.
  • Blocked pages are not rendered. A site that refused the automated request (a bot check that lib/net/bot-check.ts names, or part 1's blocked: a 202 without the page) stays reported as blocking automated access. The render lane is not a way around a site's refusal.
  • Empty pages are not rendered. An empty page (no text, no scripts) has nothing for a browser to build.
  • No harness change. The harness bridge (workspace_tools_bridge.ts) has no web tools, and the harnesses deny their own (TALE-219's plan), so there is no second copy to change.

Done when

  • Part 1's recorded TED single-page-app shell (lib/knowledge/fixtures/) triggers exactly one render, and a recorded rendering of it yields the notice text.
  • A spent render quota, a failed render and a page still empty after rendering each yield an explained failure.
  • A bot-check answer, a blocked page and an empty page are not rendered.
  • Render use counts against the existing render quota, and the SSRF and egress guards are unchanged.

Depends on part 1 (TALE-219) being on feature-train: start from a train that has lib/knowledge/main-content.ts.

Activity

  1. added
    agent-ready
    on Oct 31, 2026
  2. added a commit that references this issue on Oct 31, 2026
    3c395f2
  3. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    CollaboratorAuthor

    Landed on release/0.6 with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit 36eae83 (feat(platform): render a page that needs a browser in chat web_fetch). It ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Task: TALE-274.

  4. 24 remaining items

  5. added 11 commits that reference this issue on Nov 4, 2026
    658fc7c
    8ccabd7
    54a1b87
    7f1d591
    4af6024
    0f58ec1
    93918e2
    66b76f0
    1134ea8
    f88b871
    52a56de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyfeat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions