Planes now wear out with distance and need maintenance:
Wear — each landed leg reduces health by WEAR_PER_KM × km (clamped at 0). Health is visible per plane in the Fleet list as an amber bar + % readout.
Broken — at health ≤ 0 the plane still flies but burns +50% fuel (BROKEN_BURN_MULTIPLIER, applied consistently at all five burn sites: dispatch feasibility, refuel requirement, landed fuel, auto-chain check, live in-flight gauge). A broken pill shows on the fleet row.
Repair — new POST /api/planes/{planeId}/repair: flat €1,500, restores health to 100 and grounds the plane as repairing for 3 sim days; a per-tick pass flips it back to service when the gate passes. in repair pill while grounded.
Schema: two new planes columns (health, nullable repair_until_sim_time) with guarded migrations; third status value 'repairing'. OpenAPI updated (14th endpoint, PlaneState fields) with all pins in lockstep. New test hook /api/test/set-health forces health / shortens the repair gate for e2e.
Unit: +16 tests (wear accumulation + clamp, broken-burn multiplier at engine level, repair cost/duration/unavailability/flip-back). E2e: new maintenance.spec.ts visible flow (42% → broken pill → ×1.5 landed fuel via real lib helpers → exact €1,500 drop → back to service); heal helpers in right-pane/two-planes/actions now restore health so accumulated wear can't strand the fragile feasibility pins.
Fixes #69
Planes now wear out with distance and need maintenance:
- **Wear** — each landed leg reduces `health` by `WEAR_PER_KM × km` (clamped at 0). Health is visible per plane in the Fleet list as an amber bar + % readout.
- **Broken** — at health ≤ 0 the plane still flies but burns **+50% fuel** (`BROKEN_BURN_MULTIPLIER`, applied consistently at all five burn sites: dispatch feasibility, refuel requirement, landed fuel, auto-chain check, live in-flight gauge). A `broken` pill shows on the fleet row.
- **Repair** — new `POST /api/planes/{planeId}/repair`: flat €1,500, restores health to 100 and grounds the plane as `repairing` for 3 sim days; a per-tick pass flips it back to service when the gate passes. `in repair` pill while grounded.
Schema: two new planes columns (`health`, nullable `repair_until_sim_time`) with guarded migrations; third status value `'repairing'`. OpenAPI updated (14th endpoint, PlaneState fields) with all pins in lockstep. New test hook `/api/test/set-health` forces health / shortens the repair gate for e2e.
Unit: +16 tests (wear accumulation + clamp, broken-burn multiplier at engine level, repair cost/duration/unavailability/flip-back). E2e: new `maintenance.spec.ts` visible flow (42% → broken pill → ×1.5 landed fuel via real lib helpers → exact €1,500 drop → back to service); heal helpers in right-pane/two-planes/actions now restore health so accumulated wear can't strand the fragile feasibility pins.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #69
Planes now wear out with distance and need maintenance:
healthbyWEAR_PER_KM × km(clamped at 0). Health is visible per plane in the Fleet list as an amber bar + % readout.BROKEN_BURN_MULTIPLIER, applied consistently at all five burn sites: dispatch feasibility, refuel requirement, landed fuel, auto-chain check, live in-flight gauge). Abrokenpill shows on the fleet row.POST /api/planes/{planeId}/repair: flat €1,500, restores health to 100 and grounds the plane asrepairingfor 3 sim days; a per-tick pass flips it back to service when the gate passes.in repairpill while grounded.Schema: two new planes columns (
health, nullablerepair_until_sim_time) with guarded migrations; third status value'repairing'. OpenAPI updated (14th endpoint, PlaneState fields) with all pins in lockstep. New test hook/api/test/set-healthforces health / shortens the repair gate for e2e.Unit: +16 tests (wear accumulation + clamp, broken-burn multiplier at engine level, repair cost/duration/unavailability/flip-back). E2e: new
maintenance.spec.tsvisible flow (42% → broken pill → ×1.5 landed fuel via real lib helpers → exact €1,500 drop → back to service); heal helpers in right-pane/two-planes/actions now restore health so accumulated wear can't strand the fragile feasibility pins.