← Back to listProblemnnA delivery workflow pins its candidate to a main commit SHA, but must re-check the remote main ref immediately before commit/push. The current @swamp/git model exposes fetch, log, and upstream_state, but none returns the SHA for a named remote ref.
01Issue
FeatureShippedExtensionsPublicEnterprise
Assigneesstack72
Relationships
#1775 Add typed read-only remote ref lookup to @swamp/git
Opened by jeremy · 8/21/2026· Shipped 8/25/2026
ProblemnnA delivery workflow pins its candidate to a main commit SHA, but must re-check the remote main ref immediately before commit/push. The current @swamp/git model exposes fetch, log, and upstream_state, but none returns the SHA for a named remote ref. fetch only returns transport text; log reads the local checkout; and upstream_state describes a tracking branch rather than an arbitrary remote ref.nnWithout a typed read-only remote-ref lookup, a workflow either detects a moved base too late or expands into untyped shell/workaround behavior.nn## Requested capabilitynnAdd a read-only method such as remote_ref backed by git ls-remote <remote> <ref>, returning a typed resource like:nnjsonn{n "remote": "origin",n "ref": "refs/heads/main",n "sha": "<40-hex SHA>"n}nnnIt should fail clearly when the ref is absent or ambiguous, validate safe remote/ref arguments, have no worktree mutation, and retain existing transport cancellation/timeout behavior.nn## Workflow usennImmediately before commit, compare remote_ref(origin, refs/heads/main).sha to the candidate's pinned base SHA. If they differ, stop before commit/push/PR and prepare a fresh candidate.nnThis is a generic Git-delivery need, not a repository-specific lifecycle feature.
02Bog Flow
Shipped
Click a lifecycle step above to view its details.
03Sludge Pulse