--- id: "bug-335" status: "fixed" status_updated: "2026-09-24" status_note: "" component: "scheduler" severity: "unknown" timestamp: "2026-06-09T00:00:00Z" last_seen: "2026-09-19T09:00:00Z" occurrences: 1 files: ["src/scheduler/src/scheduler.c"] tags: ["scheduler", "resvals", "latent-bug", "gap-analysis", "c"] related: [] legacy: true --- # bug-335: UPDATE_RESVALS dequeue writes worker resval at index 0 unconditionally instead of resolving… ## Description UPDATE_RESVALS dequeue writes worker resval at index 0 unconditionally instead of resolving resource idx by name ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause zarray_put(&w->resvals, 0, rv->val) hardcodes index 0; worker resvals are indexed by resource idx (see schedobj.c:291) ## Fix FIXED 2026-06-10: UPDATE_RESVALS now resolves rv->name via key_find on sched->resmgr and writes to r->idx (matching UPDATE_RESVALS_FULL pattern) instead of hardcoding index 0. ## Verification _Not recorded (migrated from buglog.json)._ ## References _Not recorded (migrated from buglog.json)._