fix(xce-test-cli-ux): fix bug-1557's join maxmem default

cmd_join_worker's simulated-worker maxmem default was 64 bytes -- a
leftover from when the field was MB-scale, unfixed when maxmem became
bytes-canonical elsewhere. Now 64 * 1024 * 1024. Extracted the
argument-parsing/defaulting logic into join_worker_parse_attrs()
(join_worker_args.c), since it runs entirely before the function's
network call and is a genuine testable seam -- same precedent as
task 2.5's joblist_display.c. Verified live against a real deployed
cluster (workerlist reports MaxMem: 64.00 MB) plus a permanent 5-test
regression suite. maxswap/maxtmp have the identical stale-default bug
(logged as bug-1793) but are deliberately left unfixed here since
USAGE_JOIN_WORKER's help text currently documents their stale values
accurately -- fixing only the code would create a new docs mismatch;
a locked-in sibling-defaults test documents this for the follow-up.
1353/1353 across the full controller suite (+5), 0 regressions.

Task 2.6 of .kiro/specs/xce-test-cli-ux/tasks.md.
Requirements: 12.1

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jaMf9QEwpugH2W9KAuc7f
This commit is contained in:
Rongsong Shen 2026-09-09 16:24:36 +00:00
parent a8154acb0a
commit 878a42fb48
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
7 changed files with 304 additions and 40 deletions

View file

@ -15989,7 +15989,7 @@
"error_message": "xce_test's `worker` -> `join` command defaults to maxmem=64 -- discovered while writing/verifying detailed `help join` text",
"file": "src/controller/testsuite/test.c (cmd_join_worker, hostattrs_t attrs initializer)",
"root_cause": "attrs.maxmem = 64 was a reasonable default back when maxmem was MB-scale (64 MB); this session's earlier fix converted maxmem's canonical unit to bytes (node_information.c/xcecd.c/resources.yaml) but never touched this test-tool default, which is now a nonsensical 64 BYTES of RAM. Purely a manual-test-tool default (join is used to simulate a worker joining without a real xcecd), not a production code path -- callers who don't pass -m get an obviously-wrong but harmless value.",
"fix": "Not fixed -- out of scope for the help-text task that surfaced it (help text correctly documents the actual current default, 64, which is itself the bug). Should become e.g. 64 * 1024 * 1024 (64MB, matching the old intent) to stay consistent with the rest of this session's bytes-canonical convention.",
"fix": "FIXED (2026-09-09, xce-test-cli-ux task 2.6). cmd_join_worker default changed to 64 * 1024 * 1024 (64MB in bytes). Extracted into join_worker_parse_attrs() (join_worker_args.c) with a permanent regression test asserting the corrected default. Verified live: workerlist reports MaxMem: 64.00 MB after a no-'-m' join (was would-be 64.00 B). USAGE_JOIN_WORKER doc update tracked separately under xce-test-cli-ux Requirement 12.2 (task 3.5).",
"tags": [
"test-tool",
"xce_test",
@ -21513,6 +21513,29 @@
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-09-09T12:40:00.000Z"
},
{
"id": "bug-1793",
"timestamp": "2026-09-09T16:24:19Z",
"error_message": "xce_test's worker->join command's maxswap (1024) and maxtmp (2048) defaults have the same stale-MB-scale bug as bug-1557's maxmem -- discovered while fixing bug-1557 (xce-test-cli-ux task 2.6)",
"file": "src/controller/testsuite/join_worker_args.c (join_worker_parse_attrs, hostattrs_t default initialization)",
"root_cause": "Same root cause as bug-1557: maxswap/maxtmp were reasonable defaults (1KB/2KB) back when these fields were a smaller unit, but an earlier session converted maxswap/maxtmp to bytes-canonical (confirmed via resources.yaml 'max swap/tmp disk space in bytes' and hardware_monitor.c's raw-byte sysinfo()/statvfs() computations) without updating this test-tool default. 1024 bytes of swap / 2048 bytes of tmp are just as nonsensical as the old maxmem=64 bytes.",
"fix": "NOT FIXED -- deliberately deferred (xce-test-cli-ux task 2.6). USAGE_JOIN_WORKER's help text currently documents these exact stale values accurately, so fixing only the code without also fixing the docs would create a new code/docs mismatch outside task 2.6's Requirement-12.1-scoped mandate (which covers maxmem only). Recommended: a coordinated fix changing both defaults (e.g. maxswap to a byte-scale value matching typical swap sizing, maxtmp similarly) AND USAGE_JOIN_WORKER's documented defaults, together. A regression test (test_join_worker_sibling_defaults_unchanged in test_join_worker_args.c) currently locks in today's stale values specifically so a future fix here doesn't collide with bug-1557's maxmem-specific test assertions -- update/remove that test's maxswap/maxtmp assertions when this bug is actually fixed.",
"tags": [
"controller",
"testsuite",
"xce_test",
"cmd_join_worker",
"stale-default",
"units",
"unfixed",
"deferred"
],
"related_bugs": [
"bug-1557"
],
"occurrences": 1,
"last_seen": "2026-09-09T16:24:19Z"
}
]
}