MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / failOpen

Function failOpen

apps/cloud/src/engine/execution-rate-limit.ts:121–137  ·  view source on GitHub ↗
(
  error: unknown,
  outcome: { readonly errorTag: string; readonly timedOut: boolean },
)

Source from the content-addressed store, hash-verified

119 * error reporter — see the call sites in `decide`.
120 */
121const failOpen = (
122 error: unknown,
123 outcome: { readonly errorTag: string; readonly timedOut: boolean },
124): Effect.Effect<GateDecision> =>
125 Effect.gen(function* () {
126 yield* Effect.annotateCurrentSpan({
127 "rate_limit.blocked": false,
128 "rate_limit.check.failed_open": true,
129 "rate_limit.check.timed_out": outcome.timedOut,
130 "rate_limit.check.error_tag": outcome.errorTag,
131 });
132 yield* Effect.sync(() => {
133 console.warn("[rate-limit] execution rate limit check failed open:", error);
134 });
135 if (!outcome.timedOut) yield* captureCauseEffect(error);
136 return { blocked: false } as const satisfies GateDecision;
137 });
138
139/** Internal sentinel for an exemption lookup that exceeded its time budget. */
140class ExemptionCheckTimeoutError extends Data.TaggedError("ExemptionCheckTimeoutError")<{

Callers 1

decideFunction · 0.85

Calls 3

captureCauseEffectFunction · 0.90
warnMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected