This is an automated email from the ASF dual-hosted git repository. nic443 pushed a commit to branch feat/ai-rate-limiting-expression in repository https://gitbox.apache.org/repos/asf/apisix.git
commit f3f9176826281149b124407d1dc4e308d39083ca Author: Nic <[email protected]> AuthorDate: Thu Apr 9 20:51:58 2026 +0800 fix: localize math.huge to pass lj-releng lint check --- apisix/plugins/ai-rate-limiting.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apisix/plugins/ai-rate-limiting.lua b/apisix/plugins/ai-rate-limiting.lua index 111523387..85875113b 100644 --- a/apisix/plugins/ai-rate-limiting.lua +++ b/apisix/plugins/ai-rate-limiting.lua @@ -22,6 +22,7 @@ local pairs = pairs local pcall = pcall local load = load local math_floor = math.floor +local math_huge = math.huge local core = require("apisix.core") local limit_count = require("apisix.plugins.limit-count.init") @@ -339,7 +340,7 @@ local function eval_cost_expr(conf_cost_expr, raw) if type(result) ~= "number" then return nil, "cost_expr must return a number, got: " .. type(result) end - if result ~= result or result == math.huge or result == -math.huge then + if result ~= result or result == math_huge or result == -math_huge then return nil, "cost_expr returned non-finite value" end if result < 0 then
