feat(resreq-maxtasks-wiring): wire fresh job-ingest to real task count

core_build_job() now calls apply_job_task_count() right after its
resreq parse succeeds and before core_build_schedobj() reads the
resreq's task count for resreq_fp — so a freshly-submitted multi-task
job's dispatched primary resreq reflects its real requested min/max
task count instead of the previous always-one-task hardcode.

Tracked follow-up (not blocking, see tasks.md Implementation Notes):
test_repl_breakpoints_inspection.c:735 hardcodes an incidental
"Tasks: min = 0, max = 0" byproduct of a fixture's parse_select()
failure; now correctly reports (1,1) per Requirement 1.2. Fix folded
into task 5.1's full-suite regression pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYdtrEWWZfKRRGED7raEYg
This commit is contained in:
Rongsong Shen 2026-09-06 04:01:23 +00:00
parent 799a71ecb1
commit 0aadb49493
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
3 changed files with 107 additions and 1 deletions

View file

@ -10,7 +10,7 @@
- _Boundary: TaskCountWiring_
- [ ] 2. Core: wire the derived task count into live scheduler ingest paths and close the adjacent worker launch-type gap
- [ ] 2.1 (P) Wire fresh job-ingest to apply the job's real requested task count
- [x] 2.1 (P) Wire fresh job-ingest to apply the job's real requested task count
- Call the new helper immediately after fresh job ingest's existing resource-request parse, using the job's real submitted minimum/maximum task count already in scope there
- Observable: a job's dispatched resource request (the one the allocator actually reads) reflects the real requested task count immediately after fresh ingest, not the previous always-one-task default
- _Requirements: 1.1_
@ -87,3 +87,6 @@
- Re-run the existing sequential and chaotic HA soak unmodified and confirm no new job loss, divergence, or liveness stall attributable to this feature
- Observable: a clean soak pass recorded as this feature's HA non-regression evidence
- _Requirements: 5.2_
## Implementation Notes
- Task 2.1 surfaced an out-of-boundary side effect: `src/scheduler/testsuite/test_repl_breakpoints_inspection.c:735`'s `test_info_job_reports_state_queue_priority` hardcodes an incidental `"Tasks: min = 0, max = 0"` byproduct of its fixture's `parse_select()` failing on an unregistered `"type"` resource (which previously left the primary's task-count fields at memset-zero, before `apply_job_task_count()` existed). Now correctly overwritten to `(1,1)` per Requirement 1.2. Before task 5.1 is considered complete, change that assertion's expected substring to `"Tasks: min = 1, max = 1"`.