{"record":{"id":"a059c7a69c407d5e","repo":"gastownhall/beads","slug":"proxied-server-provider-t-does-not-offer-the-cycl","errorCode":null,"errorMessage":"proxied-server provider %T does not offer the cycle-report surface","messagePattern":"proxied-server provider %T does not offer the cycle-report surface","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/dep_cycles.go","lineNumber":34,"sourceCode":"\n// openCycleDetector hands back the cycle role for whichever route this\n// invocation is on.\nfunc openCycleDetector() (issueops.CycleDetector, error) {\n\tif usesProxiedServer() {\n\t\treturn proxiedCycleDetector()\n\t}\n\treturn store.CycleDetector()\n}\n\n// proxiedCycleDetector hands back the guarded cycle-report surface for the\n// proxied-server provider, through the provider's own capability accessor.\nfunc proxiedCycleDetector() (issueops.CycleDetector, error) {\n\tif uowProvider == nil {\n\t\treturn nil, errors.New(\"proxied-server UOW provider not initialized\")\n\t}\n\tsrc, ok := uowProvider.(uow.CycleDetectorSource)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"proxied-server provider %T does not offer the cycle-report surface\", uowProvider)\n\t}\n\treturn src.CycleDetector()\n}\n\n// runDepCycles is the whole of `bd dep cycles` on both routes.\nfunc runDepCycles() error {\n\tdetector, err := openCycleDetector()\n\tif err != nil {\n\t\treturn HandleErrorRespectJSON(\"%v\", err)\n\t}\n\treport, err := detector.DetectCycles(rootCtx, issueops.DetectCyclesRequest{})\n\tif err != nil {\n\t\treturn HandleErrorRespectJSON(\"%v\", err)\n\t}\n\n\tif jsonOutput {\n\t\t// The role's slice is empty rather than nil for an acyclic workspace, so\n\t\t// this is `[]` and never `null` without a guard here.","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/dep_cycles.go#L16-L52","documentation":"proxiedCycleDetector performs a runtime capability check: when running against a proxied server, the UOW provider must implement uow.CycleDetectorSource to expose cycle reports. If the concrete provider type does not, this error names the offending type with %T. It is a capability-mismatch guard, not a user-input error.","triggerScenarios":"Running `bd dep cycles` in proxied-server mode where uowProvider is set but does not implement CycleDetectorSource; typically a beads version mismatch where the server's provider predates the cycle-report surface.","commonSituations":"Newer bd client against an older bd server that lacks the cycle-report capability; custom/embedded provider swapped in that only implements the base surfaces; misrouted embedded mode where uowProvider holds the wrong concrete type.","solutions":["Upgrade the bd server (daemon) to a version whose provider implements the cycle-report surface so client and server match.","Run `bd doctor` / check versions on both client and server; restart the daemon after upgrading.","If using a custom provider, implement uow.CycleDetectorSource (CycleDetector() method) on the provider type.","Run cycles detection locally (non-proxied) if server upgrade is not possible."],"exampleFix":"// before: old server provider type lacks the surface\n// proxied-server provider *server.LegacyProvider does not offer the cycle-report surface\n\n// after: upgrade server binary, then restart\nbd server stop && bd server start  # new provider implements uow.CycleDetectorSource","handlingStrategy":"type-guard","validationCode":"// before invoking proxied routes, check server capability\nif src, ok := uowProvider.(uow.CycleDetectorSource); !ok {\n\tfmt.Fprintln(os.Stderr, \"server lacks cycle-report surface; upgrade bd server\")\n\tos.Exit(1)\n}","typeGuard":"func hasCycleDetector(p any) bool {\n\t_, ok := p.(uow.CycleDetectorSource)\n\treturn ok\n}","tryCatchPattern":"det, err := proxiedCycleDetector()\nif err != nil {\n\tif strings.Contains(err.Error(), \"cycle-report surface\") {\n\t\treturn fmt.Errorf(\"upgrade bd server to use `bd dep cycles`: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Keep client and server bd versions in lockstep; upgrade both together.","Run bd doctor after upgrades to confirm provider capabilities.","Restart the daemon after binary upgrades so the new provider type is loaded.","Feature-detect surfaces before exposing proxied subcommands in tooling."],"tags":["capability-mismatch","proxied-server","version-mismatch","cycles"],"backgroundTag":"unsupported-capability","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}