feat(scheduler-sim-repl-verbosity): task 8.2 - implement resource table rendering
Rewrites info worker's/info resource's resource-listing loops from a flat, unconditional fprintf into a 3-pass, section-grouped table (Consumable/Capacity, Load Metrics, Static Hardware Attributes), units_mode-aware value rendering (raw/human/both, including swp's MB->bytes conversion), whole-number formatting with no trailing .00 outside the consumable value=/used= pair, and jobid-range-compression adoption for info worker's assigned-job listing (Requirements 6.4-6.6, 4.5). All 10 of task 8.1's tests pass. Preserves every named prior-bug invariant (bug-1727's avail_v-as-total, bug-1613's consumable/ non-consumable split, bug-1593's GLOBAL/SHARED filter, bug-1688's .caps-bound iteration). Fixes one pre-existing test (bug-1688, predating this spec) whose "value=5.00" assertion for a whole-number non-consumable resource directly conflicts with Requirement 6.5's intentional no-trailing-.00 change - same class of fix as task 4.2's pre-existing-test updates. repl_info.c grew from 985 to 1267 lines (58% over the 800-line cap, worse than any other file this spec touched) - but unlike repl.c/ repl_break.c, it was already 23% over cap before this spec began. Review empirically confirmed a narrow helper-only extraction doesn't achieve compliance (still 41% over), and a compliance-achieving split would mean restructuring ~690 lines of pre-existing display logic this feature doesn't otherwise touch - a larger scheduler-core-level decision, accepted as a residual rather than folded into this task. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAWMhfRJFnmmnG8h97yUDd
This commit is contained in:
parent
e48e222bd1
commit
9db99964f0
4 changed files with 415 additions and 130 deletions
|
|
@ -1081,7 +1081,7 @@ static void test_info_worker_shows_all_populated_resources_when_count_is_stale(
|
|||
strstr(captured, "resource mem: value=100.00"),
|
||||
"the first populated slot must still display");
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(
|
||||
strstr(captured, "resource r1m: value=5.00"),
|
||||
strstr(captured, "resource r1m: value=5"),
|
||||
"a populated slot at an index >= the (stale) .count must still "
|
||||
"display -- iterating by .count instead of .caps (bug-1688) "
|
||||
"silently truncates output here");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue