Skip to main content

Module progress

Module progress 

Source
Expand description

The workflow.progress_counters planner: coordinates a batch/job’s counter, status, and completion columns so every row tells one coherent lifecycle story — succeeded + failed = processed, pending = total - processed, and a completed row is fully processed with a non-null completion timestamp.

§Total first, state second, exact partition third

Each row is built in three deterministic steps drawn from independent seed streams:

  1. TOTAL — the size of the batch (a fixed or uniform integer draw).
  2. STATE — the lifecycle state (complete, active, not_started), either fixed by the configured kind or sampled from a normalized mixture.
  3. PARTITION — the exact integer split of total into the counter columns. The split is pure integer arithmetic: processed is chosen for the state, pending = total - processed, and processed is apportioned into succeeded/failed (and, under allow_unclassified, an unclassified remainder) with the largest-remainder method so the parts sum to processed exactly — no float rounding drift can make the counters disagree.

§Owned columns and streams

The planner owns every column named under its columns: mapping; the model compiler turns those into ownership claims, so a colliding generator raises GEN-COLUMN-OWNER-CONFLICT. Each row draws its total, state, progress fraction, status pick, and completion offset from five separate stable streams, so a seeded run reproduces exactly regardless of which rows land in which state.

Structs§

ProgressCountersFactory
Factory for the workflow.progress_counters planner.

Statics§

WORKFLOW_PROGRESS_COUNTERS_DESCRIPTOR
Static description of the workflow.progress_counters planner.