pub struct GitCompatRepository<S> { /* private fields */ }Expand description
Repository façade over one SDK workspace and private compatibility state.
Implementations§
Source§impl<S> GitCompatRepository<S>
impl<S> GitCompatRepository<S>
Source§impl<S: GitCompatStore> GitCompatRepository<S>
impl<S: GitCompatStore> GitCompatRepository<S>
Sourcepub async fn tracked_paths(
&self,
) -> Result<BTreeSet<String>, GitCompatError<S::Error>>
pub async fn tracked_paths( &self, ) -> Result<BTreeSet<String>, GitCompatError<S::Error>>
Returns the paths tracked by the current compatibility branch.
Sourcepub async fn head(
&self,
) -> Result<Option<GitCommitId>, GitCompatError<S::Error>>
pub async fn head( &self, ) -> Result<Option<GitCommitId>, GitCompatError<S::Error>>
Returns the latest explicit compatibility commit for the current branch.
Sourcepub async fn run<E: GitFilesystemExecutor, T: IntoGitTreeRef>(
&self,
command: GitCommand,
workspace_tree: T,
executor: &E,
) -> Result<GitCommandOutput, GitCompatRunError<S::Error, E::Error>>
pub async fn run<E: GitFilesystemExecutor, T: IntoGitTreeRef>( &self, command: GitCommand, workspace_tree: T, executor: &E, ) -> Result<GitCommandOutput, GitCompatRunError<S::Error, E::Error>>
Executes a command and all required filesystem work through one composed recovery-safe boundary.
Adapters normally need only this method. State-only commands return immediately, action commands receive a deterministic operation identity, and prepared sequencer mutations remain durable if the executor fails.
Sourcepub async fn run_argv<E: GitFilesystemExecutor, T: IntoGitTreeRef>(
&self,
argv: &[String],
workspace_tree: T,
default_author: &str,
now_seconds: i64,
executor: &E,
) -> Result<GitCommandOutput, GitCompatRunError<S::Error, E::Error>>
pub async fn run_argv<E: GitFilesystemExecutor, T: IntoGitTreeRef>( &self, argv: &[String], workspace_tree: T, default_author: &str, now_seconds: i64, executor: &E, ) -> Result<GitCommandOutput, GitCompatRunError<S::Error, E::Error>>
Parses argv following the acyclic git umbrella subcommand and executes
it through Self::run. This API never intercepts or invokes system
git.
Sourcepub async fn resume<E: GitFilesystemExecutor>(
&self,
executor: &E,
) -> Result<Option<GitCommandOutput>, GitCompatRunError<S::Error, E::Error>>
pub async fn resume<E: GitFilesystemExecutor>( &self, executor: &E, ) -> Result<Option<GitCommandOutput>, GitCompatRunError<S::Error, E::Error>>
Recovers the durable pending transition, if any, through the same
executor contract used by Self::run.
Sourcepub async fn execute<T: IntoGitTreeRef>(
&self,
command: GitCommand,
workspace_tree: T,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn execute<T: IntoGitTreeRef>( &self, command: GitCommand, workspace_tree: T, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Executes one typed command against an exact live workspace generation.
Sourcepub async fn pending_transition(
&self,
) -> Result<Option<GitPendingTransition>, GitCompatError<S::Error>>
pub async fn pending_transition( &self, ) -> Result<Option<GitPendingTransition>, GitCompatError<S::Error>>
Returns the durable sequencer transition that requires recovery.
Sourcepub async fn complete_transition(
&self,
transition: GitTransitionId,
resulting_tree: Option<GitTreeRef>,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn complete_transition( &self, transition: GitTransitionId, resulting_tree: Option<GitTreeRef>, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Commits a prepared transition after its filesystem action succeeds.
Sourcepub async fn complete_transition_result(
&self,
transition: GitTransitionId,
result: &GitFilesystemResult,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn complete_transition_result( &self, transition: GitTransitionId, result: &GitFilesystemResult, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Commits a prepared transition using the executor’s complete typed result.
Capture and branch transitions require their full result so recovery can publish compatibility state without reconstructing filesystem facts.
Sourcepub async fn abort_transition(
&self,
transition: GitTransitionId,
) -> Result<(), GitCompatError<S::Error>>
pub async fn abort_transition( &self, transition: GitTransitionId, ) -> Result<(), GitCompatError<S::Error>>
Clears an exact prepared transition after the executor proves that no filesystem effects remain (or after the materializer rolls them back).
Sourcepub async fn execute_argv<T: IntoGitTreeRef>(
&self,
argv: &[String],
workspace_tree: T,
default_author: &str,
now_seconds: i64,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn execute_argv<T: IntoGitTreeRef>( &self, argv: &[String], workspace_tree: T, default_author: &str, now_seconds: i64, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Parses and executes argv following the acyclic git umbrella
subcommand. Callers strip the two-token prefix before invoking this
method; bare system git is outside this façade.
Sourcepub async fn register_branch_workspace(
&self,
branch: impl Into<String>,
workspace_id: WorkspaceId,
head: Option<GitCommitId>,
switch: bool,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn register_branch_workspace( &self, branch: impl Into<String>, workspace_id: WorkspaceId, head: Option<GitCommitId>, switch: bool, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Completes a previously emitted GitFilesystemAction::ForkBranch.
The caller must create a real SDK child workspace first. Registration is idempotent for the same branch/workspace/head tuple and rejects any competing result.
Sourcepub async fn record_commit(
&self,
expected_head: Option<GitCommitId>,
generation: GenerationId,
tracked_paths: BTreeSet<String>,
message: impl Into<String>,
author: impl Into<String>,
authored_at_seconds: i64,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn record_commit( &self, expected_head: Option<GitCommitId>, generation: GenerationId, tracked_paths: BTreeSet<String>, message: impl Into<String>, author: impl Into<String>, authored_at_seconds: i64, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Records a compatibility commit after the core executor filters newly ignored paths and returns the exact eligible generation.
Sourcepub async fn record_publication(
&self,
publication: GitPublicationRecord,
) -> Result<GitCommandOutput, GitCompatError<S::Error>>
pub async fn record_publication( &self, publication: GitPublicationRecord, ) -> Result<GitCommandOutput, GitCompatError<S::Error>>
Records a merge/publication performed by the distributed workspace layer without reimplementing compatibility history in an adapter.
Auto Trait Implementations§
impl<S> Freeze for GitCompatRepository<S>where
S: Freeze,
impl<S> RefUnwindSafe for GitCompatRepository<S>where
S: RefUnwindSafe,
impl<S> Send for GitCompatRepository<S>where
S: Send,
impl<S> Sync for GitCompatRepository<S>where
S: Sync,
impl<S> Unpin for GitCompatRepository<S>where
S: Unpin,
impl<S> UnsafeUnpin for GitCompatRepository<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for GitCompatRepository<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request