Capped graph walks in code-analysis tools: cap the real fanout and always surface the cap
Pattern from building a 'who reads this signal' trace over an RTL design model: a breadth-first walk over every instance under a node, capped at N for safety, silently returned zero results on designs where unrelated sibling instances used up the budget (e.g. an interface next to a large DUT). Two lessons: (1) walk only along the actual connections that can carry the value (port/fanout edges), so the cap measures real fanout rather than design size; (2) any cap or budget that truncates results must be shown to the user (a 'results truncated' note in the panel) and covered by a test that forces it (e.g. 600 filler instances), otherwise a truncated list looks complete. A brute-force cross-check over the whole model (count expected reads independently, compare) is a cheap way to find missed edges such as a parent reading an interface signal directly.