fix(standards): say why the base-SHA fetch failed, not just that it did - #166
Merged
Merged
Conversation
The fallback warning discarded git's stderr (2>/dev/null), so a run that fell back to a whole-repo sweep reported THAT it happened and never WHY. That turns a diagnosable fault into a rate you can only sample. Capture stderr into the same command substitution that gates the branch, and append it to the annotation collapsed to a single line. `fetch_err=$(...)` as an `if` condition is exempt from `set -e`, so a failed fetch still takes the else branch rather than aborting the step. Validated against a known-bad case (an unreachable SHA with no origin): the warning carries "fatal: 'origin' does not appear to be a git repository ..." and the script reaches its end with rc=0. Found while re-measuring the fallback rate, which turned out to be zero (smartwatermelon/dev-env#121). This is the one real gap that survived that correction; it is a diagnostics fix, not a W3 blocker. Claude-Session: https://claude.ai/code/session_01ESsw699T54JHARkQXrdL3o
twistedmelonman
deleted the
claude/fix-fallback-diagnostics-64bcbc03
branch
September 11, 2026 18:30
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fallback warning discarded git's stderr (
2>/dev/null), so a run that fell back to a whole-repo sweep reported that it happened and never why. That turns a diagnosable fault into a rate you can only sample....and the else branch appends
git said: ${fetch_err}, collapsed to one line so the annotation stays readable.Why this is safe under
set -euo pipefailfetch_err=$(...)used as anifcondition is exempt from-e, so a failed fetch takes the else branch rather than aborting the step.Validated against a known-bad case rather than assumed — an unreachable SHA with no
originconfigured:Context
Found while re-measuring the fallback rate, which turned out to be zero rather than the previously reported ~27% (see smartwatermelon/dev-env#121). This is the one real gap that survived that correction. It is a diagnostics fix, not a W3 blocker.
Note on rollout
This does not reach any caller until
@standards-check-v1is moved to the merge commit — a deliberate manual step, not part of this PR.Checks
yamllintclean ·zizmorno findings · code-reviewer PASS · adversarial-reviewer PASShttps://claude.ai/code/session_01ESsw699T54JHARkQXrdL3o