{"record":{"id":"17ee47b0a2b0a0c5","repo":"Tencent/WeKnora","slug":"snapshot-delete-is-unavailable","errorCode":null,"errorMessage":"snapshot delete is unavailable","messagePattern":"snapshot delete is unavailable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/service/tenant_sandbox_config.go","lineNumber":1273,"sourceCode":"func entityID(entity *types.TenantSandboxConfigEntity) string {\n\tif entity == nil {\n\t\treturn \"\"\n\t}\n\treturn entity.ID\n}\n\nfunc deleteProviderSnapshot(\n\tctx context.Context, releaser sandboxSnapshotReleaser, row *types.TenantSkillSnapshotEntity,\n) error {\n\tif row == nil {\n\t\treturn nil\n\t}\n\tsnapshotID := strings.TrimSpace(row.SnapshotID)\n\tif snapshotID == \"\" {\n\t\treturn nil\n\t}\n\tif releaser == nil {\n\t\treturn fmt.Errorf(\"snapshot delete is unavailable\")\n\t}\n\terr := releaser.DeleteSnapshot(ctx, snapshotID)\n\tif err == nil || sandbox.IsRemoteNotFound(err) {\n\t\treturn nil\n\t}\n\treturn err\n}\n\nfunc (s *TenantSandboxConfigService) cleanupSkillMetadata(\n\tctx context.Context, tenantID uint64, configID string,\n) {\n\tskills, err := s.skills.ListSkillsByConfig(ctx, tenantID, configID)\n\tif err != nil {\n\t\tlogger.Warnf(ctx, \"[sandbox] list skills for config %s cleanup failed: %v\", configID, err)\n\t}\n\tvar pinned []string\n\tseen := map[string]struct{}{}\n\tfor _, skill := range skills {","sourceCodeStart":1255,"sourceCodeEnd":1291,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/service/tenant_sandbox_config.go#L1255-L1291","documentation":"Sentinel guard in deleteProviderSnapshot: the sandboxSnapshotReleaser dependency is nil, so there is no client able to delete the provider-side snapshot. This is a wiring/initialization defect, not a data problem — no delete request is even attempted.","triggerScenarios":"Thrown at internal/application/service/tenant_sandbox_config.go:1273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the sandbox snapshot releaser is injected when the service is constructed","Skip provider snapshot deletion gracefully when the releaser is intentionally absent","Check service wiring/dependency initialization for the tenant sandbox config service"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}