v0.65.0: fix pool comments — queued legs count toward the pool even while their plane is in the shop (startRepair keeps the queue), so an all-repairing fleet only has no pools when its queues are empty too
CI / build + unit + e2e (pull_request) Failing after 16m24s

This commit is contained in:
2026-09-23 13:13:44 +00:00
parent 12d900b22a
commit 199704f761
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -51,8 +51,9 @@ export function parseIcaoQueue(raw: string | null): string[] {
}
// v0.65.0: the airports where a plane can take work — grounded there, flying TO it (its destination
// joins the pool while airborne), or queued for it. Repairing planes count nowhere: a fleet in the
// shop has no pools until one frees up. Shared by the snapshot's visibility filter and the engine's
// joins the pool while airborne), or queued for it (queued legs count even while their plane is in
// the shop — the work will be waiting at its next stop). A fleet fully repairing with empty queues
// has no pools until one frees up. Shared by the snapshot's visibility filter and the engine's
// pool spawner so both agree on exactly which airports keep open jobs.
export function poolAirports(planes: Array<{ status: string; locationIcao: string; destIcao: string | null; queue: string | null }>): Set<string> {
const set = new Set<string>();
+1 -1
View File
@@ -369,7 +369,7 @@ export async function spawnPoolPackages(
]);
const pool = poolAirports(planeRows);
if (pool.size === 0) return 0; // whole fleet repairing — nothing to spawn for until one frees up
if (pool.size === 0) return 0; // no pool airports — e.g. the whole fleet is in the shop with empty queues
const fc = await loadAirportsGeoJson();
const airports: SeedAirport[] = fc.features.map((f) => ({