docs(spec): application-profile v1 attributes: job starter added, others ship with their features

- v1 profile attributes: mode (direct), launch type, env + pre/post-exec,
  essential resreq and limits, plus the job starter
- principle: a profile attribute is added by the spec that builds its job
  feature; requeue/success exit values -> job-requeue (new backlog item),
  checkpoint and warning-before-kill later, output path -> I/O track,
  runtime estimate is not a profile attribute
- log bug-1970: REST submit accepts rerunable, requeue_error_values,
  run_time_estimation, mig_threshold, chkpnt_*, warning_* and drops them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-12 13:08:29 +00:00
parent 83c6eb8024
commit 67002b2a25
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
4 changed files with 134 additions and 4 deletions

View file

@ -18765,6 +18765,32 @@
"record": ".wolf/bugs/bug-1969.md",
"gitea_issue": 400,
"gitea_synced_status": "fixed"
},
{
"id": "bug-1970",
"status": "open",
"status_updated": "2026-10-12",
"status_note": "newly logged",
"component": "apiserver",
"severity": "wrong-result",
"timestamp": "2026-10-12T13:07:37Z",
"last_seen": "2026-10-12T13:07:37Z",
"occurrences": 1,
"error_message": "apiserver accepts rerunable, requeue/checkpoint/runtime/warning submit options, never sends them\n\n**Observed:** (source reading, 2026-10-12, at 83c6eb80)\n`POST /xce/v1/jobs/create` accepts these `JobSubmitRequest` fields\n(`src/frontend/apiserver/models/jobs.go`, struct at :636) and answers success,\nbut none of them reaches the controller:\n```go\nRerunable bool `json:\"rerunable,omitempty\"`\nWarningTimePeriod int `json:\"warning_time_period,omitempty\"`\nWarningAction string `json:\"warning_action,omitempty\"`\nRequeueErrorValues string `json:\"requeue_error_values,omitempty\"`\nRunTimeEstimation int `json:\"run_time_estimation,omitempty\"`\nMigThreshold int `json:\"mig_threshold,omitempty\"`\nChkpntPeriod int `json:\"chkpnt_period,omitempty\"`\nChkpntDir string `json:\"chkpnt_dir,omitempty\"`\nInitChkpntPeriod int `json:\"init_chkpnt_period,omitempty\"`\n```\n- `rerunable`, `warning_time_period`, `warning_action`, `init_chkpnt_period`\n are not read anywhere outside `models/`.\n- `requeue_error_values`, `run_time_estimation`, `mig_threshold`,\n `chkpnt_period`, `chkpnt_dir` are copied into `models.JobInfo`\n (`controllers/jobs.go:1214-1218`, and on restart :1013-1025), but\n `modelJobToSubmit()` (`backend/convert.go:334`) never reads them, and the\n controller's `JobSubmitData` / `JobStartInfo` (`src/schema/controller.capnp`\n :583, :314) have no field for them.\n- None is in `preCheckSubmitOptions()`'s list of refused options\n (`controllers/jobs.go:1285`), which bug-1936 added for exactly this kind of\n option (in/out/err files, asked hosts, begin/term time).\n\n**Expected:** each submit option is either passed on to the job or rejected\nwith 400 naming the option, as `preCheckSubmitOptions()` does for the others.\n**Impact:** wrong result: a user asking for automatic requeue on given exit\ncodes, rerun on host failure, periodic checkpoints or a warning signal before\nthe run limit gets a success reply and a job that does none of it.\n**Found by:** review during the `application-profile` brief discussion\n(extra v1 attributes), 2026-10-12.",
"file": "src/frontend/apiserver/controllers/jobs.go, src/frontend/apiserver/backend/convert.go, src/frontend/apiserver/models/jobs.go",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"tags": [
"apiserver",
"submit",
"silent-drop"
],
"related_bugs": [
"bug-1968",
"bug-1936"
],
"fix_commits": [],
"record": ".wolf/bugs/bug-1970.md"
}
]
}

87
.wolf/bugs/bug-1970.md Normal file
View file

@ -0,0 +1,87 @@
---
id: "bug-1970"
status: "open"
status_updated: "2026-10-12"
status_note: "newly logged"
component: "apiserver"
severity: "wrong-result"
timestamp: "2026-10-12T13:07:37Z"
last_seen: "2026-10-12T13:07:37Z"
occurrences: 1
files: ["src/frontend/apiserver/controllers/jobs.go", "src/frontend/apiserver/backend/convert.go", "src/frontend/apiserver/models/jobs.go"]
tags: ["apiserver", "submit", "silent-drop"]
related: ["bug-1968", "bug-1936"]
---
# bug-1970: apiserver accepts rerunable, requeue/checkpoint/runtime/warning submit options, never sends them
## Description
**Observed:** (source reading, 2026-10-12, at 83c6eb80)
`POST /xce/v1/jobs/create` accepts these `JobSubmitRequest` fields
(`src/frontend/apiserver/models/jobs.go`, struct at :636) and answers success,
but none of them reaches the controller:
```go
Rerunable bool `json:"rerunable,omitempty"`
WarningTimePeriod int `json:"warning_time_period,omitempty"`
WarningAction string `json:"warning_action,omitempty"`
RequeueErrorValues string `json:"requeue_error_values,omitempty"`
RunTimeEstimation int `json:"run_time_estimation,omitempty"`
MigThreshold int `json:"mig_threshold,omitempty"`
ChkpntPeriod int `json:"chkpnt_period,omitempty"`
ChkpntDir string `json:"chkpnt_dir,omitempty"`
InitChkpntPeriod int `json:"init_chkpnt_period,omitempty"`
```
- `rerunable`, `warning_time_period`, `warning_action`, `init_chkpnt_period`
are not read anywhere outside `models/`.
- `requeue_error_values`, `run_time_estimation`, `mig_threshold`,
`chkpnt_period`, `chkpnt_dir` are copied into `models.JobInfo`
(`controllers/jobs.go:1214-1218`, and on restart :1013-1025), but
`modelJobToSubmit()` (`backend/convert.go:334`) never reads them, and the
controller's `JobSubmitData` / `JobStartInfo` (`src/schema/controller.capnp`
:583, :314) have no field for them.
- None is in `preCheckSubmitOptions()`'s list of refused options
(`controllers/jobs.go:1285`), which bug-1936 added for exactly this kind of
option (in/out/err files, asked hosts, begin/term time).
**Expected:** each submit option is either passed on to the job or rejected
with 400 naming the option, as `preCheckSubmitOptions()` does for the others.
**Impact:** wrong result: a user asking for automatic requeue on given exit
codes, rerun on host failure, periodic checkpoints or a warning signal before
the run limit gets a success reply and a job that does none of it.
**Found by:** review during the `application-profile` brief discussion
(extra v1 attributes), 2026-10-12.
## Environment
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
- libc: n/a: found by source reading, no binary run (host ldd reports glibc 2.40)
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
- Build: asan, debug or release alike (Go apiserver code path, independent of the C build profile)
- Code: scheduler-framework @ 83c6eb80-dirty
- Deployment: any: apiserver submit path, before the controller
## Reproduction
1. Deploy a single node with the apiserver (`/xce-deploy-ha localhost:9991`
plus the apiserver), log on, and keep the token in `$TOKEN`.
2. `curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{"queue":"normal","command":"exit 99","requeue_error_values":"99","rerunable":true,"chkpnt_period":5}' http://localhost:8080/xce/v1/jobs/create`
3. Observe a success reply; the job exits with 99 and goes to EXIT (no
requeue); `xcecli jobs list -l` shows no requeue, rerun or checkpoint
setting.
4. Static check: `grep -rn 'RequeueErrorValues\|Rerunable\|ChkpntPeriod' src/frontend/apiserver/backend/`
prints nothing.
- Frequency: deterministic (by construction; steps 1-3 not run live in this
session, step 4 run 2026-10-12)
- Evidence: not kept (source reading; file:line references above)
## Root cause
TODO: required for fixed/partial
## Fix
TODO: required for fixed/partial
## Verification
- Test: TODO: name + file; RED before the fix, GREEN after
- Suites: TODO: suite results and build profile
- Live: TODO: soak/deploy run, or n/a and why
## References
- Related: none