Back to Documentation Hub
Execution Engine

Safe Sequence Mode

The verified automation workflow designed specifically to prevent gaps and broken continuity in multi-shot storyboard sequences.

Why Safe Sequence Mode Exists

Standard browser automation tools rely on static timer delays (e.g., "wait 30 seconds, then send next prompt"). If Google Flow takes 35 seconds to render an image due to cloud traffic, or if a content policy filter rejects the prompt, a timer-based tool blind-fires the next prompt.

This leads to out-of-sync frames, missed scenes, and ruined storyboards. Safe Sequence Mode replaces timer guesses with deterministic DOM feedback loops.

How Verification Works (Under the Hood)

Phase 1: Pre-Execution Snapshot

Before dispatching keystrokes into ProseMirror, Flowmator executes an inspection function in Google Flow's world: 'MAIN':

const mediaIds = Array.from(document.querySelectorAll('img[data-media-id], img.image'))
  .map(img => img.getAttribute('data-media-id') || img.src);
const errorTiles = document.querySelectorAll('flow-error-tile, .error-tile');
          
Phase 2: Active Polling Loop

Flowmator polls every 1,500 milliseconds for up to 90 seconds. On each tick, it tests two conditions:

  • Condition A (Failure): If currentErrorTiles.length > beforeErrorCount, generation is marked as failed and the error text is extracted from .error-message-text.
  • Condition B (Success): If an image tile appears with natural dimensions > 150px and a previously unseen media ID, generation is confirmed.
Phase 3: Rate-Limit Recovery & Sequence Protector

If Google Flow displays a rate-limit notice:

  1. Flowmator enters a 12-second cool-off countdown to let Google cloud allocations reset.
  2. It increments the prompt's attempt counter and re-injects the same prompt.
  3. If retries reach the ceiling (default 2), the Sequence Protector engages: the queue halts, an audio chime sounds, and you are prompted to Retry, Edit, or Skip.

Recommended Settings for Storyboarders

Auto-Retries on Error2 Retries

Sufficient to overcome temporary cloud blips without infinite loops.

Rate-Limit Cool-off12–15 Seconds

Optimal window for Google's API bucket replenishments.

Post-Gen Pause6 Seconds

Prevents instant back-to-back submissions that trigger anti-bot flags.