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

@ -61,6 +61,7 @@ static const char* const SCANNED_RELATIVE_PATHS[] = {
"include/plugin.h",
"include/scheduler.h",
"include/sched/types.h",
"src/alloc_runner.c",
"src/core.c",
"src/core_session.c",
"src/decision.c",