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