feat(scheduler-allocator-runner): runner guards and shared-resource precheck (task 3.1)

New alloc_runner.c: sched_allocator_run() validates its inputs (-EINVAL
without touching the pend reason), applies the plugin's optional accepts
guard, creates the pend-reason record, then checks shared resources: one
host-less NO_RESOURCE reason per unmet entry (skip only on vget < 0,
fixing bug-1893) and the met amounts counted once as uncommitted. Plan
search follows in task 3.2. Runner tests use a fake allocator contract;
the pend-reason factory audit now scans the runner.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-09-30 08:58:07 +00:00
parent b4470b2b94
commit d9ef983014
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
6 changed files with 726 additions and 1 deletions

View file

@ -34,6 +34,7 @@ scheduler_srcs = [
'src/resource.c',
'src/alloc_cache.c',
'src/host_iter.c',
'src/alloc_runner.c',
'src/plugins/fcfs.c',
'src/plugins/builtin_fcfs.c',
'src/plugins/seqjob_allocator.c',