{"record":{"id":"27df39e68219ee17","repo":"router-for-me/CLIProxyAPI","slug":"credential-in-flight-part-bounds-are-invalid","errorCode":null,"errorMessage":"credential-in-flight part bounds are invalid","messagePattern":"credential-in-flight part bounds are invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/config/credential_in_flight.go","lineNumber":68,"sourceCode":"\t}\n\tstaleAfter, errStale := time.ParseDuration(c.StaleAfter)\n\tif errStale != nil || staleAfter <= 0 || snapshotInterval > staleAfter/3 {\n\t\treturn 0, 0, 0, fmt.Errorf(\"credential-in-flight.stale-after must be at least three snapshot intervals\")\n\t}\n\tstagingRetention, errRetention := time.ParseDuration(c.StagingRetention)\n\tif errRetention != nil || stagingRetention <= 0 {\n\t\treturn 0, 0, 0, fmt.Errorf(\"credential-in-flight.staging-retention must be positive\")\n\t}\n\treturn snapshotInterval, staleAfter, stagingRetention, nil\n}\n\n// Validate verifies the in-flight observation bounds.\nfunc (c CredentialInFlightConfig) Validate() error {\n\tif _, _, _, errDurations := c.Durations(); errDurations != nil {\n\t\treturn errDurations\n\t}\n\tif c.MaxPartBytes < 1024 || c.MaxPartCount <= 0 || c.MaxPartCount > DefaultInFlightMaxPartCount {\n\t\treturn fmt.Errorf(\"credential-in-flight part bounds are invalid\")\n\t}\n\tif c.MaxRevisionBytes < c.MaxPartBytes || c.MaxRevisionBytes > DefaultInFlightMaxRevisionBytes {\n\t\treturn fmt.Errorf(\"credential-in-flight.max-revision-bytes is outside hard bounds\")\n\t}\n\trequiredParts := (c.MaxRevisionBytes + c.MaxPartBytes - 1) / c.MaxPartBytes\n\tif requiredParts > c.MaxPartCount {\n\t\treturn fmt.Errorf(\"credential-in-flight.max-revision-bytes exceeds part capacity\")\n\t}\n\tif c.MaxAggregateGroups <= 0 || c.MaxAggregateGroups > DefaultInFlightMaxAggregateGroups {\n\t\treturn fmt.Errorf(\"credential-in-flight.max-aggregate-groups is invalid\")\n\t}\n\tif c.MaxDetails < 0 || c.MaxDetails > DefaultInFlightMaxDetails {\n\t\treturn fmt.Errorf(\"credential-in-flight.max-details is invalid\")\n\t}\n\tif c.MaxStringBytes <= 0 || c.MaxStringBytes > DefaultInFlightMaxStringBytes {\n\t\treturn fmt.Errorf(\"credential-in-flight.max-string-bytes is invalid\")\n\t}\n\treturn nil","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/config/credential_in_flight.go#L50-L86","documentation":"Error \"credential-in-flight part bounds are invalid\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/config/credential_in_flight.go:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Adjust the credential-in-flight part size/count settings so they fall within valid bounds.","Review the configuration validation rules for part bounds in credential_in_flight.go."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}