MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / validate_run_id

Function validate_run_id

atomic-cli/src/commands/agent/lifecycle.rs:746–758  ·  view source on GitHub ↗
(run_id: &str)

Source from the content-addressed store, hash-verified

744}
745
746fn validate_run_id(run_id: &str) -> CliResult<()> {
747 if run_id.is_empty()
748 || run_id.contains("..")
749 || run_id.contains('/')
750 || run_id.contains('\\')
751 || run_id.contains('\0')
752 {
753 return Err(CliError::InvalidArgument {
754 message: format!("invalid run id '{}'", run_id),
755 });
756 }
757 Ok(())
758}
759
760fn canonicalize_lenient(path: &Path) -> PathBuf {
761 path.canonicalize().unwrap_or_else(|_| path.to_path_buf())

Callers 5

load_lifecycleFunction · 0.85
save_lifecycleFunction · 0.85
remove_lifecycleFunction · 0.85
load_first_refusalFunction · 0.85
persist_first_refusalFunction · 0.85

Calls 2

is_emptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected