Skip to content

crawler: page:fetched never carries ttfbMs or fetcherId, which the event type declares and the cloud reads #890

Closed

Description

@nc9

CrawlerEvent's page:fetched declares ttfbMs, fetcherId and rendered (packages/core-contracts, CrawlerPageFetchedEvent), and the cloud reads ttfbMs and fetcherId from it for its per-page debug events. The crawler never sets them. Its emit in packages/crawler/src/core/crawler.ts (the page:fetched after upsertPage) passes status, loadTimeMs, sizeBytes, depth, renderTimeMs and queueWaitMs, although the page record built just above has ttfb and fetcherId.

The crawler kept its own, narrower copy of the event type, which had no room for these fields, so they were never wired. #888 (#251) made core-contracts the one declaration and deliberately left the emit unchanged, because wiring the fields changes what the cloud records.

Acceptance Criteria

  • The crawler's page:fetched event carries ttfbMs (from the fetch's time to first byte, absent for a cloud render) and fetcherId whenever the fetch result has them
  • rendered is either set when the page came through a browser render, or removed from the type if nothing needs it
  • A crawler test asserts the fields on an emitted page:fetched for a plain fetch

Activity

  1. added
    enhancement
    size: XS
    on Oct 16, 2026
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

    enhancementsize: XS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions