Skip to content

Normalize checked ref races from observed posture #111

Description

@flyingrobots

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:storageStorage, Git objects, manifests, or persistencestatus:in-progressActively being workedtype:bugIncorrect behavior or regression

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions