Skip to content

backlog-burndown: the promotion fetch is not fail-closed, so a failed fetch silently reports nothing to promote #1310

Description

@ptr727

backlog-burndown "The Promotion Boundary" step 1 reads:

Open it whenever develop is ahead of main, which git fetch origin and then git rev-list --count origin/main..origin/develop answers ... Fetch first every time: a stale remote-tracking ref reports zero and the round would report nothing to promote while develop carries work.

The step names the hazard exactly and then does not close it. It requires the fetch to be run, not that it be checked. A fetch that fails leaves precisely the stale remote-tracking ref the sentence describes, git rev-list --count then answers from it, and a count of zero is the step's own "only case with nothing to promote", so the round reports nothing to promote and moves on. The failure is silent by construction: the wrong answer is a well-formed count rather than an error.

AGENTS.md already states the governing rule, in "Delegation": "Never let a fallback stand in for a failed command, since || echo '[]', || true, and 2>/dev/null convert an error into that same reading." A fetch whose exit status is never read is the same conversion by omission.

The fix is one clause: stop and report a failed fetch rather than running the comparison after one.

Raised by coderabbitai on the develop -> main promotion pull request #1304, and deferred there under the maintainer's instruction to merge the promotion and take the findings up afterwards.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    proseA defect in rule or procedure text

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions