def aggregate_by_key(records):
    aggregates = {}
    for record in records:
        if 'key' in record and 'value' in record:
            key = record['key']
            value = record['value']
            if isinstance(value, (int, float)):
                aggregates[key] = aggregates.get(key, 0) + value
    
    # Return a new dict sorted by keys
    sorted_keys = sorted(aggregates.keys())
    return {k: aggregates[k] for k in sorted_keys}
