From 8ecb75e241bb9520c239be8cb4e43ef95cbd09df Mon Sep 17 00:00:00 2001 From: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:21:49 -0400 Subject: [PATCH] Keep shadow-test failures from retrying successful production work Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> --- .../engineering-autonomous-optimization-architect.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engineering/engineering-autonomous-optimization-architect.md b/engineering/engineering-autonomous-optimization-architect.md index 28a5fc64..07e448b4 100644 --- a/engineering/engineering-autonomous-optimization-architect.md +++ b/engineering/engineering-autonomous-optimization-architect.md @@ -58,7 +58,14 @@ export async function optimizeAndRoute( // Background Self-Learning: Asynchronously test the output // against a cheaper model to see if we can optimize later. - shadowTestAgainstAlternative(serviceTask, result, getCheapestProvider(providers)); + // Shadow failures must not enter the production retry/circuit-breaker path. + // Deferring the call also captures synchronous adapter failures. + void Promise.resolve() + .then(() => shadowTestAgainstAlternative( + serviceTask, result, getCheapestProvider(providers))) + .catch((error) => { + console.error('Shadow evaluation failed', error); + }); return result;