Mutation testing found it: changing the right child's `depth + 1` to `depth + 0` in the depth-first recursion survived the entire suite. The depth cap was only ever tested against a chain that leans left, so nothing said whether the right-hand descent counted at all -- a tree that goes right for a million nodes would have recursed until the process died, which is precisely what AKSL_TREE_MAX_DEPTH exists to prevent. The right-leaning chain is now tested in all three depth-first orders and breadth-first, which carries its depth on the queue entry instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
21 KiB
21 KiB