{"record":{"id":"9860b6c882681afd","repo":"paperclipai/paperclip","slug":"workspace-git-scan-saturated","errorCode":"workspace_git_scan_saturated","errorMessage":"Changed files are temporarily unavailable because the Git scan queue is full","messagePattern":"Changed files are temporarily unavailable because the Git scan queue is full","errorType":"http","errorClass":"WorkspaceGitScanError","httpStatus":503,"severity":"error","filePath":"server/src/services/workspace-git-operation-scheduler.ts","lineNumber":536,"sourceCode":"    const existing = this.inFlight.get(key);\n    if (existing) {\n      existing.joinCount += 1;\n      this.totals.singleFlightJoins += 1;\n      return this.addWaiter(existing, input.signal, true);\n    }\n\n    if (this.activeCount >= this.concurrency && this.queue.length >= this.queueCapacity) {\n      this.totals.saturated += 1;\n      this.warnRateLimited(\"saturated\", {\n        event: \"workspace_git_scan\",\n        operation: input.operation,\n        workspaceHash,\n        outcome: \"saturated\",\n        activeCount: this.activeCount,\n        queuedCount: this.queue.length,\n        saturationCount: this.totals.saturated,\n      }, \"workspace Git scan queue saturated\");\n      throw new WorkspaceGitScanError(\n        WORKSPACE_GIT_SCAN_ERROR_CODES.saturated,\n        \"Changed files are temporarily unavailable because the Git scan queue is full\",\n        {\n          workspaceHash,\n          activeCount: this.activeCount,\n          queuedCount: this.queue.length,\n          retryAfterSeconds: 1,\n        },\n      );\n    }\n\n    const fairnessKeys = Array.from(new Set([\n      `repository:${workspaceHash}`,\n      ...(input.fairnessKeys ?? []).filter(Boolean),\n    ])).sort();\n    const scan: PendingScan = {\n      key,\n      operation: input.operation,","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/workspace-git-operation-scheduler.ts#L518-L554","documentation":"Git scan scheduler saturation: active scans are at concurrency AND the wait queue is at capacity, so the request is refused (warned as 'saturated') instead of unboundedly growing the queue. Callers should back off and retry — the queue drains as in-flight scans finish; sustained saturation means concurrency/queue capacity needs tuning.","triggerScenarios":"Thrown at server/src/services/workspace-git-operation-scheduler.ts:536 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The Git scan queue is full. Retry shortly; if persistent, reduce scan request frequency or investigate slow scans."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}