Expand description
Git-remote Protocol impl for state-branch lifecycle pushes.
bl-2148 introduced this wire for the claim path: local claim
commit on balls/tasks must land on origin before the worktree
is created, with non-fast-forward rejections driving a
fetch + field-level merge + retry. bl-2bf7 generalizes it to
review and close — same wire, same retry-merge loop, only
post_merge’s claim-vs-lost ownership check is event-specific.
Wired in per event only when the corresponding
require_remote_on_<event> policy is true; otherwise the event
stays local-only. The propose-merge-retry primitive itself lives
in crate::negotiation; this module supplies the wire hooks and
push_claim / push_state_for wrappers.
The remote is resolved (not hardcoded) through the
per-clone/committed state_remote seam (bl-19aa); default
origin. This is where a client repo retargets balls/tasks at
a shared task hub.
Re-exports§
pub use crate::claim_push::push_state_classified;
Structs§
- GitRemote
Claim Protocol Protocolimplementation for the git-remote state-branch lifecycle push. One concrete struct serves every event because the wire is the samegit push <state_remote> balls/taskseither way; the only branching ispost_merge’s claim-only ownership check.remoteis resolved once at construction so every attempt in one negotiation targets a stable peer.- GitRemote
Participant - The git origin remote as a SPEC §5
Participant. Carries no wire state itself — the per-eventProtocolowns state for one negotiation. Subscriptions are caller-controlled:for_claim()is the bl-2148 shape (claim only);for_lifecycle(events)is the bl-2bf7 generalization for review and close. The caller’s policy resolution (per-eventrequire_remote_on_*plus non-stealth) is what decides whether to subscribe at all.
Enums§
- Synced
Claim Result - Outcome of the claim-sync negotiation.
Functions§
- push_
claim - Push the freshly-committed claim through
origin/balls/tasks. Caller has already (a) committed the claim locally on the state branch and (b) released no locks that the merge step needs. The negotiation runs through the SPEC §5Participantsurface so the claim path shares one set of semantics with future participants. - push_
state_ for - Push the freshly-committed state-branch transition for
eventthrough<state_remote>/balls/tasks. Required-policy generalization ofpush_claimfor review and close: same wire, same retry-merge loop, same unreachable-aborts-loud stance. Theerror_prefixis folded into theErrmessage so callers don’t all wrap the same way.