close guardrail gaps and fix the scoring pipeline top to bottom
Constraint resolver: aggregate mass/footprint across a combo instead of pairwise-only checks, treat medium/atmosphere as agreement not supply/demand, reduce multi-provider checks by best/sum instead of AND-ing every provider, fail closed on unrecognized mutex values, add a propulsion-viability (thrust-to-weight) rule. Seed data updated to match (nuclear/solar-sail footprint floors, water-medium exclusions, explicit ground/gravity providers). Domain metric units were stored globally per metric name instead of per-domain, silently corrupting cost_efficiency for every domain but the first one seeded — fixed with a schema migration. Stub estimator's cost_efficiency/safety/availability/reliability were a backwards formula and flat constants; replaced with heuristics grounded in each entity's thrust_profile/energy_form/infrastructure. LLM estimate_physics() now receives each metric's unit and expected range instead of a bare name, fixing wildly miscalibrated estimates traced back to the prompt's own hardcoded example anchoring the model to the wrong order of magnitude. Sharpened the safety-estimation and plausibility-review prompts. Deduped provider parsing logic into llm/parsing.py. Web pipeline form can now pick an LLM provider per run instead of only via server env var. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,9 @@ GROUND_PLATFORMS: list[Entity] = [
|
||||
description="Generic wheeled road vehicle — from motorcycles to trucks",
|
||||
dependencies=[
|
||||
Dependency("environment", "ground_surface", "true", None, "requires"),
|
||||
Dependency("environment", "ground_surface", "true", None, "provides"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "50", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "0.5", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "36000", "kg", "range_max"),
|
||||
@@ -30,7 +32,9 @@ GROUND_PLATFORMS: list[Entity] = [
|
||||
description="Small human-scale vehicle — bicycles, skateboards, wheelchairs",
|
||||
dependencies=[
|
||||
Dependency("environment", "ground_surface", "true", None, "requires"),
|
||||
Dependency("environment", "ground_surface", "true", None, "provides"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "3", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "0.3", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "60", "kg", "range_max"),
|
||||
@@ -45,7 +49,9 @@ GROUND_PLATFORMS: list[Entity] = [
|
||||
description="Rail-guided vehicle — from trams to high-speed trains",
|
||||
dependencies=[
|
||||
Dependency("environment", "ground_surface", "true", None, "requires"),
|
||||
Dependency("environment", "ground_surface", "true", None, "provides"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "200", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "20", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "40000", "kg", "range_max"),
|
||||
@@ -67,6 +73,7 @@ WATER_PLATFORMS: list[Entity] = [
|
||||
dependencies=[
|
||||
Dependency("environment", "water_surface", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "2000", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "2", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "100000", "kg", "range_max"),
|
||||
@@ -81,6 +88,7 @@ WATER_PLATFORMS: list[Entity] = [
|
||||
dependencies=[
|
||||
Dependency("environment", "water_surface", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "200", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "20", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "10000", "kg", "range_min"),
|
||||
@@ -101,6 +109,7 @@ AIR_PLATFORMS: list[Entity] = [
|
||||
dependencies=[
|
||||
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "500", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "10", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "100000", "kg", "range_max"),
|
||||
@@ -108,6 +117,7 @@ AIR_PLATFORMS: list[Entity] = [
|
||||
Dependency("infrastructure", "runway", "true", None, "requires"),
|
||||
Dependency("environment", "medium", "air", None, "requires"),
|
||||
Dependency("physical", "energy_density", "1440000", "J/kg", "range_min"),
|
||||
Dependency("physical", "min_effective_accel", "2.0", "m/s²", "range_min"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
@@ -117,12 +127,14 @@ AIR_PLATFORMS: list[Entity] = [
|
||||
dependencies=[
|
||||
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "20", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "0.5", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "5000", "kg", "range_max"),
|
||||
Dependency("physical", "mass", "1", "kg", "range_min"),
|
||||
Dependency("environment", "medium", "air", None, "requires"),
|
||||
Dependency("physical", "energy_density", "720000", "J/kg", "range_min"),
|
||||
Dependency("physical", "min_effective_accel", "10", "m/s²", "range_min"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
@@ -132,6 +144,7 @@ AIR_PLATFORMS: list[Entity] = [
|
||||
dependencies=[
|
||||
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "1000", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "50", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "20000", "kg", "range_max"),
|
||||
@@ -139,21 +152,6 @@ AIR_PLATFORMS: list[Entity] = [
|
||||
Dependency("environment", "medium", "air", None, "requires"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
name="Glider",
|
||||
dimension="platform",
|
||||
description="Unpowered fixed-wing aircraft — sailplanes, hang gliders, paragliders",
|
||||
dependencies=[
|
||||
Dependency("environment", "atmosphere", "standard", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("physical", "footprint", "20", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "5", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "600", "kg", "range_max"),
|
||||
Dependency("physical", "mass", "5", "kg", "range_min"),
|
||||
Dependency("infrastructure", "tow_or_winch", "true", None, "requires"),
|
||||
Dependency("environment", "medium", "air", None, "requires"),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -172,6 +170,7 @@ SPACE_PLATFORMS: list[Entity] = [
|
||||
Dependency("infrastructure", "launch_facility", "true", None, "requires"),
|
||||
Dependency("environment", "medium", "space", None, "requires"),
|
||||
Dependency("physical", "energy_density", "7200000", "J/kg", "range_min"),
|
||||
Dependency("physical", "min_effective_accel", "0", "m/s²", "range_min"),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -185,7 +184,9 @@ MULTI_PLATFORMS: list[Entity] = [
|
||||
dimension="platform",
|
||||
description="Vehicle capable of operation on land, water, or both",
|
||||
dependencies=[
|
||||
Dependency("environment", "ground_surface", "true", None, "provides"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "100", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "5", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "10000", "kg", "range_max"),
|
||||
@@ -198,24 +199,15 @@ MULTI_PLATFORMS: list[Entity] = [
|
||||
# ── Platforms — Fictional / Speculative ─────────────────────────
|
||||
|
||||
FICTIONAL_PLATFORMS: list[Entity] = [
|
||||
Entity(
|
||||
name="Teleporter",
|
||||
dimension="platform",
|
||||
description="Hypothetical matter transmission device",
|
||||
dependencies=[
|
||||
Dependency("physical", "footprint", "10", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "1", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "0", "kg", "range_min"),
|
||||
Dependency("infrastructure", "teleport_network", "true", None, "requires"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
name="Hyperloop",
|
||||
dimension="platform",
|
||||
description="Sealed low-pressure tube with passenger pods at near-sonic speed",
|
||||
dependencies=[
|
||||
Dependency("environment", "ground_surface", "true", None, "requires"),
|
||||
Dependency("environment", "ground_surface", "true", None, "provides"),
|
||||
Dependency("environment", "gravity", "true", None, "requires"),
|
||||
Dependency("environment", "gravity", "true", None, "provides"),
|
||||
Dependency("physical", "footprint", "50", "m²", "range_max"),
|
||||
Dependency("physical", "footprint", "5", "m²", "range_min"),
|
||||
Dependency("physical", "mass", "20000", "kg", "range_max"),
|
||||
@@ -264,6 +256,7 @@ COMBUSTION_ACTUATORS: list[Entity] = [
|
||||
Dependency("physical", "mass", "200", "kg", "range_min"),
|
||||
Dependency("force", "thrust_profile", "extreme_continuous", None, "provides"),
|
||||
Dependency("force", "power_density", "5000", "W/kg", "provides"),
|
||||
Dependency("force", "specific_thrust", "50", "N/kg", "provides"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
@@ -368,9 +361,11 @@ ROCKET_ACTUATORS: list[Entity] = [
|
||||
description="Thrust from expanding combustion gases through a nozzle",
|
||||
dependencies=[
|
||||
Dependency("energy", "energy_form", "chemical_propellant", None, "requires"),
|
||||
Dependency("environment", "medium", "water", None, "excludes"),
|
||||
Dependency("physical", "mass", "150", "kg", "range_min"),
|
||||
Dependency("force", "thrust_profile", "extreme_burst", None, "provides"),
|
||||
Dependency("force", "power_density", "10000", "W/kg", "provides"),
|
||||
Dependency("force", "specific_thrust", "1500", "N/kg", "provides"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
@@ -384,6 +379,7 @@ ROCKET_ACTUATORS: list[Entity] = [
|
||||
Dependency("physical", "mass", "8", "kg", "range_min"),
|
||||
Dependency("force", "thrust_profile", "continuous_low", None, "provides"),
|
||||
Dependency("force", "power_density", "30", "W/kg", "provides"),
|
||||
Dependency("force", "specific_thrust", "0.01", "N/kg", "provides"),
|
||||
],
|
||||
),
|
||||
Entity(
|
||||
@@ -396,6 +392,7 @@ ROCKET_ACTUATORS: list[Entity] = [
|
||||
Dependency("physical", "footprint", "20", "m²", "range_min"),
|
||||
Dependency("force", "thrust_profile", "extreme_continuous", None, "provides"),
|
||||
Dependency("force", "power_density", "50", "W/kg", "provides"),
|
||||
Dependency("force", "specific_thrust", "200", "N/kg", "provides"),
|
||||
Dependency("material", "radiation_shielding", "true", None, "requires"),
|
||||
],
|
||||
),
|
||||
@@ -411,6 +408,7 @@ EXOTIC_ACTUATORS: list[Entity] = [
|
||||
description="Propulsion via sequential cannon blasts",
|
||||
dependencies=[
|
||||
Dependency("energy", "energy_form", "chemical_explosive", None, "requires"),
|
||||
Dependency("environment", "medium", "water", None, "excludes"),
|
||||
Dependency("physical", "mass", "80", "kg", "range_min"),
|
||||
Dependency("force", "thrust_profile", "high_burst", None, "provides"),
|
||||
Dependency("force", "power_density", "3000", "W/kg", "provides"),
|
||||
@@ -836,6 +834,7 @@ def load_transport_seed(repo) -> dict:
|
||||
# Backfill metric units and lower_is_better on existing DBs.
|
||||
for mb in domain.metric_bounds:
|
||||
repo.ensure_metric(mb.metric_name, unit=mb.unit)
|
||||
repo.backfill_metric_unit(domain.name, mb.metric_name, mb.unit)
|
||||
if mb.lower_is_better:
|
||||
repo.backfill_lower_is_better(domain.name, mb.metric_name)
|
||||
# Backfill domain constraints
|
||||
|
||||
Reference in New Issue
Block a user