{"record":{"id":"c55bb4bd826f4750","repo":"Tencent/WeKnora","slug":"session-bound-manager-w","errorCode":null,"errorMessage":"session bound manager: %w","messagePattern":"session bound manager: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sandbox/session_manager.go","lineNumber":162,"sourceCode":"\n\t// Apply the provider's tuning defaults so downstream code reads only\n\t// non-zero TTL / timeout fields. Endpoint defaults are deliberately not\n\t// applied here: this constructor also serves named configs, which must be\n\t// told what they are missing rather than handed a built-in localhost value.\n\tswitch provider {\n\tcase SandboxTypeCube:\n\t\tapplyCubeRuntimeDefaults(cfg)\n\tcase SandboxTypeE2B:\n\t\tapplyE2BRuntimeDefaults(cfg)\n\tcase SandboxTypeDocker:\n\t\tapplyDockerRuntimeDefaults(cfg)\n\t}\n\n\t// Build the provider-specific neutral create request using the\n\t// provider's own template and TTL fields.\n\tcreateRequest, err := buildSessionCreateRequest(provider, cfg)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"session bound manager: %w\", err)\n\t}\n\t// An empty template for the selected provider means the deployment is\n\t// misconfigured. Fail early so operators get a clear message instead of\n\t// a remote API error at the first sandbox allocation.\n\tif strings.TrimSpace(createRequest.TemplateID) == \"\" {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"sandbox: %s template ID is required but not configured\",\n\t\t\tprovider,\n\t\t)\n\t}\n\n\tclient := wrapLangfuseRemoteClient(deps.Client)\n\n\tlifecycle, err := newRemoteSessionLifecycle(\n\t\tclient,\n\t\tdeps.Store,\n\t\tdeps.Checker,\n\t\tcreateRequest,","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/sandbox/session_manager.go#L144-L180","documentation":"After provider defaults are applied, the manager builds the neutral create request via buildSessionCreateRequest. If that builder fails (invalid provider/template/TTL combination in config), the constructor aborts with 'session bound manager' wrapping the builder's error.","triggerScenarios":"buildSessionCreateRequest returns an error for the resolved provider — e.g. invalid TTL values or provider-incompatible config fields after defaults were applied.","commonSituations":"Config fields valid in isolation but rejected for the specific provider; tenant-supplied overrides producing invalid request parameters; upgrade changing buildSessionCreateRequest requirements.","solutions":["Read the inner error from buildSessionCreateRequest in the %w chain and fix the named config field","Reset tenant overrides to the provider defaults to isolate the offending field","Verify Config.Type and deps.Client.Provider() agree, since the request is built for the client's provider","Check the version's requirements for buildSessionCreateRequest inputs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"mgr, err := sandbox.NewSessionBoundManager(deps)\nif err != nil && strings.Contains(err.Error(), \"session bound manager\") {\n    return nil, fmt.Errorf(\"create-request build failed, check provider config: %w\", err)\n}","preventionTips":["Keep Config.Type and Client.Provider() consistent","Test manager construction for each provider in CI","Avoid partial tenant overrides; start from provider defaults"],"tags":["go","configuration","request-build","validation"],"backgroundTag":"invalid-configuration","analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}