Skip to main content
← Back to list
01Issue
FeatureOpenExtensionsPublicTeam
AssigneesNone

Relationships

#1775 Add typed read-only remote ref lookup to @swamp/git

Opened by jeremy · 8/21/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
OPENTRIAGEDIN PROGRESSSHIPPED

Open

8/21/2026, 9:14:14 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

jeremy commented 8/21/2026, 9:16:46 PM

meh, this was added by an slightly askew agent. Apologies. Feel free to ignore if it doesn't make sense.

Sign in to post a ripple.