From d5f80558527d49d569a33832e8772bc187b7c29b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:06:31 +0000 Subject: [PATCH 1/2] Initial plan From bdabe886d82ea103ae52d3958e78a995d10906e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:11:33 +0000 Subject: [PATCH 2/2] Change SchedulingIntents.Priority from bool to int Co-authored-by: ianchen0119 <42661015+ianchen0119@users.noreply.github.com> --- decisionmaker/domain/pod.go | 2 +- decisionmaker/rest/intent_handler.go | 2 +- decisionmaker/service/service.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/decisionmaker/domain/pod.go b/decisionmaker/domain/pod.go index 859f8ef..4b62e72 100644 --- a/decisionmaker/domain/pod.go +++ b/decisionmaker/domain/pod.go @@ -28,7 +28,7 @@ type Intent struct { } type SchedulingIntents struct { - Priority bool `json:"priority"` // If true, set vtime to minimum vtime + Priority int `json:"priority"` // Priority value; higher value means higher priority ExecutionTime uint64 `json:"execution_time"` // Time slice for this process in nanoseconds PID int `json:"pid,omitempty"` // Process ID to apply this strategy to Selectors []LabelSelector `json:"selectors,omitempty"` // Label selectors to match pods diff --git a/decisionmaker/rest/intent_handler.go b/decisionmaker/rest/intent_handler.go index d4438e9..f513810 100644 --- a/decisionmaker/rest/intent_handler.go +++ b/decisionmaker/rest/intent_handler.go @@ -54,7 +54,7 @@ func (h *Handler) HandleIntents(w http.ResponseWriter, r *http.Request) { // SchedulingStrategy represents a strategy for process scheduling type SchedulingIntents struct { - Priority bool `json:"priority"` // If true, set vtime to minimum vtime + Priority int `json:"priority"` // Priority value; higher value means higher priority ExecutionTime uint64 `json:"execution_time"` // Time slice for this process in nanoseconds PID int `json:"pid,omitempty"` // Process ID to apply this strategy to Selectors []LabelSelector `json:"selectors,omitempty"` // Label selectors to match pods diff --git a/decisionmaker/service/service.go b/decisionmaker/service/service.go index 5aa3b95..0daa5a2 100644 --- a/decisionmaker/service/service.go +++ b/decisionmaker/service/service.go @@ -113,7 +113,7 @@ func (svc *Service) ProcessIntents(ctx context.Context, intents []*domain.Intent continue } schedulingIntent := &domain.SchedulingIntents{ - Priority: intent.Priority > 0, + Priority: intent.Priority, ExecutionTime: uint64(intent.ExecutionTime), PID: process.PID, CommandRegex: intent.CommandRegex,