Add exclusive map ownership and capacity-aware autoscaling creation

This commit is contained in:
2026-10-06 22:59:17 -04:00
parent 36cf2b9c05
commit e012278bd9
17 changed files with 270 additions and 18 deletions
@@ -1,3 +1,4 @@
import { pauseScalingForOperation } from '../autoscaling/ownership.js';
import { db } from '../db/index.js';
import { ensureHostSchema } from '../hosts/schema.js';
import { recordProgress } from './progress.js';
@@ -21,6 +22,7 @@ export function cancelProvisioningJob(id: string, reason = 'Cancelled by operato
return db().transaction(() => {
if (provisioningCancelled(id)) return true;
if (!canCancelProvisioningJob(id)) return false;
pauseScalingForOperation(id);
const at = new Date().toISOString();
// Only commands never delivered can be withdrawn. Delivered commands retain
// their immutable IDs and receipts; replacements wait for their resolution.