MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / degrade

Method degrade

src/sync/watcher.ts:669–675  ·  view source on GitHub ↗

* Permanently disable live watching after a terminal runtime failure * (watch-resource exhaustion, lock contention past the retry budget, or a * persistent generic sync failure past the retry budget). * Idempotent: logs one actionable warning, fires WatchOptions.onDegraded * once

(reason: string, context: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

667 * once, and stops the watcher. A subsequent start() clears the latch.
668 */
669 private degrade(reason: string, context: Record<string, unknown> = {}): void {
670 if (this.degradedReason) return;
671 this.degradedReason = reason;
672 logWarn('File watcher disabled', { projectRoot: this.projectRoot, reason, ...context });
673 this.onDegraded?.(reason);
674 this.stop();
675 }
676
677 /**
678 * Warn ONCE that the Linux inotify watch budget is exhausted (ENOSPC), and

Callers 4

startMethod · 0.95
startRecursiveMethod · 0.95
watchTreeMethod · 0.95
flushMethod · 0.95

Calls 2

stopMethod · 0.95
logWarnFunction · 0.90

Tested by

no test coverage detected