feat(job-array-one-based-index): REST submit creates arrays numbered from 1 (task 6.2)

preCheckJobRequest returns (n, isArray, err): a bracketed job name is
parsed by ParseSubmitIndexExpr first, so name[1-N] and name[1] create
arrays (one-element arrays included) allocated with
generateArrayJobID, stored under the bare name; expression errors are
answered 400 with their specific message and create nothing; names
without brackets take the unchanged createArrayName path. The response
names the array (jobid = array ID, new array_size, "(n elements)"),
submit-time %I/%J use the first element, and the submit and dispatch
logs identify arrays by array ID. Fixes bug-1896 for REST and xcecli.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-01 11:55:39 +00:00
parent 0318ac5f44
commit c30e5f1d82
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
7 changed files with 390 additions and 40 deletions

View file

@ -270,7 +270,7 @@ func dispatchJobArray(handler NotificationHandler, elements []*models.JobInfo, b
if nNew > 0 {
logger.Info("job array push received and expanded",
zap.Uint64("base_jobid", baseJobID),
zap.String("array_jobid", FormatJobID(int64(ExtractArrayBaseID(baseJobID)))),
zap.Uint64("array_size", arraySize),
zap.Int("new_records", nNew))
}