{"record":{"id":"7066ac51e32774cb","repo":"linshenkx/prompt-optimizer","slug":"remote-asset-cleanup-is-not-supported-by-this-prov","errorCode":null,"errorMessage":"Remote asset cleanup is not supported by this provider","messagePattern":"Remote asset cleanup is not supported by this provider","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/ui/src/utils/remote-snapshot-backup.ts","lineNumber":713,"sourceCode":"    }))\n\n  return {\n    candidates,\n    referencedAssetCount: referenced.size,\n    totalCandidateBytes: candidates.reduce((sum, candidate) => sum + (candidate.sizeBytes ?? 0), 0),\n  }\n}\n\nexport const cleanupRemoteSnapshotAssets = async (\n  objectStore: RemoteObjectStore,\n  onProgress?: RemoteSnapshotProgressReporter,\n  options?: {\n    minimumAgeMs?: number\n    now?: Date\n  },\n): Promise<RemoteSnapshotCleanupResult> => {\n  if (!objectStore.delete) {\n    throw new Error('Remote asset cleanup is not supported by this provider')\n  }\n  const analysis = await analyzeRemoteSnapshotAssetCleanup(objectStore, onProgress, options)\n  const failed: Array<{ path: string; message: string }> = []\n  let deleted = 0\n\n  for (const [index, candidate] of analysis.candidates.entries()) {\n    try {\n      onProgress?.({\n        phase: 'cleanup-delete',\n        current: index + 1,\n        total: analysis.candidates.length,\n        item: candidate.path,\n        deleted,\n      })\n      await objectStore.delete(candidate.path)\n      deleted += 1\n    } catch (error) {\n      failed.push({ path: candidate.path, message: (error as Error).message })","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/linshenkx/prompt-optimizer/blob/3e677b1d9f7e0493c142c175560531e7ae786dce/packages/ui/src/utils/remote-snapshot-backup.ts#L695-L731","documentation":"cleanupRemoteSnapshotAssets requires the ability to delete objects, so it first checks that the injected objectStore adapter implements a delete method. Providers without deletion support (read-only or limited adapters) fail fast instead of silently leaving garbage.","triggerScenarios":"Calling cleanupRemoteSnapshotAssets with an objectStore adapter whose delete property is undefined — e.g. a read-only/inspection provider or a custom adapter that only implements put/get/list.","commonSituations":"Custom object store implementation missing the delete method; provider version that hasn't implemented deletion yet; intentionally read-only remote configured for restore-only workflows.","solutions":["Use a provider/adapter that implements delete(object deletion)","Implement the delete method on the custom objectStore adapter","Skip cleanup for read-only providers by checking support before calling"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if (!objectStore.delete) { /* skip cleanup, show info message */ }","typeGuard":"const supportsCleanup = (store: RemoteObjectStore): store is RemoteObjectStore & { delete: NonNullable<RemoteObjectStore['delete']> } => typeof store.delete === 'function'","tryCatchPattern":null,"preventionTips":["Advertise provider capabilities in UI and hide unsupported actions","Use full-featured providers when cleanup is required"],"tags":["object-store","cleanup","capability-check"],"backgroundTag":"unsupported-operation","analyzedSha":"3e677b1d9f7e0493c142c175560531e7ae786dce","analyzedAt":"2026-08-27T21:29:16.709Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}