Skip to content

git-ops routes agents to branch-audit, whose REVIEW bucket measured 88-91% false on two repos #2268

Description

@laurigates

git-plugin/agents/git-ops.md:170 tells agents "Prefer the encoded recipe" and routes them to just -g branch-audit. Ten lines below, the same file gives the correct manual fallback — MERGED PR is authoritative, then git cherry — and cites ~/.claude/rules/pr-merge-hazards.md #1 on tree-containment being a one-way signal.

The recipe did not implement that ladder. The agent's fallback was more correct than the tool it recommends.

Measured

Two independent repos, 2026-08-04:

Repo PRs Branches REVIEW rows Actually landed False
laurigates/claude-plugins 1881 517 191 174 91%
ForumViriumHelsinki/infrastructure 1684 536 245 216 88%

Zero regressions in the other direction (nothing classified MERGED that had not landed).

Two defects, both silent

  1. merge-tree used as the primary signal. pr-merge-hazards.md Add memory profiling configuration and CI workflows #1 explicitly corrects this: once the base drifts over the same files, the trees differ for work that fully landed. The recipe's own comment claimed merge-tree "survives squash-merge AND later drift" — directly contradicting the rule. 132 branches lost this way on claude-plugins.
  2. gh pr list --limit 500 on repos with 1881 and 1684 PRs. Any branch whose merged PR falls outside the window reads PR=— → "no merged PR" → REVIEW. 32 branches on claude-plugins, e.g. refactor(project-plugin): consolidate changelog review workflow #955 (Mar), ci(runners): migrate lightweight workflows to ubuntu-slim #885, chore(ci): standardize workflow display names with Domain: Action scheme #1203, docs(rules): apply Claude Code changelog review 2.1.76 → 2.1.138 #1301.

Neither surfaces as an error. The failure mode is a REVIEW bucket the user cannot trust, which pushes toward either keeping hundreds of dead branches or deleting them unexamined.

Fixed

private_dot_config/just/git.just (dotfiles) now checks in authority order — MERGED PR → git cherrymerge-tree (positive proof only) — with the PR window raised. Verified by diff-test against the old logic on infrastructure: 216 branches recovered from false REVIEW, no regressions.

The structural point

git-plugin routes agents to a recipe living in a private dotfiles repo. claude-plugins can neither version nor regression-test its own preferred path, and this defect sat behind a comment asserting the opposite of the rule the same repo ships. Worth deciding one of:

  • have git-ops.md state the authority ladder as the primary instruction and demote branch-audit to a convenience, or
  • vendor an equivalent script into scripts/ where regression-testing.md applies, or
  • accept the split and add a caveat at the recommendation site.

scripts/check-agent-tool-selection.sh and .claude/rules/regression-testing.md also reference branch-audit, so the coupling is wider than the one agent file.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggit-pluginGit plugin relatedsession-feedbackFeedback from session analysis

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions