feat(job-array-one-based-index): full-suite and live end-to-end verification (tasks 10.1, 10.2)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-01 14:50:06 +00:00
parent fb133c28ee
commit 8a7c134d9b
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C

View file

@ -224,12 +224,12 @@
- _Requirements: 9.4_
- [ ] 10. Validation
- [ ] 10.1 Run every affected suite
- [x] 10.1 Run every affected suite
- Build with tests and run the libxce, controller, scheduler, worker, harness, apiserver (non-cgo and the cgo suite, including a real array submit asserting the reported array identity and `array_size`) and client suites
- Done when every suite passes with zero failures under the ASAN profile and the cgo apiserver submit test passes
- _Requirements: 1.1, 1.10, 3.1, 3.2, 8.1, 8.4_
- [ ] 10.2 Verify end to end on a live cluster
- [x] 10.2 Verify end to end on a live cluster
- Run the multihost verification (elements `[1]` and `[2]` reach DONE across both hosts) and a six-round HA soak confirming elements 1..N survive failover
- Through the client: submit `arr[1-3]` and list `[1]`..`[3]`; kill `<array-id>[2]` and see only element 2 act; run a job script that prints `XCE_JOBINDEX`
- Close bug-1896, bug-1898 and bug-1899 through the buglog with their fix commits
@ -250,3 +250,5 @@
- 7.2: `BuildSelectionPredicates(filters []utils.FilterCondition) (plain []utils.FilterCondition, preds []func(utils.OrderMap) bool, err error)` in `controllers/jobmatch.go`; parser rejections come back as `*SelError`, other rejections with today's texts. Accepted consequence of the one-rule decision: bare `job_id` values under identity operators now go through `ParseIdentitySelection`, so `job_id:eq:+5` / `-1` (previously accepted) are rejected under 5.16. For 7.3: keep the `array_stats` bracket rejection before the builder, and run the builder in the validate-all-first pass before the `exec_hosts` store lookup.
- 7.3: query pre-pass is `validateJobQueryFilters`; `returnSelectionError` maps `*SelError` → 400 with its message. `RestartJobByID` (jobs.go ~:863) still builds unevaluated `CompFilterCondition`s — restart is out of scope, so bug-1898 stays partial for that path. Pre-existing: GetJobsInfo `page_token` does not advance (logged separately).
- 8.1: client `format.ParseSelection(raw, allowRange)`, `ParseNameSelection(raw)`, `SplitSelections(list)`, `Selection.APIKey()`; query-range refusal rule tag "range" (`RuleQueryRange`); `ToAPIJobID(s, allowRange)`; peek uses `ToAPIJobIDLegacy`. For 8.2: `filters/job_filter.go` still runs `isValidJobId` before `ToAPIJobID` and both ID lists still split at every comma.
- 10.1: meson 126/126 OK and every apiserver/xcecli Go package ok (asan, src/build.jai). No cgo unit test drives a full REST array submit (needs a controller); 10.2's live REST flow covers it.
- 10.2: HA `--array-soak` PASS (1..N addressable after failover, one WAL record for 2 and 10000 elements); multihost PASS (`[1]` RUN→DONE on both hosts). Live REST via xce-deploy-ha + xcecli: `arr[1-3]` lists `[1]..[3]`; `bad[0-2]` rejected (rule 2.5); `kill <array-id>[2]` and `kill -J 'arr3[3]'` reach only that element (a PEND element goes to EXIT alone). xcecli submit reads stdin when it is not a TTY: pass `</dev/null` in scripts. Found and fixed bug-1904 (scheduler crash on empty-resreq JOB_UPDATE) and bug-1906 (`jobs list` rejection text) in 6e631caa; logged bug-1905 (xcecd_virtual ignores kill of a RUN job, pre-existing, also plain jobs). `XCE_JOBINDEX` in a running script cannot be observed here: xcecd_virtual never execs the job and real xcecd needs systemd/dbus (absent in this container); covered by `worker/testsuite/test_exdata_jobindex.c`. A live check on a systemd host is still worth doing.