fix(scheduler-sim-decision-trace): render an unset pend main reason as none

The pend outcome printed 'main reason: code 0' for every pend the
allocator builds, because 0 (libxce's 'no main reason set') fell through
to the unknown-code fallback. Found by the 6.1 end-to-end review.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-08 16:07:53 +00:00
parent 625663af59
commit 4d1a245fd9
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
3 changed files with 43 additions and 2 deletions

View file

@ -338,6 +338,7 @@ static void test_step_mode_full_all_jobs_and_file_copy(void)
"\n cluster-wide check failed; no placement plans tried\n",
"\n single requirement not satisfied\n",
"\n outcome: PEND\n",
"\n main reason: none\n",
"\n resource license: NO_RESOURCE\n",
"\n resource limit=cluster_slots: NO_RESOURCE\n");
TEST_ASSERT_NULL(strstr(b, "plan 1"));
@ -362,7 +363,7 @@ static void test_step_mode_full_all_jobs_and_file_copy(void)
"\n alternative 2/2 not satisfied\n",
"\n no alternative chosen: none of the 2 alternatives was "
"satisfied\n",
"\n outcome: PEND\n");
"\n outcome: PEND\n", "\n main reason: none\n");
free(b);
/* 105, session 5: per-host shortfall rows next to limit rows, the