MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / commit_run_event

Function commit_run_event

crates/flowtrace-cli/src/main.rs:500–514  ·  view source on GitHub ↗
(
    root: &Path,
    run_id: Option<&str>,
    event: &str,
    apply: impl FnMut(&mut flowtrace_core::state::RunState),
)

Source from the content-addressed store, hash-verified

498}
499
500fn commit_run_event(
501 root: &Path,
502 run_id: Option<&str>,
503 event: &str,
504 apply: impl FnMut(&mut flowtrace_core::state::RunState),
505) -> Result<()> {
506 let id = mutate_run(root, run_id, apply)?;
507 let state_rel = format!("runs/{}/state.json", id);
508 git::commit_files(
509 root,
510 &git::run_event_commit_msg(&id, event),
511 &[state_rel.as_str()],
512 )?;
513 Ok(())
514}
515
516fn mutate_run(
517 root: &Path,

Callers 1

cmd_runFunction · 0.85

Calls 4

mutate_runFunction · 0.85
commit_filesFunction · 0.85
run_event_commit_msgFunction · 0.85
as_strMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…