chore: remove delay no-op handlers from chaos-v3, document name collision

This commit is contained in:
John Dvorak
2026-05-22 14:06:06 -07:00
parent fca585f1e7
commit 26f0e6ad7e
+5 -2
View File
@@ -56,7 +56,7 @@ export interface ChaosApplicationResult {
type InboundChaosHandler = (ctx: EvalContext, event: ChaosEvent) => EvalContext
const inboundHandlers: Record<string, InboundChaosHandler> = {
'inbound-delay': (ctx) => ctx,
// inbound-delay: handled at transport level via sleep(), not here
'inbound-error': (ctx, event) => ({
...ctx,
response: {
@@ -203,7 +203,7 @@ const outboundHandlers: Record<string, OutboundChaosHandler> = {
}),
'outbound-corruption': (response, event) =>
applyCorruptionToDependencyResponse(response, event),
'outbound-delay': (response) => response,
// outbound-delay: handled at transport level via sleep(), not here
}
export function applyChaosToDependencyResponse(
@@ -239,6 +239,9 @@ function applyCorruptionToDependencyResponse(
}
/**
* Apply all outbound chaos events to a set of dependency responses.
* Note: triple-boundary-testing.ts defines a separate applyChaosToAllResponses
* with different types (DependencyResponseSample). This chaos-v3 version operates
* on DependencyResponse and is used by tests and the chaos handler.
*/
export function applyChaosToAllResponses(
responses: ReadonlyArray<DependencyResponse>,