Skip to main content

mark_task_complete

Function mark_task_complete 

Source
pub fn mark_task_complete(
    tasks_path: &Path,
    task_id: &str,
    expected_line_hash: &str,
) -> Result<(), String>
Expand description

Ticks task_id in the tasks.md at tasks_path — the engine’s one sanctioned write to an artifact.

Re-parses the file, requires the task’s line to still hash to expected_line_hash (else the file changed since the attempt began), and replaces the space inside the task’s [ ] with X: one byte, nothing else touched. Written to a sibling temporary file and renamed into place.