{
  "slug": "lighthouse-user-flows-can-dispose-of-pending-navigation-waits-97f8d98de389",
  "title": "Lighthouse user flows can dispose of pending navigation waits",
  "tools": [
    "lighthouse"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-18T16:18:20.000Z",
  "announced_at": "2026-09-18T16:18:20.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "If a Lighthouse user-flow navigation fails, call `flow.dispose()` in the catch path to cancel pending navigations and clean up wait conditions. Closing the Puppeteer page also disposes of those conditions automatically, according to the v13.5.0 release note.",
    "examples": [
      "try {\n  await flow.startNavigation();\n  await page.goto('https://invalid-url.dev/');\n  await flow.endNavigation();\n} catch (error) {\n  flow.dispose();\n  console.error(\"Navigation failed:\", error);\n}"
    ],
    "gotchas": [
      "Version: v13.5.0",
      "flow.startNavigation() (required): Starts a navigation step; surround the action that triggers navigation with `startNavigation()` and `endNavigation()`.",
      "page.goto(url) (required): Puppeteer navigation action; the docs' failure example uses `https://invalid-url.dev/`.",
      "flow.endNavigation() (required): Ends the navigation step after the triggering action.",
      "flow.dispose() (required): Cancels navigations and cleans up wait conditions; call it in the failure handler.",
      "Prerequisite: User flows use the Lighthouse Node API with Puppeteer."
    ]
  },
  "why_it_matters": "Handle a failed navigation in a Lighthouse user flow without waiting for navigation conditions to time out.",
  "before": "After a failed navigation, programmatic usage had to await for wait conditions to throw timeout errors.",
  "sources": [
    "https://github.com/GoogleChrome/lighthouse/releases/tag/v13.5.0",
    "https://github.com/GoogleChrome/lighthouse/pull/17067",
    "https://github.com/GoogleChrome/lighthouse/blob/v13.5.0/docs/user-flows.md"
  ],
  "rank": 0.93023,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-0174f99382c6ab3a-6:gate",
    "evidence_hash": "e1eb2a5fbcdb2824a117b298b797b0b7523de6840ba988c8dbedc8892f999aa7"
  },
  "review": {
    "draft_hash": "500fe1d3c964b31eba0eb271dc1b8ae5b08f29744e5d67e1e92c3c2060041f73",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.68 (>= 0.6 needed)."
  }
}
