```python
"""Tape-measure spans: parse to inches, format canonically, and add."""

INCHES = {"yd": 36, "ft": 12, "in": 1}
ORDER = ("yd", "ft", "in")

def parse_span(text: str) -> int:
    if not isinstance(text, str) or not text:
        raise ValueError("text must be a non-empty string")
    
    parts = text.split()
    unit_counts = {unit: 0 for unit in ORDER}
    
    for part in parts:
        value, unit = part[:-2], part[-2:]
        if not value.isdigit():
            raise ValueError("value must be a non-negative integer")
        if unit not in INCHES:
            raise ValueError(f"unknown unit: {unit}")
        if unit_counts[unit] > 0:
            raise ValueError(f"repeated unit: {unit}")
        unit_counts[unit] += 1
    
    return sum(int(value) * INCHES[unit] for unit, value in zip(ORDER, reversed(parts)))

def format_span(inches: int) -> str:
    if isinstance(inches, bool) or not isinstance(inches, int) or inches < 0:
        raise ValueError("inches must be a non-negative integer")
    
    parts = []
    total_inches = inches
    
    for unit in ORDER:
        value, total_inches = divmod(total_inches, INCHES[unit])
        if value > 0:
            parts.append(f"{value}{unit}")
    
    return " ".join(parts) or "0in"

def add_spans(first: str, second: str) -> str:
    return format_span(parse_span(first) + parse_span(second))
```