repl_info_limit() now displays accounted-usage/capacity for GLOBAL/SHARED limit instances: iterates limit_get_usage_instances(), filters by vres->limit == matched_limit, reads capacity from core.sharedInst[idx] and accounted usage from core.sharedInUse[idx]. Existence-of-instance and zero-usage are kept distinct per design.md: no matching instance (or one with no populated capacity) prints "no active usage instance yet"; a matched-but-never-charged instance correctly shows accounted=0 instead. Self-caught during implementation and independently confirmed by review: a negative or stale vres->idx (possible per add_vres()'s allocate-then-assign pattern) is not safely rejected by zarray_get_ex()'s idx>=caps check alone -- the new code adds an explicit idx<0 guard rather than copying repl_info_resource_one()'s existing .count-based pre-check (which is itself imprecise for a sparsely-populated zarray, a pre-existing issue left out of scope here). Calling limit_get_usage_instances() for the first time from repl_info.c reproduced the same ~24-file link-stub ripple task 2.1 established for limit_get_configured_limits() -- fixed with the identical pattern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC |
||
|---|---|---|
| .. | ||
| settings | ||
| specs | ||
| steering | ||