MCPcopy
hub / github.com/garrytan/gstack / recordFailure

Function recordFailure

browse/src/security-sidecar-client.ts:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70function recordFailure(): void {
71 const s = getState();
72 const now = Date.now();
73 s.failures = s.failures.filter((t) => now - t < RESPAWN_WINDOW_MS);
74 s.failures.push(now);
75 if (s.failures.length >= RESPAWN_LIMIT) {
76 s.brokenCircuit = true;
77 s.available = false;
78 }
79}
80
81function processBuffer(): void {
82 const s = getState();

Callers 3

processBufferFunction · 0.85
spawnSidecarFunction · 0.85
scanWithSidecarFunction · 0.85

Calls 2

getStateFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected