Finish autoscaling diagnostics and document pilot rollout

This commit is contained in:
2026-10-06 23:18:39 -04:00
parent e271f31325
commit a61eccaed6
10 changed files with 135 additions and 26 deletions
+2
View File
@@ -81,6 +81,7 @@ it('revokes a delivered removal on policy pause without claiming it was undone',
expect(s.authorization.claimRemovalAuthorization(s.hostId, command.id, command.payload).authorized).toBe(false);
expect(s.db().prepare('SELECT owns_map FROM autoscaling_policies').get()).toEqual({ owns_map: 1 });
expect(s.db().prepare('SELECT state FROM server_deployments WHERE id=?').get(s.operationId)).toEqual({ state: 'running' });
expect(s.scaling.scalingReport().policies[0]).toMatchObject({ ownsMap: true, unsettled: [{ id: s.operationId, state: 'running' }] });
});
it('withdraws undelivered commands and reconciles invalidation without a retry or failure pause', async () => {
@@ -88,6 +89,7 @@ it('withdraws undelivered commands and reconciles invalidation without a retry o
s.scaling.setScalingGlobalPause(true);
expect(s.db().prepare('SELECT state FROM ec_host_operations WHERE id=?').get(command.id)).toEqual({ state: 'failed' });
await s.processProvisioning(); await s.scaling.runAutoscaling();
expect(s.db().prepare('SELECT state FROM server_deployments WHERE id=?').get(s.operationId)).toEqual({ state: 'cancelled' });
expect(s.scaling.getScalingPolicy(s.policy.id)?.pausedReason).toBeNull();
expect(s.db().prepare('SELECT COUNT(*) AS n FROM autoscaling_decisions WHERE resolved=0').get()).toEqual({ n: 0 });
});