merge: orchestration
This commit is contained in:
@@ -117,6 +117,10 @@ pub struct WorkingDirectoryRequest {
|
||||
pub materializer: MaterializerKind,
|
||||
#[serde(default)]
|
||||
pub dirty_state_policy: DirtyStatePolicy,
|
||||
/// Backend-assigned stable Workdir id. Runtimes use this when present so the
|
||||
/// Backend can create canonical registry rows before materialization.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub backend_workdir_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
@@ -158,6 +162,10 @@ pub struct WorkingDirectorySummary {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub cleanup_policy: Option<String>,
|
||||
pub status: WorkingDirectoryStatusKind,
|
||||
/// Backend projection metadata. Runtimes leave this absent; Workspace Browser
|
||||
/// APIs fill it with `backend_managed` or `runtime_unmanaged`.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub management_kind: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
||||
@@ -1036,6 +1036,7 @@ mod tests {
|
||||
},
|
||||
materializer: MaterializerKind::LocalGitWorktree,
|
||||
dirty_state_policy: DirtyStatePolicy::CleanPointOnly,
|
||||
backend_workdir_id: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ impl WorkingDirectory {
|
||||
cleanup_target: Some(self.cleanup_target.clone()),
|
||||
cleanup_policy: Some(self.cleanup_policy.clone()),
|
||||
status: self.status.clone(),
|
||||
management_kind: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,7 +396,10 @@ impl WorkingDirectoryMaterializer for LocalGitWorktreeMaterializer {
|
||||
&self,
|
||||
request: &WorkingDirectoryRequest,
|
||||
) -> Result<WorkingDirectoryBinding, WorkingDirectoryDiagnostic> {
|
||||
let working_directory_id = next_working_directory_id(&request.repository.id);
|
||||
let working_directory_id = request
|
||||
.backend_workdir_id
|
||||
.clone()
|
||||
.unwrap_or_else(|| next_working_directory_id(&request.repository.id));
|
||||
self.materialize_with_working_directory_id(
|
||||
working_directory_id,
|
||||
request,
|
||||
@@ -719,6 +723,7 @@ mod tests {
|
||||
},
|
||||
materializer: MaterializerKind::LocalGitWorktree,
|
||||
dirty_state_policy: DirtyStatePolicy::CleanPointOnly,
|
||||
backend_workdir_id: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user