myxce/.wolf
Rongsong Shen 0ce7125481
fix(scheduler): percent-based limit display shows raw fraction, not percent (bug-1831)
fmt_limit()/fmt_limit_units() formatted a percent-based limit's value
as a bare snprintf(..., "%f%%", limit->val.val) -- echoing the raw
stored value with a literal "%" appended. But xce_limit_val_t.val is
genuinely a 0-1 fraction when percent is set (confirmed end-to-end:
no /100 or *100 scaling exists anywhere in the config->capnp->runtime
pipeline; confirmed authoritative by the original hand-written C
literal this codebase's oldest percent-based limit was migrated from,
.val = 0.2 for a documented "20% mem cap"). A correctly-configured 20%
limit therefore displayed as "0.200000%" instead of "20.000000%" --
misleading, though technically an honest echo of the stored value.

Fixed by multiplying by 100.0 before formatting. Display-only --
update_limit_res_value()'s actual capacity computation was already
correct and is untouched. fmt_limit() (a thin XCE_UNITS_RAW wrapper)
inherits this fix for its own percent-branch output too, a deliberate,
intentional change from its pre-fix behavior for percent-based limits
specifically (its 5 pre-existing direct tests only assert rc > 0,
never the exact percent string, so this is safe).

Updated test_limit.c's percent-mode test fixture from an unrealistic
.val=80.0 to a realistic .val=0.8 (assertion text unchanged, since
0.8*100=80 either way) and test_repl_limit_table.c's own percent test
to expect its shared fixture's arbitrary .val=50.0 constant correctly
rendering as "5000.000000%". RED confirmed via the raw Unity testlog's
:FAIL: lines (the aggregate meson summary masks single-test failures,
a known harness quirk in this project); GREEN confirmed after, both
lib and scheduler suites, 0 Unity FAILs.

Discovered during live manual verification of scheduler-sim-diagnostics
Requirement 6 against a real deployed cluster.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
2026-09-20 10:00:12 +00:00
..
hooks chore(wolf): checkpoint buglog.json (1062 bugs) 2026-08-27 08:27:43 +00:00
.gitignore chore(wolf): checkpoint buglog.json (1062 bugs) 2026-08-27 08:27:43 +00:00
_scan-state.json Merge branch 'better_xce_build' into scheduler-framework 2026-09-08 03:09:53 +00:00
anatomy-index.json chore(openwolf): sync anatomy index and memory log 2026-09-19 14:59:57 +00:00
anatomy.md chore(openwolf): sync anatomy index and memory log 2026-09-19 14:59:57 +00:00
buglog.json fix(scheduler): percent-based limit display shows raw fraction, not percent (bug-1831) 2026-09-20 10:00:12 +00:00
cerebrum.md fix(scheduler): plugin_end_session() guards on the wrong field (bug-1682/1492) 2026-09-19 11:44:58 +00:00
config.json docs: save scheduler-snapshot-job-allocation and xce-test-cli-ux spec docs, sync OpenWolf state 2026-08-28 06:30:37 +00:00
cron-manifest.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
cron-state.json chore(build): make xce-build.sh self-wrap into nix develop 2026-09-07 15:31:06 +00:00
memory.md chore(openwolf): sync anatomy index and memory log 2026-09-19 14:59:57 +00:00
OPENWOLF.md chore(wolf): checkpoint buglog.json (1062 bugs) 2026-08-27 08:27:43 +00:00
reframe-frameworks.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
STATUS.md chore(wolf): regenerate handoff, sync anatomy/memory bookkeeping 2026-09-13 09:43:21 +00:00