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:
- TOTAL — the size of the batch (a fixed or uniform integer draw).
- STATE — the lifecycle state (
complete,active,not_started), either fixed by the configured kind or sampled from a normalized mixture. - PARTITION — the exact integer split of
totalinto the counter columns. The split is pure integer arithmetic:processedis chosen for the state,pending = total - processed, andprocessedis apportioned intosucceeded/failed(and, underallow_unclassified, an unclassified remainder) with the largest-remainder method so the parts sum toprocessedexactly — 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§
- Progress
Counters Factory - Factory for the
workflow.progress_countersplanner.
Statics§
- WORKFLOW_
PROGRESS_ COUNTERS_ DESCRIPTOR - Static description of the
workflow.progress_countersplanner.