Skip to main content

Module scratch

Module scratch 

Source
Expand description

Scratch-tab recover-once wrapper. The architectural answer to the iLO failure mode: lock-free ops (eval, fetch with no explicit tab) run against a daemon-style scratch tab tracked in the scratches SQLite row, not against the user’s first page.

Two reasons this is enough:

  1. The scratch tab is daemon-owned about:blank. It can’t be the weird-renderer that won’t service Runtime.evaluate, because we created it for that purpose. If the user has an iLO admin tab open, nothing routes there by default.
  2. If the scratch tab itself goes bad (browser restarted between invocations and the cached target_id is stale; or a previous op legitimately wedged the renderer), the wrapper closes+recreates the scratch and retries the op once before escalating typed errors. This implements the “always proceed” rule on the direct path.

Functions§

with_scratch_recovery
Run op against the daemon-style scratch tab for browser_name, with one round of recover-and-retry on tab failures.