Skip to main content

mark_driver_in_progress_conditional

Function mark_driver_in_progress_conditional 

Source
pub fn mark_driver_in_progress_conditional(
    specs_dir: &Path,
    member_id: &str,
    skip: bool,
) -> Result<()>
Expand description

Mark the driver spec as in_progress if the current spec is a member.

When a member spec begins execution, its driver spec should transition from Pending to InProgress (if not already). This function handles that transition.

§Arguments

  • specs_dir - Path to the specs directory
  • member_id - The ID of the member spec that is starting

§Returns

Returns Ok(()) if successful or the driver doesn’t exist. Returns Err if file I/O fails.

§Examples

mark_driver_in_progress(&specs_dir, "2026-01-25-00y-abc.1")?;

Mark a driver spec as in_progress when one of its members starts work.

This creates a “phantom” in_progress status for the driver that serves as a placeholder until all members complete. The driver will be auto-completed when the last member finishes.

Note: This means that during member execution, both the driver AND the active member will show as in_progress. This is by design but can be confusing in status displays.

Set skip to true to avoid marking the driver (useful in chain mode where we want only one spec to show as in_progress at a time).