Add async pipeline with progress monitoring, resumability, and result transparency
Pipeline engine rewritten with combo-first loop: each combination is processed through all requested passes before moving to the next, with incremental DB saves after every step (crash-safe). Blocked combos now get result rows so they appear in the results page with constraint violation reasons. New pipeline_runs table tracks run lifecycle (pending/running/completed/failed/ cancelled). Web route launches pipeline in a background thread with its own DB connection. HTMX polling partial shows live progress with per-pass breakdown. Also: status guard prevents reviewed->scored downgrade, save_combination loads existing status on dedup for correct resume, per-metric scores show domain bounds + units + position bars, ensure_metric backfills units on existing rows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -243,11 +243,11 @@ URBAN_COMMUTING = Domain(
|
||||
name="urban_commuting",
|
||||
description="Daily travel within a city, 1-50km range",
|
||||
metric_bounds=[
|
||||
MetricBound("speed", weight=0.25, norm_min=5, norm_max=120),
|
||||
MetricBound("cost_efficiency", weight=0.25, norm_min=0.01, norm_max=2.0),
|
||||
MetricBound("safety", weight=0.25, norm_min=0.0, norm_max=1.0),
|
||||
MetricBound("availability", weight=0.15, norm_min=0.0, norm_max=1.0),
|
||||
MetricBound("range_fuel", weight=0.10, norm_min=5, norm_max=500),
|
||||
MetricBound("speed", weight=0.25, norm_min=5, norm_max=120, unit="km/h"),
|
||||
MetricBound("cost_efficiency", weight=0.25, norm_min=0.01, norm_max=2.0, unit="$/km"),
|
||||
MetricBound("safety", weight=0.25, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
||||
MetricBound("availability", weight=0.15, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
||||
MetricBound("range_fuel", weight=0.10, norm_min=5, norm_max=500, unit="km"),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -255,11 +255,11 @@ INTERPLANETARY = Domain(
|
||||
name="interplanetary_travel",
|
||||
description="Travel between planets within a solar system",
|
||||
metric_bounds=[
|
||||
MetricBound("speed", weight=0.30, norm_min=1000, norm_max=300000),
|
||||
MetricBound("range_fuel", weight=0.30, norm_min=1e6, norm_max=1e10),
|
||||
MetricBound("safety", weight=0.20, norm_min=0.0, norm_max=1.0),
|
||||
MetricBound("cost_efficiency", weight=0.10, norm_min=1e3, norm_max=1e9),
|
||||
MetricBound("range_degradation", weight=0.10, norm_min=100, norm_max=36500),
|
||||
MetricBound("speed", weight=0.30, norm_min=1000, norm_max=300000, unit="km/s"),
|
||||
MetricBound("range_fuel", weight=0.30, norm_min=1e6, norm_max=1e10, unit="km"),
|
||||
MetricBound("safety", weight=0.20, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
||||
MetricBound("cost_efficiency", weight=0.10, norm_min=1e3, norm_max=1e9, unit="$/km"),
|
||||
MetricBound("range_degradation", weight=0.10, norm_min=100, norm_max=36500, unit="days"),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user