fix(epic-1): repair atomic agent edits and dispatch certainty

This commit is contained in:
bsodfather committed 2026-10-04 23:57:40 +03:00
1 parent 82b215dd74
commit 7aa854de26
16 files changed
+1600 -57

No files matched your search

@@ -48,3 +48,28 @@ fn admin_and_mcp_preserve_dispatch_uncertainty_without_changing_the_code() {
assert!(!mcp.recoverable);
}
}
#[test]
fn admin_and_mcp_project_new_uncertain_upstream_codes_consistently() {
for locale in [ExecutionLocale::En, ExecutionLocale::Ru] {
for code in [
ExecutionErrorCode::UpstreamRateLimited,
ExecutionErrorCode::UpstreamServerError,
ExecutionErrorCode::UpstreamResponseTooLarge,
ExecutionErrorCode::UpstreamStatusError,
] {
let failure = ExecutionFailure::new(code, CorrelationContext::generate())
.with_dispatch_uncertainty();
let admin = execution_test_failure_localized(&failure, locale);
let mcp = tool_error_contract_from_failure(&failure, locale);
assert_eq!(admin["code"], code.as_str());
assert_eq!(admin["retryability"], "manual_reconcile");
assert_eq!(admin["outcome_certainty"], "outcome_unknown");
assert_eq!(admin["retryability"], mcp.retryability);
assert_eq!(admin["outcome_certainty"], mcp.outcome_certainty);
assert_eq!(mcp.error_code, code.as_str());
assert!(!mcp.recoverable);
}
}
}