feat(scheduler-allocator-runner): runner plan and claim search (task 3.2)

The runner tries the plugin's plans in order and claims one distinct host
per bucket, with parjob's rollback and claim snapshots, nslots/nhosts per
candidate, a growable claims buffer and malformed-plan skipping. It
clears alloc_req.host before every candidate so each short host gets its
pend reasons (Req 3.6/3.7). Result assembly follows in task 3.3; until
then a satisfied plan's claims are released and the attempt pends.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-09-30 09:12:01 +00:00
parent d9ef983014
commit 0c011f784e
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
4 changed files with 1080 additions and 14 deletions

View file

@ -38,7 +38,7 @@
- _Depends: 1.1, 1.2_
- _Requirements: 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 5.1, 7.2, 7.3_
- [ ] 3.2 Build the plan and claim search with rollback, test first
- [x] 3.2 Build the plan and claim search with rollback, test first
- Plans are tried in generator order and the first fully satisfied plan wins; each bucket claims the first unclaimed satisfying host in host-iteration order
- Shared amounts are counted as uncommitted exactly once across an attempt that tries several plans
- The per-host request is empty before every candidate host is pre-filtered (cleared at the start of each bucket and after every rejected candidate), so every selection-matching unclaimed short host gets its host/resource reasons; before each candidate the slot count is the bucket's task count and the host count is 1