Turn the number of waiters behind a held guard flag into an enter, backoff, or page remediation action.

Guard Flag Remediation Report

guard_flag.lua
local waiters = 
local guard_limit = 2
local acquired = 1

local action = "enter"
if waiters >= 1 and waiters <= guard_limit then
  action = "backoff"
elseif waiters > guard_limit then
  action = "page"
end

print("waiters=" .. waiters .. " acquired=" .. acquired .. " " .. action)
local waiters = 
local guard_limit = 2
local acquired = 1

local action = "enter"
if waiters >= 1 and waiters <= guard_limit then
  action = "backoff"
elseif waiters > guard_limit then
  action = "page"
end

print("waiters=" .. waiters .. " acquired=" .. acquired .. " " .. action)
local waiters = 
local guard_limit = 2
local acquired = 1

local action = "enter"
if waiters >= 1 and waiters <= guard_limit then
  action = "backoff"
elseif waiters > guard_limit then
  action = "page"
end

print("waiters=" .. waiters .. " acquired=" .. acquired .. " " .. action)
guard contention The waiter count behind a held guard flag is kept as a scalar, so the remediation action stays deterministic and never depends on table or closure identity.