MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_task_artifact_reference_is_stable

Function test_task_artifact_reference_is_stable

core/src/tools/task.rs:1094–1112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1092
1093 #[test]
1094 fn test_task_artifact_reference_is_stable() {
1095 let result = TaskResult {
1096 output: "done".to_string(),
1097 session_id: "session-1".to_string(),
1098 agent: "explore".to_string(),
1099 success: true,
1100 task_id: "task-1".to_string(),
1101 };
1102
1103 assert_eq!(task_artifact_id(&result), "task-output:task-1");
1104 assert_eq!(
1105 task_artifact_uri(&result),
1106 "a3s://tasks/session-1/runs/task-1/output"
1107 );
1108
1109 let (formatted, truncated) = format_task_result_for_context(&result);
1110 assert!(!truncated);
1111 assert!(formatted.contains("Artifact URI: a3s://tasks/session-1/runs/task-1/output"));
1112 }
1113
1114 #[test]
1115 fn test_task_params_schema() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected