Skip to main content

Module remote

Module remote 

Source
Expand description

Remote domain helpers: list/show assembly and pure push/pull orchestration.

  • List/show: pure report types and default-resolution for heddle remote list / heddle remote show.
  • Push/pull routing: capability → plan decisions (git-overlay mirror vs native fan-out, default thread selection).
  • Transport result fields (CLI maps wire/protobuf → plain structs) → PushExecutionFacts / PullExecutionFacts, multi-ref progress, and unstyled working/mirror/ref-list text. No hosted transport types here.
  • Typed outcomes, failure kinds (map to RecoveryAdvice kinds), multi-ref progress events, and unstyled human text assembly.
  • CLI probes the repo, plans, executes network I/O, maps failures, and styles.

Mutation (add/remove/set-default) and push/pull network bodies stay outside this module.

Modules§

remote_advice_kind
Stable RecoveryAdvice kind strings shared by domain failures and CLI.

Structs§

GitConfigContext
The resolved Git directory layout for a repository, used to read remote definitions from .git/config and its layered companions.
GitOverlayPushTracking
Tracking refresh facts after a git-overlay refs push (CLI-discovered).
GitRemoteConfigured
Git remote name/url pair for machine JSON (git_remote_configured).
GitUpstreamConfigured
Upstream branch binding for machine JSON (git_upstream_configured).
HostedPullResultFields
Caller-mapped hosted pull transport fields (no wire/protobuf types).
HostedPushResultFields
Caller-mapped hosted push transport fields (no wire/protobuf types).
IncludedGitRemoteConfigError
Error when a remote write would touch config outside the repo Git tree.
LocalTransferSummary
Local path transfer counts/SHAs after a successful single-thread push/pull.
PullOutcome
Machine JSON body for a successful pull.
PullOutcomeText
Unstyled human text derived from a PullOutcome.
PullPlan
Pure pull orchestration plan.
PullPlanRequest
Caller-supplied facts for pure pull planning.
PushOutcome
Machine JSON body for a successful (or partial) push.
PushOutcomeText
Unstyled human text derived from a PushOutcome.
PushPlan
Pure push orchestration plan. CLI resolves remotes/state then executes I/O.
PushPlanRequest
Caller-supplied facts for pure push planning (no repository I/O here).
RemoteInfo
One remote entry for list/show machine output.
RemoteListReport
Machine JSON for heddle remote list.

Enums§

HostedPullResult
Parsed hosted pull: final state string or typed PullFailure.
HostedPushPlan
Hosted/network push strategy for one push invocation.
HostedPushResult
Parsed hosted push: success state string or typed PushFailure.
MultiRefPushProgress
Progress facts for a multi-thread / multi-ref push fan-out (heddle#838).
PullExecutionFacts
Post-transport facts for assembling a PullOutcome (no network I/O).
PullFailure
Typed pull failure. Pure facts only; CLI maps to RecoveryAdvice.
PushExecutionFacts
Post-transport facts for assembling a PushOutcome (no network I/O).
PushFailure
Typed push failure. Pure facts only; CLI maps via PushFailure::advice_kind and field accessors into RecoveryAdvice.
PushPath
Execution path selected by plan_push.
RemotePreflightBlocker
Pure preflight refusals for push/pull orchestration.

Constants§

ALL_THREADS_MIRROR_COVERS_NOTE
Unstyled note when a single git-mirror transfer covers --all-threads (heddle#846 collapse: every ref ships in one pack, not a per-thread loop).
COMMITS_SEEN_SCOPE
Scope label for commits scanned during a git-overlay pull import.
FORCE_DISCARD_WARNING
Warning when a forced git-overlay push may discard remote-only history.
GIT_NOTES_REF
Stable notes ref published on the git-overlay refs push path.
GIT_NOTES_VISIBILITY_WARNING
Warning that ordinary git log --all may surface Heddle notes commits.
UNKNOWN_TRANSPORT_ERROR
Default message when a transport result omits or blanks its error string.

Functions§

all_threads_mirror_coverage_note
Pure force / all-threads display policy for network text mode after a successful single-shot push (mirror or native single-thread).
all_threads_uses_single_mirror_push
Whether a hosted --all-threads push collapses to a SINGLE mirror push instead of the per-thread native fan-out.
build_pull_outcome
Assemble a pull outcome from post-I/O facts (and optional plan context).
build_push_outcome
Assemble a push outcome from the orchestration plan and post-I/O facts.
default_pull_thread_name
Default remote thread name for a pull when the user omitted it.
default_push_thread_name
Default thread name for a push when the user omitted it.
first_multi_thread_push_failure
First multi-thread push failure as a typed PushFailure, if any.
format_connected_to
Unstyled “connected to …” line after a network session opens.
format_mirror_failure_text
Unstyled mirror failure line (primary push still succeeded).
format_mirror_success_text
Unstyled mirror success line (heddle#25 ad-hoc dual-push).
format_multi_ref_push_progress
Unstyled human line for a multi-ref progress fact (no TTY markers).
format_multi_thread_refs_detail
Unstyled detail line for landed multi-thread refs (refs: a, b), sorted.
format_pull_outcome_text
Assemble unstyled human text from a pull outcome.
format_pulling_from
Unstyled “pulling from …” working line.
format_push_outcome_text
Assemble unstyled human text from a push outcome.
format_pushing_to
Unstyled “pushing to …” working line.
format_ref_list
Comma-separated ref/thread list for multi-thread push reporting.
format_remote_state_detail
Unstyled remote-state detail field (remote state: {state}).
git_overlay_current_thread_push_ok
Whether a git-overlay current-thread refs push may target requested.
git_overlay_pull_execution_facts
Git-overlay pull / import execution facts.
git_overlay_push_execution_facts
Git-overlay refs push execution facts (local GitProjection path).
git_overlay_push_scope_description
Git-overlay scope description for text mode (matches historical CLI copy).
git_overlay_ref_scope
ref_scope machine label for git-overlay refs push.
git_overlay_thread_mismatch_blocker
Pure: git-overlay refs push refuses a non-attached explicit thread.
heddle_pull_execution_facts
Native heddle pull execution facts.
heddle_pull_execution_facts_from_hosted
Map hosted pull success fields + materialize change flag into pull facts.
heddle_pull_execution_facts_from_local
Map a local transfer summary into heddle pull execution facts.
heddle_single_push_execution_facts
Single-thread native push execution facts from state/object counts.
heddle_single_push_execution_facts_from_hosted
Map hosted push success fields into single-thread execution facts.
heddle_single_push_execution_facts_from_local
Map a local transfer summary into single-thread push execution facts.
hosted_path_contains_internal_user_namespace
Internal user-namespace segment that must not leak into operator text.
hosted_spool_display_path
Prefer namespace_slug/spool when the full path leaks an internal user ns.
included_config_error
Map a core included-config error into a plain anyhow so CLI call sites can attach recovery advice without depending on render types here.
is_native_transport_mismatch
Whether a push/pull plan should treat the remote as a native-transport mismatch (git local/url against a non-overlay Heddle repo).
list_plain_git_remotes
List remotes from a plain-Git worktree root (no Heddle metadata required).
list_remotes
List remotes for an opened Heddle repository (merged heddle + git-overlay).
local_pull_changed
Local-path pull change: tip moved or objects were copied.
looks_like_git_forge_remote
Whether a remote is a public Git forge (or otherwise unambiguously Git).
looks_like_git_remote_url
Whether a string looks like a Git remote URL rather than a Heddle remote name.
looks_like_known_git_host
Whether the authority of value is a well-known Git hosting hostname.
looks_like_remote_location
Whether a remote arg looks like a path/URL location (not a short remote name).
merged_remote_items
Merged remote map: name → (url, source label).
message_indicates_already_exists
Hosted error text that indicates the spool/repo already exists.
multi_ref_progress_from_hosted_thread
Map hosted per-thread push fields into a multi-ref progress event.
multi_ref_push_begin
Begin multi-ref fan-out progress for a display target.
multi_ref_thread_failed
Thread failure progress with normalized transport error text.
multi_ref_thread_succeeded_hosted
Hosted-path thread success progress (remote state when known).
multi_ref_thread_succeeded_local
Local-path thread success progress (state short + objects when known).
multi_thread_failed_names
Thread names reported as failed in a multi-thread push fan-out (order preserved).
multi_thread_push_execution_facts
Assemble multi-thread push execution facts: which refs landed vs failed.
multi_thread_reported_refs
Sorted list of refs/threads reported as successfully pushed (JSON contract).
named_thread_tip_mismatch_failure
Build a PushFailure::NamedThreadTipMismatch for the heddle#837 refuse path.
parse_hosted_pull_result
Parse hosted pull fields into final state or PullFailure.
parse_hosted_push_result
Parse hosted push fields into success state or PushFailure.
plain_git_remote_items
Remotes visible from plain-Git config layers under root.
plan_hosted_push
Plan the hosted/network push strategy for a capability + --all-threads.
plan_pull
Plan a pull from pure inputs. Composes transport + thread + dirty policy.
plan_push
Plan a push from pure inputs. Composes existing routing helpers.
pull_requires_clean_worktree
Dirty-worktree policy for pull: clean required on local git-overlay path or when the pull will materialize the current checkout.
pull_should_materialize
Whether a network pull should materialize the checkout after fetch.
pull_status
Machine status for pull: updated vs already up to date.
pull_tip_changed
Whether a pull tip moved: final_state differs from the pre-pull tip.
pull_will_materialize
Whether a pull would materialize into the current checkout.
push_scope_label
push_scope machine label for all-threads vs current-thread.
push_status
Machine status for push: full success vs partial multi-thread failure.
redact_internal_hosted_paths
Redact internal __users/ path segments from free-form hosted errors.
refuse_named_thread_tip_overwrite
Pure heddle#837 guard: refuse pushing the current checkout under an existing named thread whose tip differs, unless --force.
remote_missing_blocker
Pure: missing remote when the user omitted it and no default is configured.
remote_pull_failure
Build PullFailure::RemoteFailed from pull target + optional transport error.
remote_push_failure
Build PushFailure::RemoteFailed from a track name + optional transport error.
remote_urls_match
Compare remote URLs, allowing local path canonicalization when both exist.
resolve_default_push_remote_name
Resolve the push destination with Git’s branch-aware precedence in Overlay mode.
resolve_default_remote_name
Resolve the remote name for push/pull when the user omitted it.
resolved_default_remote_name
The configured default remote name, if any (no "origin" fallback).
show_plain_git_remote
Show a single remote from a plain-Git worktree. Returns None when missing.
show_remote
Show a single remote in a Heddle repository. Returns Ok(None) when the name is not present in the merged remote set.
summarize_pull_outcome
Short human-readable summary of a pull outcome (for logs / text shells).
summarize_push_outcome
Short human-readable summary of a push outcome (for logs / text shells).
transport_error_message
Normalize an optional transport error string for failure construction.
transport_mismatch_blocker
Pure: native-repo git-transport mismatch, only when not on local overlay path.
uses_git_overlay_mirror_rpc
Whether a single-thread network push should use the git-overlay mirror RPC rather than the plain native push RPC.
uses_local_git_overlay_transport
Whether push/pull should take the local git-overlay path (git refs / git projection) rather than native heddle remote transport.