Orbit: Reviewer recommendation queries silently undercount MR history through HAS_LATEST_DIFF traversal
Prompt: _"Suggest a reviewer for an MR touching app/services/base_service.rb in gitlab-org/gitlab, based on who has reviewed the most MRs touching that file in the last 90 days."_
session id: 3759758
Direct count query: `app/services/base_service.rb` has 80 MRs in its history. Reviewer recommendation query (run 30 min earlier): reported "\~12 MRs have ever touched it" and built reviewer ranking from that sample. Different traversal shape, \~85% data loss, no signal to user that the smaller sample was incomplete.
Likely cause: `HAS_LATEST_DIFF` only links MRs to their most recent diff. If an MR's most recent diff doesn't touch a file but an earlier diff did, the MR is invisible to any traversal starting from MergeRequestDiffFile and going through HAS_LATEST_DIFF. HAS_DIFF (which captures all diff revisions) appears to give complete coverage.
Impact: any agent-driven recommendation that traverses files → diffs → MRs is at risk of building on a small fraction of the actual history.
issue