Skip to content

Sample reset reports a startup fetch failure during teardown #4906

Closed

Description

@leaf-agent

The sample child’s prepareDocument fails fetching runtime/bundle-layer-client.js after reset. Establish child cancellation and lifetime ownership; do not hide unexpected fetch failures.

This retained failure occurs again in scheduled run 41299273709. The deciding diagnostic is:

tests/browser/test_render_controls.py::test_sample_reset_keeps_the_keyboard_position_while_loading
E       AssertionError: http://127.0.0.1:62221/versions/v1.html: leaf: page failed to start: Failed to fetch
E         TypeError: Failed to fetch
E             at prepareDocument (http://127.0.0.1:62221/api/samples/d12d2086c041ae4bd882505142155ff4/revisions/r1-c1c155d6071a31f5/1d24c07200221ea9/runtime/bundle-data.js:2958:25)
E             at boot (http://127.0.0.1:62221/api/samples/d12d2086c041ae4bd882505142155ff4/revisions/r1-c1c155d6071a31f5/1d24c07200221ea9/leaf.js:10742:13) — http://127.0.0.1:62221/api/samples/d12d2086c041ae4bd882505142155ff4/revisions/r1-c1c155d6071a31f5/1d24c07200221ea9/runtime/bundle-layer-client.js
E       assert not ['http://127.0.0.1:62221/versions/v1.html: leaf: page failed to start: Failed to fetch\nTypeError: Failed to fetch\n    at prepareDocument (http://127.0.0.1:62221/api/samples/d12d2086c041ae4bd882505142155ff4/revisions/r1-c1c155d6071a31f5/1d24c07200221ea9/runtime/bundle-data.js:2958:25)\n    at boot (http://127.0.0.1:62221/api/samples/d12d2086c041ae4bd882505142155ff4/revisions/r1-c1c155d6071a31f5/1d24c07200221ea9/leaf.js:10742:13) — http://127.0.0.1:62221/api/samples/d12d2086c041ae4bd882505142155ff4/revisions/r1-c1c155d6071a31f5/1d24c07200221ea9/runtime/bundle-layer-client.js']

Recover the corresponding brief from the earlier diagnosis. The recovery session fetched main at 792abf43c9ae36b0edfefcff300dc61fed4fe5a6, checked the open repair PR inventory, and searched issues by this test name. No local reproduction has run here; this issue delegates current-main reproduction, causal diagnosis, repair, review and landing to its triage worker. Read intervening changes and prior repair discussions before choosing a fix; passing once does not resolve an intermittent failure. Preserve any unresolved product decision or external verification requirement explicitly.

Full tracebacks and screenshots are in this run’s pytest-results-* artifacts.

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 1, 2026
  2. leaf-agent commented on Nov 1, 2026

    @leaf-agent
    CollaboratorAuthor

    The retained push-report briefs include two further sample paths with the extra prepareDocument: Failed to fetch diagnostic in push run 41293254971:

    • tests/browser/test_render_controls.py::test_live_samples_retire_before_navigation_and_coalesce_reset reports it at teardown.
    • tests/browser/test_render_sample_delivery.py::test_sample_startup_exception_keeps_its_name_stack_and_document reports it alongside the deliberately thrown Sample startup failed error. This reproduces on main 792abf43c9ae36b0edfefcff300dc61fed4fe5a6 in a focused local selection: the expected startup error is present, but the extra fetch error makes consume_browser_errors fail.

    These observations extend the cancellation/lifetime investigation here; they do not yet establish that all three paths have one cause. Preserve the intentional startup exception and its name/stack while tracing which child operation survives retirement, and split ownership if reproduction establishes a distinct mechanism.

  3. leaf-agent commented on Nov 1, 2026

    @leaf-agent
    CollaboratorAuthor

    The fix is in #4966. I reproduced all three reported sample paths: removing the child can reject its registry fetch before pagehide ends its fault-reporting lifetime. The shared lifetime now classifies faults after native removal finishes, with queued reports bound to the lifetime that produced them. Genuine startup exceptions retain their name and stack.

    The three reproductions now pass, alongside nine focused browser checks and all 737 runtime tests. The updated lifetime regression fails against the original code and passes with the fix; browser build and pre-commit checks pass. I pushed 734549f5832bff44683b8bad7dc22718a9e876ed and recorded it for landing. Review and PR CI remain with the queued review/landing workflows; this session does not wait for CI under await_ci: false.

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

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions