--- id: "bug-1765" status: "fixed" status_updated: "2026-09-30" status_note: "" component: "xcecli" severity: "wrong-result" timestamp: "2026-09-03T14:51:54Z" last_seen: "2026-09-19T09:00:00Z" occurrences: 1 files: ["src/frontend/tests/regression/run.sh"] tags: ["regression-suite", "test-infra", "jobid-format", "false-fail", "pre-existing"] related: [] fix_commits: ["0f4d23e3"] legacy: true --- # bug-1765: tests/regression/run.sh's 'jobs submit' test FAILs deterministically (28 passed / 1 failed / 1… ## Description tests/regression/run.sh's 'jobs submit' test FAILs deterministically (28 passed / 1 failed / 1 skipped instead of 29/0/0), with the cascading 'jobs kill' test SKIPped as a result -- reproduced identically regardless of which build system (Makefile vs Meson) produced the xcecli binary under test, confirming it predates and is unrelated to the eliminate-frontend-makefile migration. UPDATE (2026-09-29): also found while reproducing: run from a shell whose stdin is an open pipe (a background job, CI), the suite hangs forever at `jobs submit`, because xcecli's submit reads a job script from stdin whenever stdin is a pipe (src/frontend/xcecli/cmd/jobs/submit.go:96). ## Environment - OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64 - libc: glibc 2.42-47 for the controller (nix dev shell); xcecli/xce_apiserver are Go binaries built by meson (go_build) - Toolchain: go (nix dev shell), gcc (GCC) 15.2.0, meson 1.9.1 - Build: asan (src/xce.build.bug1871: controller, scheduler, worker, xceadmin, apiserver, xcecli) - Code: reproduced 2026-09-29 at f5c887dc+ - Deployment: local 3-node HA controller cluster + xcecd_virtual worker + scheduler + apiserver on :8080 (deploy-ha.sh + start-all.sh, /home/claude/tmp/xce-1765), config_file auth (admin/admin) ## Reproduction 1. Deploy a cluster with an apiserver: `bash src/tools/deploy-ha.sh /controller/xce_controller localhost:9991,localhost:9992,localhost:9993 && bash /scripts/start-all.sh` 2. `XCE=/frontend/xcecli/xcecli URL=http://localhost:8080 bash src/frontend/tests/regression/run.sh is submitted to default queue .`, `SKIP jobs kill`, `Results: 28 passed 1 failed 1 skipped`; without ` is submitted...'), but src/frontend/xcecli/cmd/jobs/submit.go:500 post-processes that message client-side, replacing the '<%d>' substring via format.FormatJobID() (src/frontend/xcecli/common/format/jobid.go:40-57), which renders the packed 64-bit job ID as the dashed '{cluster}-{apiserver}-{timestamp}-{sequence}' form (e.g. '1-0-1788446837-0'). tests/regression/run.sh:143's assertion regex ('Job <[0-9]+> is submitted') was never updated for this dashed format. The CLI-side reformatting was introduced by commit d6008ead ('improve frontend jobid display', 2026-05-07) -- nearly four months before this discovery -- so the test has been silently broken (as a false FAIL, not a false PASS) since then, not a new regression. ## Fix src/frontend/tests/regression/run.sh: the submit check matches the dashed ID (`Job <[0-9]+(-[0-9]+){3}> is submitted`) and extracts the whole ID from between the angle brackets (the old `[0-9]{10,}` would have taken only the timestamp field), which `jobs kill` parses back (format.ParseJobID). The submit command reads `` (an immediate kill right after submit can briefly answer `not found` -- logged separately as bug-1894) ## References - Fix commit: 0f4d23e3 - Related: d6008ead (dashed job-ID display), bug-1894 (submit-to-visible lag)