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

Method setCatchUpGate

src/mcp/tools.ts:2385–2392  ·  view source on GitHub ↗

* Engine-only: register the catch-up sync promise so the next `execute()` * call awaits it before serving. The handler swallows rejections (the * engine logs them) so a sync failure never propagates as a tool error; * we still want to serve a best-effort result over the same potentially-

(p: Promise<void> | null)

Source from the content-addressed store, hash-verified

2383 * stale data, which is what would have happened without the gate.
2384 */
2385 setCatchUpGate(p: Promise<void> | null): void {
2386 this.catchUpGate = p;
2387 void p?.then(() => {
2388 if (this.catchUpGate === p) this.catchUpGate = null;
2389 }, () => {
2390 if (this.catchUpGate === p) this.catchUpGate = null;
2391 });
2392 }
2393
2394 /**
2395 * Engine-only: called after a tool call's {@link freshen} reopened a database

Callers 3

catchUpSyncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected