pub struct FileSystemState {
pub files: HashMap<String, FileSnapshot>,
pub git_head_oid: Option<String>,
pub git_branch: Option<String>,
pub git_status: Option<String>,
pub git_modified_files: Option<Vec<String>>,
}Expand description
File system state snapshot for key files.
Captures the state of important files that affect pipeline execution. This enables validation on resume to detect unexpected changes.
Fields§
§files: HashMap<String, FileSnapshot>Snapshots of tracked files
git_head_oid: Option<String>Git HEAD commit OID (if available)
git_branch: Option<String>Git branch name (if available)
git_status: Option<String>Git status output (porcelain format) for tracking staged/unstaged changes
git_modified_files: Option<Vec<String>>List of modified files from git diff
Implementations§
Source§impl FileSystemState
impl FileSystemState
Sourcepub fn capture_with_optional_executor(
executor: Option<&dyn ProcessExecutor>,
) -> Self
👎Deprecated since 0.5.0: Uses CWD-relative paths. Use capture_with_workspace instead.
pub fn capture_with_optional_executor( executor: Option<&dyn ProcessExecutor>, ) -> Self
Capture the current state with an optional executor.
If executor is None, uses RealProcessExecutor (production default).
§Note
This function requires an explicit executor parameter to enable proper
dependency injection for testing. For production code, pass
Some(&RealProcessExecutor::new()).
§Deprecated
This function uses CWD-relative paths. Prefer capture_with_workspace for new code.
Sourcepub fn capture_with_workspace(
workspace: &dyn Workspace,
executor: &dyn ProcessExecutor,
) -> Self
pub fn capture_with_workspace( workspace: &dyn Workspace, executor: &dyn ProcessExecutor, ) -> Self
Capture the current state of key files using a workspace.
This includes files that are critical for pipeline execution:
- PROMPT.md: The primary task description
- .agent/PLAN.md: The implementation plan (if exists)
- .agent/ISSUES.md: Review findings (if exists)
- .agent/config.toml: Agent configuration (if exists)
- .agent/start_commit: Baseline commit reference (if exists)
- .agent/NOTES.md: Development notes (if exists)
- .agent/status: Pipeline status file (if exists)
Sourcepub fn capture_current_with_executor(executor: &dyn ProcessExecutor) -> Self
👎Deprecated since 0.5.0: Uses CWD-relative paths. Use capture_with_workspace instead.
pub fn capture_current_with_executor(executor: &dyn ProcessExecutor) -> Self
Capture the current state of key files with a provided process executor.
This includes files that are critical for pipeline execution:
- PROMPT.md: The primary task description
- .agent/PLAN.md: The implementation plan (if exists)
- .agent/ISSUES.md: Review findings (if exists)
- .agent/config.toml: Agent configuration (if exists)
- .agent/start_commit: Baseline commit reference (if exists)
- .agent/NOTES.md: Development notes (if exists)
- .agent/status: Pipeline status file (if exists)
§Deprecated
This function uses CWD-relative paths. Prefer capture_with_workspace for new code.
Sourcepub fn capture_file_with_workspace(
&mut self,
workspace: &dyn Workspace,
path: &str,
)
pub fn capture_file_with_workspace( &mut self, workspace: &dyn Workspace, path: &str, )
Capture a single file’s state using a workspace.
Sourcepub fn capture_file(&mut self, path: &str)
👎Deprecated since 0.5.0: Uses CWD-relative paths. Use capture_file_with_workspace instead.
pub fn capture_file(&mut self, path: &str)
Capture a single file’s state.
§Deprecated
This function uses CWD-relative paths. Prefer capture_file_with_workspace for new code.
Sourcepub fn validate(&self) -> Vec<ValidationError>
👎Deprecated since 0.5.0: Uses CWD-relative paths. Use validate_with_workspace instead.
pub fn validate(&self) -> Vec<ValidationError>
Validate the current file system state against this snapshot.
Returns a list of validation errors. Empty list means all checks passed.
§Deprecated
This function uses CWD-relative paths. Prefer validate_with_workspace for new code.
Sourcepub fn validate_with_workspace(
&self,
workspace: &dyn Workspace,
executor: Option<&dyn ProcessExecutor>,
) -> Vec<ValidationError>
pub fn validate_with_workspace( &self, workspace: &dyn Workspace, executor: Option<&dyn ProcessExecutor>, ) -> Vec<ValidationError>
Validate the current file system state against this snapshot using a workspace.
Returns a list of validation errors. Empty list means all checks passed.
pub fn validate_with_executor( &self, executor: Option<&dyn ProcessExecutor>, ) -> Vec<ValidationError>
Trait Implementations§
Source§impl Clone for FileSystemState
impl Clone for FileSystemState
Source§fn clone(&self) -> FileSystemState
fn clone(&self) -> FileSystemState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileSystemState
impl Debug for FileSystemState
Source§impl Default for FileSystemState
impl Default for FileSystemState
Source§fn default() -> FileSystemState
fn default() -> FileSystemState
Source§impl<'de> Deserialize<'de> for FileSystemState
impl<'de> Deserialize<'de> for FileSystemState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for FileSystemState
impl RefUnwindSafe for FileSystemState
impl Send for FileSystemState
impl Sync for FileSystemState
impl Unpin for FileSystemState
impl UnwindSafe for FileSystemState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more