← Back to blog

· · Updated

Finding Related Bugs

Use authentication-error navigation to find sibling callers, preserve exceptions and verify a shared fix. A historical 33-site sweep is not today’s count.

When a defect comes from a repeated pattern, find every sibling caller first, then decide one by one which need the same repair. Searching broadens inspection; it does not justify replacing every match.

The example is navigation after an authentication failure. A historical repair swept 33 call sites in 20 files (the scope at the time, not today’s count) and converged on redirectOnAuthError in client-game/src/net/authRedirect.ts: 401 clears the stale session, then navigates to login with a return path; 403 with registration_required navigates to registration; 503, network failures and other errors return false for the caller’s normal error handling, without clearing the session. A caller returns when the helper returns true, avoiding a second generic error, while still releasing loading state; pages with bespoke 403 handling keep their existing order.

Exceptions belong in the contract: a boot-time session probe, invalid credentials on a login form and secondary requests that must not interrupt a live hand cannot all use the same navigation, and the helper’s comments record these boundaries. A change description can leave one reviewable line of scope, such as Sibling-grep: checked auth-gated catch sites; boot probes and in-hand side-fetches excluded. That is an inspection record, not machine proof; matching text can carry different business meaning, so the actual defect and important error paths still need reproducing in the browser.