```python
def chain_of_command(root: dict, person: str) -> list:
    """Walks the org chart from root to find the path to the given person."""
    if not isinstance(person, str) or len(person) == 0:
        raise ValueError("person must be a non-empty string")
    
    # Validate root structure
    if not isinstance(root, dict):
        raise ValueError("root must be a dict")
    if 'name' not in root or 'reports' not in root:
        raise ValueError("root must have 'name' and 'reports' keys")
    
    name = root['name']
    if not isinstance(name, str) or len(name) == 0:
        raise ValueError("Node name must be a non-empty string")
    
    if not isinstance(root['reports'], list):
        raise ValueError("reports must be a list")
        
    # BFS/DFS to find path and check for duplicates/missing
    # We need to track visited nodes by identity to detect cycles/duplicates
    # However, the problem says "found more than once" is an error.
    # This implies the structure is a tree (or DAG without re-entrancy causing multiple paths to same node).
    # If a node appears twice, it's an error.
    
    queue = [(root, [name])]
    visited_ids = {id(root)}
    
    while queue:
        current, path = queue.pop(0)
        current_name = current['name']
        
        if current_name == person:
            return path
        
        for report in current['reports']:
            if not isinstance(report, dict):
                raise ValueError("Report must be a dict")
            if 'name' not in report or 'reports' not in report:
                raise ValueError("Report must have 'name' and 'reports' keys")
                
            r_name = report['name']
            if not isinstance(r_name, str) or len(r_name) == 0:
                raise ValueError("Report node name must be a non-empty string")
            
            if not isinstance(report['reports'], list):
                raise ValueError("Report's reports must be a list")
                
            # Check for duplicate node identity (cycle or shared node)
            if id(report) in visited_ids:
                raise ValueError("Duplicate node found in chart")
            
            visited_ids.add(id(report))
            queue.append((report, path + [r_name]))
            
    raise ValueError(f"Person '{person}' not found in chart")


def headcount(root: dict) -> int:
    """Returns the total number of people in the organisation chart."""
    if not isinstance(root, dict):
        raise ValueError("root must be a dict")
    if 'name' not in root or 'reports' not in root:
        raise ValueError("root must have 'name' and 'reports' keys")
        
    name = root['name']
    if not isinstance(name, str) or len(name) == 0:
        raise ValueError("Node name must be a non-empty string")
        
    if not isinstance(root['reports'], list):
        raise ValueError("reports must be a list")
        
    count = 1  # Count the root
    
    def count_nodes(node):
        nonlocal count
        for report in node['reports']:
            count += 1
            count_nodes(report)
            
    count_nodes(root)
    return count


def widest_team(root: dict) -> int:
    """Returns the largest count of direct reports any single person has