You are given a single string that encodes an inventory log. Records are separated by semicolons (';'), and each record encodes an item name and an integer quantity separated by a single colon (':'), for example 'apple:3'.
Write a function parse_inventory(s) that parses the string in pure Python and returns a list of strings of the form 'name=total', where total is the summed quantity for each distinct name.
Rules:
- Records are separated by ';'. Empty records (produced by consecutive or trailing semicolons) must be ignored.
- Within a record, everything before the first ':' is the name; everything after it is the quantity value.
- If a record has no ':' (only a name), or the quantity portion is empty, treat its quantity as 0.
- Leading and trailing whitespace around a full record must be stripped, as well as around the name and quantity.
- A record whose name is empty after stripping must be ignored.
- Quantities for the same name are summed together.
- Return the results as a list sorted alphabetically by name.