You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gain: RTK_DISABLED bypass warning counts commands the hook would not have rewritten anyway #4277
rtk gain's bypass warning — N commands (P%) used RTK_DISABLED=1 unnecessarily — run \rtk discover` for details— counts every line with a leadingRTK_DISABLED=assignment, whether or not the hook would have rewritten the command without it.rtk discover asks that question (would_be_covered_without_bypass, added in the #3206 review to avoid exactly this false advice); gain` does not.
check_rtk_disabled_bypass (src/analytics/gain.rs) calls cmd_has_rtk_disabled_prefix on whole, unsplit history lines and counts the match. For RTK_DISABLED=1 xargs -n1 git show it reports a bypass although removing the assignment recovers nothing, and the percentage it prints can be higher than anything rtk discover then shows "for details".
Pre-existing on develop (c75f1590).
Direction
Route gain's count through the same gate discover uses (split the chain, ask would_be_covered_without_bypass with the line minus the RTK_DISABLED= assignment), or compute the bypass count once and share it between both reports so they cannot disagree. The runtime #508 hint has the same shape (it fires for the xargs line above); whether it should defer to the same check is worth deciding alongside.
gain's RTK_DISABLED bypass count doesn't check would_be_covered_without_bypass like discover does, so it overcounts and can disagree with discover's percentage.
📁 Relevant files
src/analytics/gain.rs
Suggested Actions
Route check_rtk_disabled_bypass through the same would_be_covered_without_bypass gate as discover (src/analytics/gain.r…
Consider computing the bypass count once and sharing it between gain and discover to prevent future drift
Activity
rtk-wshm-sync-bot commentedon Sep 26, 2026
🔍 Automated Triage
bugmediumSummary
gain's RTK_DISABLED bypass count doesn't check would_be_covered_without_bypass like discover does, so it overcounts and can disagree with discover's percentage.
📁 Relevant files
src/analytics/gain.rsSuggested Actions
sudo RTK_DISABLED=1 …is not counted as a bypass whensudois a transparent prefix #3756, fix(discover): count sudo RTK_DISABLED=1 commands as bypass in analytics #3808 for a unified fixTriaged automatically by wshm · This is an automated analysis, not a human review.