Merge branch 'mrh-online-dev' of github.com:BRUNIX-AI/assistance-engine into mrh-online-dev
This commit is contained in:
commit
8df0b59f65
|
|
@ -1 +1,628 @@
|
||||||
[]
|
[
|
||||||
|
{
|
||||||
|
"task_id": 1,
|
||||||
|
"text": "Crea un microservicio AVAP que procese múltiples proveedores de servicios financieros. El servicio debe: 1) Obtener parámetros de consulta desde la URL, 2) Conectar con diferentes proveedores usando avapConnector, 3) Procesar cada proveedor en un bucle usando startLoop, 4) Validar y filtrar resultados usando condicionales, 5) Retornar datos consolidados con código de estado HTTP apropiado.",
|
||||||
|
"code": "addParam(\"providers\", providers_param)\naddParam(\"user_id\", user_id)\naddParam(\"account_type\", account_type)\nif(providers_param, None, \"==\")\n _status = 400\n addResult(error_msg)\nelse()\n getQueryParamList(\"providers\", provider_list)\n getListLen(provider_list, total_providers)\n variableToList({}, consolidated_data)\n processed_count = 0\n startLoop(i, 0, total_providers)\n itemFromList(provider_list, i, current_provider)\n if(current_provider, \"belvo\", \"==\")\n belvo_connector = avapConnector(\"20908e93260147acb2636967021fbf5d\")\n accounts_data = belvo_connector.list_accounts(user_id, account_type)\n if(None, None, `accounts_data is not None and len(accounts_data) > 0`)\n variableFromJSON(accounts_data, \"balance\", balance)\n variableFromJSON(accounts_data, \"currency\", currency)\n AddVariableToJSON(\"provider\", current_provider, account_info)\n AddVariableToJSON(\"balance\", balance, account_info)\n AddVariableToJSON(\"currency\", currency, account_info)\n consolidated_data.append(account_info)\n processed_count = processed_count + 1\n end()\n else()\n if(current_provider, \"plaid\", \"==\")\n plaid_connector = avapConnector(\"8f4e2a1b5c6d7e8f9a0b1c2d3e4f5a6b\")\n balances_result = plaid_connector.get_balances(user_id)\n if(None, None, `balances_result is not None`)\n variableFromJSON(balances_result, \"available\", available_balance)\n if(available_balance, 0, \">\")\n AddVariableToJSON(\"provider\", current_provider, plaid_info)\n AddVariableToJSON(\"balance\", available_balance, plaid_info)\n AddVariableToJSON(\"currency\", \"USD\", plaid_info)\n consolidated_data.append(plaid_info)\n processed_count = processed_count + 1\n end()\n end()\n end()\n end()\n endLoop()\n if(processed_count, 0, \">\")\n _status = 200\n AddVariableToJSON(\"total_providers_processed\", processed_count, response_data)\n AddVariableToJSON(\"accounts\", consolidated_data, response_data)\n addResult(response_data)\n else()\n _status = 404\n AddVariableToJSON(\"error\", \"No valid account data found\", error_response)\n addResult(error_response)\n end()\nend()",
|
||||||
|
"test_inputs": {
|
||||||
|
"providers": "belvo,plaid",
|
||||||
|
"user_id": "12345",
|
||||||
|
"account_type": "checking"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'200|404', str(_status))",
|
||||||
|
"re.match(r'\\d+', str(processed_count))",
|
||||||
|
"re.match(r'.*accounts.*', str(response_data))"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"avapConnector",
|
||||||
|
"startLoop"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.333,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.4,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"avapConnector",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"getListLen",
|
||||||
|
"getQueryParamList",
|
||||||
|
"if_mode2",
|
||||||
|
"itemFromList",
|
||||||
|
"startLoop",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"avapConnector",
|
||||||
|
"startLoop"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"getListLen",
|
||||||
|
"getQueryParamList",
|
||||||
|
"if_mode2",
|
||||||
|
"itemFromList",
|
||||||
|
"variableFromJSON"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 2,
|
||||||
|
"text": "Implementa un microservicio AVAP que actualice múltiples registros de usuario de forma asíncrona. El servicio debe: 1) Obtener una lista de IDs de usuario desde parámetros de consulta, 2) Procesar cada actualización en paralelo usando goroutines, 3) Esperar a que todas las actualizaciones concurrentes terminen, 4) Retornar un resumen con el número total de registros actualizados y el estado de la operación.",
|
||||||
|
"code": "addParam(\"operation_type\", op_type)\ngetQueryParamList(\"user_ids\", user_list)\ngetListLen(user_list, total_users)\nif(total_users, 0, \"==\")\n_status = 400\naddVar(error_msg, \"No user IDs provided\")\naddResult(error_msg)\nelse()\naddVar(updated_count, 0)\naddVar(concurrent_tasks, [])\naddVar(counter, 0)\nstartLoop(counter, 0, total_users)\nitemFromList(user_list, counter, current_user_id)\ntask_id = go updateUserRecord(current_user_id)\nvariableToList(task_id, temp_list)\nif(counter, 0, \"==\")\naddVar(concurrent_tasks, temp_list)\nelse()\ngetListLen(concurrent_tasks, current_len)\nitemFromList(temp_list, 0, new_task)\nAddVariableToJSON(current_len, new_task, task_dict)\nvariableFromJSON(task_dict, current_len, retrieved_task)\nvariableToList(retrieved_task, single_task)\naddVar(concurrent_tasks, single_task)\nend()\nendLoop()\ngetListLen(concurrent_tasks, task_count)\naddVar(results_collected, 0)\nstartLoop(results_collected, 0, task_count)\nitemFromList(concurrent_tasks, results_collected, current_task)\nupdate_result = gather(current_task, 5000)\nif(update_result, \"success\", \"==\")\naddVar(updated_count, updated_count + 1)\nend()\nendLoop()\naddVar(success_rate, updated_count / total_users * 100)\nif(success_rate, 80.0, \">=\")\n_status = 200\naddVar(status_msg, \"Bulk update completed successfully\")\nelse()\n_status = 206\naddVar(status_msg, \"Partial update completed with some failures\")\nend()\naddResult(updated_count)\naddResult(total_users)\naddResult(success_rate)\naddResult(status_msg)\nend()\n\nfunction updateUserRecord(user_id)\n{\naddVar(table_name, \"users\")\naddVar(update_fields, [\"last_updated\", \"status\"])\ngetDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\naddVar(field_values, [current_time, \"active\"])\naddVar(selector, \"id = \" + user_id)\normAccessUpdate(update_fields, field_values, table_name, selector, update_status)\nif(update_status, \"error\", \"!=\")\nreturn(\"success\")\nelse()\nreturn(\"failed\")\nend()\n}",
|
||||||
|
"test_inputs": {
|
||||||
|
"user_ids": [
|
||||||
|
"123",
|
||||||
|
"456",
|
||||||
|
"789"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'\\d+', str(updated_count))",
|
||||||
|
"re.match(r'(200|206|400)', str(_status))",
|
||||||
|
"re.match(r'\\d+\\.\\d+', str(success_rate))"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"gather",
|
||||||
|
"getQueryParamList",
|
||||||
|
"ormAccessUpdate"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.457,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.437,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"function",
|
||||||
|
"gather",
|
||||||
|
"getDateTime",
|
||||||
|
"getListLen",
|
||||||
|
"getQueryParamList",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"ormAccessUpdate",
|
||||||
|
"return",
|
||||||
|
"startLoop",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"gather",
|
||||||
|
"getQueryParamList",
|
||||||
|
"ormAccessUpdate"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"function",
|
||||||
|
"getDateTime",
|
||||||
|
"getListLen",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"return",
|
||||||
|
"startLoop",
|
||||||
|
"variableFromJSON"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 3,
|
||||||
|
"text": "Escribe una función AVAP que procese una lista de eventos con timestamps, calcule métricas temporales y envíe un reporte POST a una API externa. La función debe: 1) Recibir una lista de eventos con fechas en formato ISO, 2) Convertir las fechas a timestamps Unix, 3) Calcular la duración total en días, 4) Enviar los resultados via POST a una API de métricas con timeout de 5 segundos, y 5) Retornar el número total de eventos procesados.",
|
||||||
|
"code": "addParam(\"eventos\", lista_eventos)\naddParam(\"api_url\", url_destino)\naddParam(\"formato_fecha\", formato)\ngetListLen(lista_eventos, total_eventos)\nif(total_eventos, 0, \">\")\n addVar(contador, 0)\n addVar(timestamp_minimo, 9999999999)\n addVar(timestamp_maximo, 0)\n startLoop(i, 0, total_eventos)\n itemFromList(lista_eventos, i, evento_actual)\n variableFromJSON(evento_actual, \"fecha\", fecha_str)\n getTimeStamp(fecha_str, formato, 0, timestamp_unix)\n if(timestamp_unix, timestamp_minimo, \"<\")\n addVar(timestamp_minimo, timestamp_unix)\n end()\n if(timestamp_unix, timestamp_maximo, \">\")\n addVar(timestamp_maximo, timestamp_unix)\n end()\n addVar(contador, contador + 1)\n endLoop()\n duracion_segundos = timestamp_maximo - timestamp_minimo\n duracion_dias = duracion_segundos / 86400\n addVar(payload, {})\n AddVariableToJSON(\"total_eventos\", contador, payload)\n AddVariableToJSON(\"duracion_dias\", duracion_dias, payload)\n AddVariableToJSON(\"timestamp_inicio\", timestamp_minimo, payload)\n AddVariableToJSON(\"timestamp_fin\", timestamp_maximo, payload)\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", fecha_reporte)\n AddVariableToJSON(\"fecha_reporte\", fecha_reporte, payload)\n headers = {\"Content-Type\": \"application/json\", \"User-Agent\": \"AVAP-Metrics/1.0\"}\n RequestPost(url_destino, \"\", headers, payload, respuesta_api, 5000)\n if(None, None, `respuesta_api is not None`)\n variableFromJSON(respuesta_api, \"status\", status_respuesta)\n if(status_respuesta, \"success\", \"==\")\n addVar(_status, 200)\n else()\n addVar(_status, 500)\n end()\n else()\n addVar(_status, 503)\n end()\n addResult(contador)\n addResult(duracion_dias)\nelse()\n addVar(_status, 400)\n addVar(mensaje_error, \"Lista de eventos vacia\")\n addResult(mensaje_error)\nend()",
|
||||||
|
"test_inputs": {
|
||||||
|
"eventos": "[{\"fecha\": \"2024-01-15 10:30:00\"}, {\"fecha\": \"2024-01-18 14:45:00\"}]",
|
||||||
|
"api_url": "https://metrics.api.com/report",
|
||||||
|
"formato_fecha": "%Y-%m-%d %H:%M:%S"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'^[0-9]+$', str(contador))",
|
||||||
|
"re.match(r'^[0-9]+(\\.[0-9]+)?$', str(duracion_dias))",
|
||||||
|
"re.match(r'^(200|400|500|503)$', str(_status))"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"RequestPost",
|
||||||
|
"getListLen",
|
||||||
|
"getTimeStamp"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.371,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.411,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"RequestPost",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"getDateTime",
|
||||||
|
"getListLen",
|
||||||
|
"getTimeStamp",
|
||||||
|
"if_mode2",
|
||||||
|
"itemFromList",
|
||||||
|
"startLoop",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"RequestPost",
|
||||||
|
"getListLen",
|
||||||
|
"getTimeStamp"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"getDateTime",
|
||||||
|
"if_mode2",
|
||||||
|
"itemFromList",
|
||||||
|
"startLoop",
|
||||||
|
"variableFromJSON"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 4,
|
||||||
|
"text": "Crear un endpoint que genere un reporte de actividad con timestamp actual. El endpoint debe validar un parámetro 'nivel_reporte', usar condiciones if/else para categorizar el reporte, aplicar operaciones matemáticas y devolver un JSON con información temporal detallada.",
|
||||||
|
"code": "registerEndpoint(\"/reporte-actividad\", \"GET\", [], \"application/json\", \"generarReporte\", \"mainHandler\")\nfunction generarReporte() {\n addParam(\"nivel_reporte\", nivel)\n addVar(_status, 200)\n if(nivel, None, \"==\")\n addVar(_status, 400)\n addVar(error_msg, \"Parametro nivel_reporte requerido\")\n addResult(error_msg)\n return()\n else()\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", timestamp_actual)\n addVar(contador_base, 10)\n if(nivel, \"alto\", \"==\")\n addVar(multiplicador, 5)\n addVar(categoria, \"Reporte de Alto Nivel\")\n else()\n if(nivel, \"medio\", \"==\")\n addVar(multiplicador, 3)\n addVar(categoria, \"Reporte de Nivel Medio\")\n else()\n addVar(multiplicador, 1)\n addVar(categoria, \"Reporte Basico\")\n end()\n end()\n actividad_calculada = contador_base * multiplicador\n getTimeStamp(timestamp_actual, \"%Y-%m-%d %H:%M:%S\", 3600, epoch_futuro)\n addVar(resultado_final, {})\n AddVariableToJSON(\"categoria\", categoria, resultado_final)\n AddVariableToJSON(\"timestamp\", timestamp_actual, resultado_final)\n AddVariableToJSON(\"actividad_total\", actividad_calculada, resultado_final)\n AddVariableToJSON(\"epoch_futuro\", epoch_futuro, resultado_final)\n addResult(resultado_final)\n end()\n return()\n}",
|
||||||
|
"test_inputs": {
|
||||||
|
"nivel_reporte": "alto"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'Reporte de Alto Nivel', resultado_final)",
|
||||||
|
"re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', timestamp_actual)",
|
||||||
|
"re.match(r'50', str(actividad_calculada))"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"addVar",
|
||||||
|
"end",
|
||||||
|
"getDateTime"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.257,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.377,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"function",
|
||||||
|
"getDateTime",
|
||||||
|
"getTimeStamp",
|
||||||
|
"if_mode1",
|
||||||
|
"return"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"addVar",
|
||||||
|
"end",
|
||||||
|
"getDateTime"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"else",
|
||||||
|
"function",
|
||||||
|
"getTimeStamp",
|
||||||
|
"if_mode1",
|
||||||
|
"return"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 5,
|
||||||
|
"text": "Crear un microservicio que procese múltiples solicitudes de validación de usuarios de forma concurrente. El servicio debe recibir una lista de IDs de usuario, validar cada uno usando una API externa de forma asíncrona, y retornar un reporte consolidado con los resultados. Si alguna validación falla, debe manejarse con bloques de control apropiados.",
|
||||||
|
"code": "registerEndpoint(\"/validate-users\", \"POST\", [], \"application/json\", mainHandler, None)\nfunction mainHandler()\n{\n addParam(\"user_ids\", user_list)\n if(user_list, None, \"==\")\n _status = 400\n addVar(error_msg, \"Lista de usuarios requerida\")\n addResult(error_msg)\n return()\n end()\n \n getListLen(user_list, total_users)\n addVar(validated_users, [])\n addVar(failed_users, [])\n addVar(validation_tasks, [])\n \n startLoop(i, 0, total_users)\n itemFromList(user_list, i, current_user)\n task_id = go validateUser(current_user)\n variableToList(task_id, temp_task)\n if(validation_tasks, [], \"==\")\n addVar(validation_tasks, temp_task)\n else()\n AddVariableToJSON(\"task\", task_id, task_obj)\n variableToList(task_obj, new_task)\n validation_tasks = validation_tasks + new_task\n end()\n endLoop()\n \n getListLen(validation_tasks, total_tasks)\n startLoop(j, 0, total_tasks)\n itemFromList(validation_tasks, j, task)\n result = gather(task, 5000)\n if(result, None, \"!=\")\n variableFromJSON(result, \"status\", status_code)\n variableFromJSON(result, \"user_id\", validated_id)\n if(status_code, \"valid\", \"==\")\n AddVariableToJSON(\"user_id\", validated_id, valid_user)\n AddVariableToJSON(\"timestamp\", \"2024-01-01 00:00:00\", valid_user)\n variableToList(valid_user, temp_valid)\n validated_users = validated_users + temp_valid\n else()\n AddVariableToJSON(\"user_id\", validated_id, failed_user)\n AddVariableToJSON(\"reason\", \"validation_failed\", failed_user)\n variableToList(failed_user, temp_failed)\n failed_users = failed_users + temp_failed\n end()\n else()\n AddVariableToJSON(\"user_id\", \"unknown\", timeout_user)\n AddVariableToJSON(\"reason\", \"timeout\", timeout_user)\n variableToList(timeout_user, temp_timeout)\n failed_users = failed_users + temp_timeout\n end()\n endLoop()\n \n AddVariableToJSON(\"validated\", validated_users, final_result)\n AddVariableToJSON(\"failed\", failed_users, final_result)\n getListLen(validated_users, valid_count)\n getListLen(failed_users, failed_count)\n AddVariableToJSON(\"summary\", {\"valid\": valid_count, \"failed\": failed_count}, final_result)\n \n _status = 200\n addResult(final_result)\n return()\n}\n\nfunction validateUser(user_id)\n{\n try()\n url = \"https://api.validation.com/users/\" + str(user_id)\n headers = {\"Authorization\": \"Bearer token123\"}\n RequestGet(url, {}, headers, api_response, 3000)\n if(api_response, None, \"!=\")\n variableFromJSON(api_response, \"valid\", is_valid)\n if(is_valid, True, \"==\")\n result = {\"status\": \"valid\", \"user_id\": user_id}\n else()\n result = {\"status\": \"invalid\", \"user_id\": user_id}\n end()\n else()\n result = {\"status\": \"api_error\", \"user_id\": user_id}\n end()\n return(result)\n exception(error)\n error_result = {\"status\": \"exception\", \"user_id\": user_id, \"error\": error}\n return(error_result)\n end()\n}",
|
||||||
|
"test_inputs": {
|
||||||
|
"user_ids": [
|
||||||
|
"123",
|
||||||
|
"456",
|
||||||
|
"789"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'.*validated.*', str(final_result))",
|
||||||
|
"re.match(r'.*failed.*', str(final_result))",
|
||||||
|
"re.match(r'.*summary.*', str(final_result))"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"addResult",
|
||||||
|
"end",
|
||||||
|
"gather"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.429,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.429,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"RequestGet",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"function",
|
||||||
|
"gather",
|
||||||
|
"getListLen",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"return",
|
||||||
|
"startLoop",
|
||||||
|
"try",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"addResult",
|
||||||
|
"end",
|
||||||
|
"gather"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"RequestGet",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"endLoop",
|
||||||
|
"function",
|
||||||
|
"getListLen",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"return",
|
||||||
|
"startLoop",
|
||||||
|
"try",
|
||||||
|
"variableFromJSON"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 6,
|
||||||
|
"text": "Crear un endpoint que procese un token JWT simulado (JSON), extraiga su timestamp de expiración, lo convierta a fecha legible, y genere un hash MD5 de la información del usuario para logging de seguridad.",
|
||||||
|
"code": "registerEndpoint(\"/api/auth/validate\", \"POST\", [], \"\", mainHandler, None)\n\nfunction mainHandler()\n{\n addParam(\"token_data\", raw_token)\n addParam(\"user_context\", context_info)\n \n if(raw_token, None, \"==\")\n _status = 400\n addVar(error_msg, \"Token data required\")\n addResult(error_msg)\n return()\n end()\n \n variableFromJSON(raw_token, \"exp\", token_expiry)\n variableFromJSON(raw_token, \"user_id\", user_id)\n variableFromJSON(raw_token, \"email\", user_email)\n \n if(token_expiry, None, \"==\")\n _status = 422\n addVar(error_msg, \"Invalid token format - missing expiry\")\n addResult(error_msg)\n return()\n end()\n \n stampToDatetime(token_expiry, \"%Y-%m-%d %H:%M:%S\", 0, readable_expiry)\n \n addVar(user_info_raw, \"\")\n replace(user_email, \"@\", \"_at_\", sanitized_email)\n addVar(user_info_raw, user_id)\n addVar(temp_concat, user_info_raw)\n replace(temp_concat, \"\", sanitized_email, user_info_combined)\n \n encodeMD5(user_info_combined, security_hash)\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\n \n if(None, None, `token_expiry < 1735689600`)\n _status = 401\n addVar(validation_result, \"expired\")\n else()\n _status = 200\n addVar(validation_result, \"valid\")\n end()\n \n addVar(log_entry, \"\")\n AddVariableToJSON(\"timestamp\", current_time, log_entry)\n AddVariableToJSON(\"user_hash\", security_hash, log_entry)\n AddVariableToJSON(\"expiry_readable\", readable_expiry, log_entry)\n AddVariableToJSON(\"status\", validation_result, log_entry)\n AddVariableToJSON(\"context\", context_info, log_entry)\n \n addResult(log_entry)\n addResult(validation_result)\n addResult(readable_expiry)\n return()\n}",
|
||||||
|
"test_inputs": {
|
||||||
|
"token_data": "{\"exp\": 1735689600, \"user_id\": \"usr_12345\", \"email\": \"test@example.com\"}",
|
||||||
|
"user_context": "mobile_app"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'\\{.*\"timestamp\".*\"user_hash\".*\"expiry_readable\".*\\}', log_entry)",
|
||||||
|
"re.match(r'[a-f0-9]{32}', security_hash)",
|
||||||
|
"re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', readable_expiry)"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"encodeMD5",
|
||||||
|
"stampToDatetime",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.343,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.403,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"encodeMD5",
|
||||||
|
"end",
|
||||||
|
"function",
|
||||||
|
"getDateTime",
|
||||||
|
"if_mode2",
|
||||||
|
"replace",
|
||||||
|
"return",
|
||||||
|
"stampToDatetime",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"encodeMD5",
|
||||||
|
"stampToDatetime",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"function",
|
||||||
|
"getDateTime",
|
||||||
|
"if_mode2",
|
||||||
|
"replace",
|
||||||
|
"return"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 7,
|
||||||
|
"text": "Crear un endpoint que actualice el estado de un pedido y devuelva el resultado con código HTTP personalizado. El endpoint debe: 1) Capturar el ID del pedido y nuevo estado desde parámetros, 2) Validar que el estado sea válido ('pendiente', 'procesando', 'completado'), 3) Actualizar el registro en la base de datos usando ORM, 4) Establecer código de respuesta HTTP según el resultado, 5) Devolver el pedido actualizado o mensaje de error.",
|
||||||
|
"code": "addParam(\"pedido_id\", pedido_id)\naddParam(\"nuevo_estado\", nuevo_estado)\nif(pedido_id, None, \"==\")\n_status = 400\naddVar(mensaje, \"ID de pedido requerido\")\naddResult(mensaje)\nelse()\nif(nuevo_estado, None, \"==\")\n_status = 400\naddVar(mensaje, \"Estado requerido\")\naddResult(mensaje)\nelse()\nvariableToList(nuevo_estado, estados_validos)\naddVar(temp_estado, \"pendiente\")\nAddVariableToJSON(\"0\", temp_estado, estados_json)\naddVar(temp_estado, \"procesando\")\nAddVariableToJSON(\"1\", temp_estado, estados_json)\naddVar(temp_estado, \"completado\")\nAddVariableToJSON(\"2\", temp_estado, estados_json)\nif(None, None, `nuevo_estado not in ['pendiente', 'procesando', 'completado']`)\n_status = 422\naddVar(mensaje, \"Estado no válido\")\naddResult(mensaje)\nelse()\ngetDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", fecha_actualizacion)\nvariableToList(\"estado\", campos_update)\nvariableToList(nuevo_estado, valores_update)\nAddVariableToJSON(\"fecha_actualizacion\", fecha_actualizacion, valores_json)\naddVar(selector_where, \"id = \" + pedido_id)\normAccessUpdate(campos_update, valores_update, \"pedidos\", selector_where, resultado_update)\nif(resultado_update, None, \"==\")\n_status = 404\naddVar(mensaje, \"Pedido no encontrado\")\naddResult(mensaje)\nelse()\n_status = 200\normAccessSelect(\"*\", \"pedidos\", selector_where, pedido_actualizado)\naddResult(pedido_actualizado)\nend()\nend()\nend()\nend()",
|
||||||
|
"test_inputs": {
|
||||||
|
"pedido_id": "123",
|
||||||
|
"nuevo_estado": "procesando"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'procesando', nuevo_estado)",
|
||||||
|
"re.match(r'200', str(_status))",
|
||||||
|
"re.match(r'pedido_actualizado', 'pedido_actualizado')"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"_status",
|
||||||
|
"addResult",
|
||||||
|
"ormAccessUpdate"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.229,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.369,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"getDateTime",
|
||||||
|
"if_mode2",
|
||||||
|
"ormAccessSelect",
|
||||||
|
"ormAccessUpdate"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"_status",
|
||||||
|
"addResult",
|
||||||
|
"ormAccessUpdate"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"addParam",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"getDateTime",
|
||||||
|
"if_mode2",
|
||||||
|
"ormAccessSelect"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 8,
|
||||||
|
"text": "Crear un endpoint que genere un reporte de logs de eventos del sistema con timestamps, donde cada evento contenga la fecha actual más un offset incremental de días. El sistema debe iterar por una lista de tipos de eventos y crear un JSON con timestamps formateados para cada uno.",
|
||||||
|
"code": "registerEndpoint(\"/api/system/logs\", \"GET\", [], \"application/json\", generateLogReport, mainHandler)\n\nfunction generateLogReport()\n{\n addParam(\"days_back\", days_param)\n if(days_param, None, \"==\")\n addVar(days_back, 7)\n else()\n days_back = int(days_param)\n end()\n \n event_types = [\"login\", \"logout\", \"error\", \"warning\", \"info\"]\n getListLen(event_types, total_events)\n \n log_entries = {}\n counter = 0\n \n startLoop(i, 0, total_events)\n itemFromList(event_types, i, current_event)\n \n time_offset = counter * 86400\n getDateTime(\"%Y-%m-%d %H:%M:%S\", time_offset, \"UTC\", event_timestamp)\n \n entry_key = current_event + \"_\" + str(counter)\n AddVariableToJSON(\"event_type\", current_event, temp_entry)\n AddVariableToJSON(\"timestamp\", event_timestamp, temp_entry)\n AddVariableToJSON(\"severity\", getSeverityLevel(current_event), temp_entry)\n \n AddVariableToJSON(entry_key, temp_entry, log_entries)\n counter = counter + 1\n endLoop()\n \n AddVariableToJSON(\"total_entries\", total_events, log_entries)\n AddVariableToJSON(\"generated_at\", getCurrentTimestamp(), log_entries)\n \n _status = 200\n addResult(log_entries)\n return(log_entries)\n}\n\nfunction getSeverityLevel(event_type)\n{\n if(event_type, \"error\", \"==\")\n return(\"HIGH\")\n else()\n if(event_type, \"warning\", \"==\")\n return(\"MEDIUM\")\n else()\n return(\"LOW\")\n end()\n end()\n}\n\nfunction getCurrentTimestamp()\n{\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\n return(current_time)\n}",
|
||||||
|
"test_inputs": {
|
||||||
|
"days_back": "5"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', log_entries)",
|
||||||
|
"re.match(r'login_\\d+', str(log_entries))",
|
||||||
|
"re.match(r'\"total_entries\":\\s*5', str(log_entries))"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"getDateTime",
|
||||||
|
"return",
|
||||||
|
"startLoop"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.343,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.403,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"function",
|
||||||
|
"getDateTime",
|
||||||
|
"getListLen",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"return",
|
||||||
|
"startLoop"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"getDateTime",
|
||||||
|
"return",
|
||||||
|
"startLoop"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"function",
|
||||||
|
"getListLen",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 9,
|
||||||
|
"text": "Crear un microservicio que valide un email de entrada, sanitice caracteres especiales del dominio, y retorne información de validación con diferentes códigos de respuesta según el resultado.",
|
||||||
|
"code": "addParam(\"email\", userEmail)\naddParam(\"domain_filter\", filterPattern)\naddResult(validationResult)\nvalidationResult = {}\nif(userEmail, None, \"!=\")\n getRegex(userEmail, \"^[\\\\w\\\\.-]+@[\\\\w\\\\.-]+\\\\.[a-zA-Z]{2,}$\", emailMatch)\n if(emailMatch, None, \"!=\")\n variableFromJSON({\"email\": userEmail}, \"email\", extractedEmail)\n getRegex(extractedEmail, \"@(.+)$\", domainPart)\n if(domainPart, None, \"!=\")\n if(filterPattern, None, \"==\")\n filterPattern = \"[^a-zA-Z0-9.-]\"\n else()\n noop = 1\n end()\n replace(domainPart, filterPattern, \"\", sanitizedDomain)\n AddVariableToJSON(\"original_domain\", domainPart, validationResult)\n AddVariableToJSON(\"sanitized_domain\", sanitizedDomain, validationResult)\n AddVariableToJSON(\"is_valid\", \"true\", validationResult)\n AddVariableToJSON(\"status\", \"success\", validationResult)\n _status = 200\n else()\n AddVariableToJSON(\"error\", \"invalid_domain_format\", validationResult)\n AddVariableToJSON(\"is_valid\", \"false\", validationResult)\n AddVariableToJSON(\"status\", \"error\", validationResult)\n _status = 400\n end()\n else()\n AddVariableToJSON(\"error\", \"invalid_email_format\", validationResult)\n AddVariableToJSON(\"is_valid\", \"false\", validationResult)\n AddVariableToJSON(\"status\", \"error\", validationResult)\n _status = 400\n end()\nelse()\n AddVariableToJSON(\"error\", \"email_parameter_missing\", validationResult)\n AddVariableToJSON(\"is_valid\", \"false\", validationResult)\n AddVariableToJSON(\"status\", \"error\", validationResult)\n _status = 422\nend()",
|
||||||
|
"test_inputs": {
|
||||||
|
"email": "test.user@example-site.com",
|
||||||
|
"domain_filter": "[^a-zA-Z0-9.-]"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'\\{.*\"original_domain\".*\\}', validationResult)",
|
||||||
|
"re.match(r'\\{.*\"sanitized_domain\".*\\}', validationResult)",
|
||||||
|
"re.match(r'\\{.*\"is_valid\".*\"true\".*\\}', validationResult)"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"addResult",
|
||||||
|
"else",
|
||||||
|
"replace"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.171,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.351,
|
||||||
|
"detected": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"if_mode1",
|
||||||
|
"replace",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"addResult",
|
||||||
|
"else",
|
||||||
|
"replace"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"AddVariableToJSON",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"end",
|
||||||
|
"if_mode1",
|
||||||
|
"variableFromJSON"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"task_id": 10,
|
||||||
|
"text": "Desarrolla un microservicio AVAP que consulte una API externa para obtener datos meteorológicos de múltiples ciudades, valide y procese las respuestas, luego almacene los resultados válidos en una base de datos. El servicio debe manejar errores de red, filtrar datos por temperatura mínima, y devolver estadísticas de las ciudades procesadas.",
|
||||||
|
"code": "addParam(\"cities\", cities_param)\naddParam(\"min_temp\", min_temp_param)\naddParam(\"api_key\", api_key_param)\n\nif(cities_param, None, \"==\")\n addVar(_status, 400)\n addResult(\"error: cities parameter is required\")\n return()\nend()\n\nif(api_key_param, None, \"==\")\n addVar(_status, 401)\n addResult(\"error: api_key is required\")\n return()\nend()\n\nif(min_temp_param, None, \"==\")\n addVar(min_temp_param, 0)\nend()\n\nvariableToList(cities_param, cities_list)\ngetListLen(cities_list, total_cities)\n\nif(total_cities, 0, \"==\")\n addVar(_status, 400)\n addResult(\"error: no cities provided\")\n return()\nend()\n\ndb_connector = avapConnector(\"db-uuid-12345\")\normCheckTable(\"weather_data\", table_exists)\n\nif(table_exists, False, \"==\")\n fields = [\"city\", \"temperature\", \"humidity\", \"timestamp\"]\n types = [\"TEXT\", \"REAL\", \"REAL\", \"INTEGER\"]\n ormCreateTable(fields, types, \"weather_data\", create_result)\nend()\n\nvariableToList(\"\", processed_cities)\nvariableToList(\"\", valid_temperatures)\naddVar(total_processed, 0)\naddVar(total_valid, 0)\n\nstartLoop(i, 0, total_cities)\n itemFromList(cities_list, i, current_city)\n \n api_url = \"https://api.weather.com/v1/current?city=\" + current_city + \"&key=\" + api_key_param\n headers = {\"Accept\": \"application/json\"}\n \n try()\n RequestGet(api_url, \"\", headers, weather_response, 5000)\n \n if(weather_response, None, \"!=\")\n variableFromJSON(weather_response, \"temperature\", temp_value)\n variableFromJSON(weather_response, \"humidity\", humidity_value)\n \n if(temp_value, None, \"!=\")\n if(temp_value, min_temp_param, \">=\")\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\n getTimeStamp(current_time, \"%Y-%m-%d %H:%M:%S\", 0, timestamp)\n \n insert_data = {\n \"city\": current_city,\n \"temperature\": temp_value,\n \"humidity\": humidity_value,\n \"timestamp\": timestamp\n }\n \n ormAccessInsert(insert_data, \"weather_data\", insert_result)\n \n variableToList(current_city, temp_city)\n processed_cities = processed_cities + temp_city\n \n variableToList(temp_value, temp_temp)\n valid_temperatures = valid_temperatures + temp_temp\n \n addVar(total_valid, total_valid + 1)\n end()\n addVar(total_processed, total_processed + 1)\n end()\n end()\n exception(api_error)\n addVar(error_msg, \"API error for city: \" + current_city)\n end()\nendLoop()\n\ngetListLen(processed_cities, cities_count)\ngetListLen(valid_temperatures, temps_count)\n\nif(temps_count, 0, \">\")\n addVar(sum_temp, 0)\n startLoop(j, 0, temps_count)\n itemFromList(valid_temperatures, j, temp_item)\n addVar(sum_temp, sum_temp + temp_item)\n endLoop()\n addVar(avg_temp, sum_temp / temps_count)\nelse()\n addVar(avg_temp, 0)\nend()\n\normAccessSelect(\"*\", \"weather_data\", \"temperature >= \" + str(min_temp_param), recent_data)\ngetListLen(recent_data, db_count)\n\nresponse_data = {\n \"cities_requested\": total_cities,\n \"cities_processed\": total_processed,\n \"cities_valid\": total_valid,\n \"average_temperature\": avg_temp,\n \"database_records\": db_count,\n \"processed_cities\": processed_cities\n}\n\naddResult(response_data)\naddVar(_status, 200)",
|
||||||
|
"test_inputs": {
|
||||||
|
"cities": "London,Paris,Madrid",
|
||||||
|
"min_temp": "10",
|
||||||
|
"api_key": "test-api-key-123"
|
||||||
|
},
|
||||||
|
"test_list": [
|
||||||
|
"re.match(r'.*RequestGet.*weather.*', code)",
|
||||||
|
"re.match(r'.*getListLen.*cities_list.*', code)",
|
||||||
|
"re.match(r'.*ormAccessSelect.*weather_data.*', code)"
|
||||||
|
],
|
||||||
|
"_cell": [
|
||||||
|
"RequestGet",
|
||||||
|
"getListLen",
|
||||||
|
"ormAccessSelect"
|
||||||
|
],
|
||||||
|
"_quality": {
|
||||||
|
"fidelity": 1.0,
|
||||||
|
"bonus_ratio": 0.514,
|
||||||
|
"test_quality": 1.0,
|
||||||
|
"richness": 1.0,
|
||||||
|
"quality": 1.454,
|
||||||
|
"detected": [
|
||||||
|
"RequestGet",
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"avapConnector",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"getDateTime",
|
||||||
|
"getListLen",
|
||||||
|
"getTimeStamp",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"ormAccessInsert",
|
||||||
|
"ormAccessSelect",
|
||||||
|
"ormCheckTable",
|
||||||
|
"return",
|
||||||
|
"startLoop",
|
||||||
|
"try",
|
||||||
|
"variableFromJSON"
|
||||||
|
],
|
||||||
|
"cell": [
|
||||||
|
"RequestGet",
|
||||||
|
"getListLen",
|
||||||
|
"ormAccessSelect"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"_status",
|
||||||
|
"addParam",
|
||||||
|
"addResult",
|
||||||
|
"addVar",
|
||||||
|
"avapConnector",
|
||||||
|
"else",
|
||||||
|
"end",
|
||||||
|
"endLoop",
|
||||||
|
"getDateTime",
|
||||||
|
"getTimeStamp",
|
||||||
|
"if_mode1",
|
||||||
|
"itemFromList",
|
||||||
|
"ormAccessInsert",
|
||||||
|
"ormCheckTable",
|
||||||
|
"return",
|
||||||
|
"startLoop",
|
||||||
|
"try",
|
||||||
|
"variableFromJSON"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -1,9 +1,31 @@
|
||||||
{
|
{
|
||||||
"total_cells": 9139,
|
"total_cells": 9139,
|
||||||
"filled_cells": 0,
|
"filled_cells": 10,
|
||||||
"fill_rate": 0.0,
|
"fill_rate": 0.0011,
|
||||||
"distribution_entropy": 0.0,
|
"distribution_entropy": 4.28,
|
||||||
"node_type_frequency": {},
|
"node_type_frequency": {
|
||||||
|
"startLoop": 2,
|
||||||
|
"avapConnector": 1,
|
||||||
|
"getQueryParamList": 1,
|
||||||
|
"gather": 2,
|
||||||
|
"ormAccessUpdate": 2,
|
||||||
|
"getListLen": 2,
|
||||||
|
"RequestPost": 1,
|
||||||
|
"getTimeStamp": 1,
|
||||||
|
"getDateTime": 2,
|
||||||
|
"end": 2,
|
||||||
|
"addVar": 1,
|
||||||
|
"addResult": 3,
|
||||||
|
"encodeMD5": 1,
|
||||||
|
"variableFromJSON": 1,
|
||||||
|
"stampToDatetime": 1,
|
||||||
|
"_status": 1,
|
||||||
|
"return": 1,
|
||||||
|
"else": 1,
|
||||||
|
"replace": 1,
|
||||||
|
"RequestGet": 1,
|
||||||
|
"ormAccessSelect": 1
|
||||||
|
},
|
||||||
"low_quality_cells": 0,
|
"low_quality_cells": 0,
|
||||||
"empty_cells": 9139
|
"empty_cells": 9129
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
"mode": "reward",
|
||||||
|
"weights": {
|
||||||
|
"w_ecs": 0.5,
|
||||||
|
"w_novelty": 0.35,
|
||||||
|
"w_tests": 0.15
|
||||||
|
},
|
||||||
|
"dataset_size": 10,
|
||||||
|
"pool_size": 5,
|
||||||
|
"pool_summary": "GoldPool: 5/5 | reward: min=0.578 max=0.763 mean=0.621",
|
||||||
|
"distribution_entropy": 4.959,
|
||||||
|
"node_type_frequency": {
|
||||||
|
"AddVariableToJSON": 10,
|
||||||
|
"RequestGet": 4,
|
||||||
|
"_status": 10,
|
||||||
|
"addParam": 10,
|
||||||
|
"addResult": 10,
|
||||||
|
"addVar": 10,
|
||||||
|
"else": 10,
|
||||||
|
"end": 10,
|
||||||
|
"endLoop": 9,
|
||||||
|
"function": 10,
|
||||||
|
"gather": 10,
|
||||||
|
"getListLen": 10,
|
||||||
|
"getQueryParamList": 4,
|
||||||
|
"if_mode2": 10,
|
||||||
|
"itemFromList": 10,
|
||||||
|
"replace": 4,
|
||||||
|
"return": 10,
|
||||||
|
"startLoop": 9,
|
||||||
|
"try": 10,
|
||||||
|
"variableFromJSON": 10,
|
||||||
|
"avapConnector": 9,
|
||||||
|
"encodeMD5": 4,
|
||||||
|
"encodeSHA256": 4,
|
||||||
|
"getDateTime": 9,
|
||||||
|
"getTimeStamp": 4,
|
||||||
|
"ormAccessInsert": 9,
|
||||||
|
"ormAccessSelect": 4,
|
||||||
|
"import": 7,
|
||||||
|
"ormAccessUpdate": 3,
|
||||||
|
"ormCheckTable": 4,
|
||||||
|
"randomString": 4,
|
||||||
|
"RequestPost": 3,
|
||||||
|
"ormDirect": 3,
|
||||||
|
"stampToDatetime": 3
|
||||||
|
},
|
||||||
|
"covered_constructs": 34,
|
||||||
|
"total_constructs": 38,
|
||||||
|
"mean_reward": 0.5854
|
||||||
|
}
|
||||||
|
|
@ -42,6 +42,7 @@ dev = [
|
||||||
"polars>=1.38.1",
|
"polars>=1.38.1",
|
||||||
"ragas>=0.4.3",
|
"ragas>=0.4.3",
|
||||||
"ruff>=0.15.1",
|
"ruff>=0.15.1",
|
||||||
|
"scipy>=1.17.1",
|
||||||
"selenium>=4.41.0",
|
"selenium>=4.41.0",
|
||||||
"tree-sitter-language-pack>=0.13.0",
|
"tree-sitter-language-pack>=0.13.0",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
uv.lock
2
uv.lock
|
|
@ -315,6 +315,7 @@ dev = [
|
||||||
{ name = "polars" },
|
{ name = "polars" },
|
||||||
{ name = "ragas" },
|
{ name = "ragas" },
|
||||||
{ name = "ruff" },
|
{ name = "ruff" },
|
||||||
|
{ name = "scipy" },
|
||||||
{ name = "selenium" },
|
{ name = "selenium" },
|
||||||
{ name = "tree-sitter-language-pack" },
|
{ name = "tree-sitter-language-pack" },
|
||||||
]
|
]
|
||||||
|
|
@ -358,6 +359,7 @@ dev = [
|
||||||
{ name = "polars", specifier = ">=1.38.1" },
|
{ name = "polars", specifier = ">=1.38.1" },
|
||||||
{ name = "ragas", specifier = ">=0.4.3" },
|
{ name = "ragas", specifier = ">=0.4.3" },
|
||||||
{ name = "ruff", specifier = ">=0.15.1" },
|
{ name = "ruff", specifier = ">=0.15.1" },
|
||||||
|
{ name = "scipy", specifier = ">=1.17.1" },
|
||||||
{ name = "selenium", specifier = ">=4.41.0" },
|
{ name = "selenium", specifier = ">=4.41.0" },
|
||||||
{ name = "tree-sitter-language-pack", specifier = ">=0.13.0" },
|
{ name = "tree-sitter-language-pack", specifier = ">=0.13.0" },
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue