Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ed3335f. Configure here.
| if !ok { | ||
| shared = api.V0044JobDescMsgSharedNone | ||
| } | ||
| return &[]api.V0044JobDescMsgShared{shared} |
There was a problem hiding this comment.
Exclusive field is set but never read
Medium Severity
The new sharedForJob function only reads slurmJobIR.JobInfo.Shared, completely ignoring the Exclusive field. However, Exclusive is still populated by parseAnnotations when the AnnotationExclusive annotation is present. This makes the Exclusive field, its annotation constant, and its parsing logic dead code. Users relying on the old exclusive: false annotation will silently get exclusive (SharedNone) behavior instead of non-exclusive, with no warning or error.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ed3335f. Configure here.
| if !ok { | ||
| shared = api.V0044JobDescMsgSharedNone | ||
| } | ||
| return &[]api.V0044JobDescMsgShared{shared} |
There was a problem hiding this comment.
Existing SubmitJob test broken by behavioral change
Medium Severity
The sharedForJob function now always returns a single-element slice, but the existing test "Submit external job slurmJobIR.Exclusive false yields empty Shared (non-exclusive)" in slurmcontrol_test.go (line 510) expects an empty Shared slice when Exclusive is false. The test interceptor rejects any Shared with len != 0, so the test will fail because sharedForJob returns SharedNone (len=1) for the zero-pod slurmJobIR.
Reviewed by Cursor Bugbot for commit ed3335f. Configure here.


[TBD]
Note
Medium Risk
Touches admission validation and Slurm job submission parameters; incorrect handling could change scheduling/isolation semantics for workloads. Guardrails limit support to single-pod jobs and freeze changes once the external job is running.
Overview
Adds support for a new
slurmjob.slinky.slurm.net/sharedannotation (allowed values:none,user) to control Slurm’s job sharing policy for single-pod workloads.The scheduler translation now parses and validates the annotation into the Slurm job IR, and Slurm job submission sets
JobDescMsg.Sharedaccordingly, defaulting toSharedNone(exclusive) and forcingSharedNonefor group workloads.Admission webhooks now validate the annotation on create/update, reject it for group workload pods (
PodGroup,LeaderWorkerSet), and prevent changes once the external Slurm job is already running. Documentation and unit tests were updated to reflect the new annotation and constraints.Reviewed by Cursor Bugbot for commit ed3335f. Bugbot is set up for automated code reviews on this repo. Configure here.