def aggregate_by_key(records):
    result = {}
    for record in records:
        if 'key' in record and 'value' in record:
            key = record['key']
            value = record['value']
            if isinstance(value, (int, float)) and not isinstance(value, bool):
                result[key] = result.get(key, 0) + value
    return dict(sorted(result.items()))
