Current behavior
GitRefAdapter.deleteRef() recognizes a failed checked git update-ref as a conflict only when human-readable Git diagnostics contain one of a fixed set of English phrases. A checked-delete race can therefore leak a raw plumbing error when stderr is empty or varies by Git version. anchorRef() has the same diagnostic-text dependency, and updateRef() does not normalize post-probe compare-and-swap races.
Expected behavior
After a checked ref mutation fails, classify the result from structured post-failure ref posture: symbolic target, direct OID, or absence. Return or throw the existing conflict contract when the observed posture disproves the attempted precondition. Preserve the original operational error when the posture does not prove a conflict. Do not classify by English stderr.
Evidence
src/infrastructure/adapters/GitRefAdapter.js lines 171, 200, and 446 on e802269ab6035eae75c2d61a8e8a898800cffbb8
- A checked-delete race emitted a raw plumbing failure instead of
GIT_REF_CONFLICT when Git diagnostics did not match isUpdateRefConflict()
- Existing real-Git race coverage:
test/integration/cache-set.test.js
Area
storage
Suggested milestone
v6.5.6
Current behavior
GitRefAdapter.deleteRef()recognizes a failed checkedgit update-refas a conflict only when human-readable Git diagnostics contain one of a fixed set of English phrases. A checked-delete race can therefore leak a raw plumbing error when stderr is empty or varies by Git version.anchorRef()has the same diagnostic-text dependency, andupdateRef()does not normalize post-probe compare-and-swap races.Expected behavior
After a checked ref mutation fails, classify the result from structured post-failure ref posture: symbolic target, direct OID, or absence. Return or throw the existing conflict contract when the observed posture disproves the attempted precondition. Preserve the original operational error when the posture does not prove a conflict. Do not classify by English stderr.
Evidence
src/infrastructure/adapters/GitRefAdapter.jslines 171, 200, and 446 one802269ab6035eae75c2d61a8e8a898800cffbb8GIT_REF_CONFLICTwhen Git diagnostics did not matchisUpdateRefConflict()test/integration/cache-set.test.jsArea
storage
Suggested milestone
v6.5.6