Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

Keep shadow-test failures from retrying successful production work

Rudy Celekli8ecb75e241bb
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;