Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/eventstore/projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ func isTerminalPullRequestState(state string) bool {
}

func isManagerVisibleArtifact(kind string) bool {
return !strings.EqualFold(strings.TrimSpace(kind), "worker_log")
normalized := strings.ToLower(strings.TrimSpace(kind))
return normalized != "worker_log" && normalized != "github_pull_request"
}

func managerSummaryTone(current string, next string) string {
Expand Down
9 changes: 8 additions & 1 deletion internal/eventstore/projection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,20 @@ func TestBuildManagerSummariesCountsOnlyCurrentSignals(t *testing.T) {
Name: "Remote stdout",
UpdatedAt: base.Add(14 * time.Minute),
},
"pr-artifact": {
ID: "open-pr",
TaskID: "task",
Kind: "github_pull_request",
Name: "Open PR",
UpdatedAt: base.Add(15 * time.Minute),
},
}
steering := map[string]core.SteeringItem{
"steering": {
ID: "steering",
TaskID: "task",
Status: "pending",
UpdatedAt: base.Add(15 * time.Minute),
UpdatedAt: base.Add(16 * time.Minute),
},
}

Expand Down
14 changes: 13 additions & 1 deletion internal/orchestrator/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10554,7 +10554,19 @@ func TestServiceWaitsForProviderCapacityWhenUsageExhaustedWithoutFallback(t *tes
t.Fatal(err)
}

snapshot := waitForTaskStatus(t, store, task.ID, core.TaskWaiting)
snapshot := waitForSnapshot(t, store, func(snapshot core.Snapshot) bool {
if len(snapshot.Tasks) == 0 {
return false
}
got := snapshot.Tasks[0]
return got.ID == task.ID &&
got.Status == core.TaskWaiting &&
got.ObjectiveStatus == core.ObjectiveWaitingExternal &&
got.ObjectivePhase == "provider_usage_exhausted" &&
hasTaskAction(snapshot.Events, task.ID, "provider_usage_exhausted", "waiting_external")
}, func(snapshot core.Snapshot) string {
return fmt.Sprintf("missing provider usage exhausted waiting state/action:\n%s", taskActionPayloads(snapshot.Events, task.ID))
})
if snapshot.Tasks[0].ObjectiveStatus != core.ObjectiveWaitingExternal || snapshot.Tasks[0].ObjectivePhase != "provider_usage_exhausted" {
t.Fatalf("objective = %q phase %q", snapshot.Tasks[0].ObjectiveStatus, snapshot.Tasks[0].ObjectivePhase)
}
Expand Down
3 changes: 2 additions & 1 deletion internal/orchestrator/task_assignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,8 @@ func isDisplayWorkItemStatus(status core.WorkItemStatus) bool {
}

func isManagerVisibleArtifact(kind string) bool {
return !strings.EqualFold(strings.TrimSpace(kind), "worker_log")
normalized := strings.ToLower(strings.TrimSpace(kind))
return normalized != "worker_log" && normalized != "github_pull_request"
}

func isActiveAssignmentStatus(status string) bool {
Expand Down
2 changes: 2 additions & 0 deletions internal/orchestrator/task_assignments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ func TestBuildTaskAssignmentsDisplayRowsHideHistoricalFailures(t *testing.T) {
},
Artifacts: []core.Artifact{
{ID: "stdout-log", TaskID: "task-1", Kind: "worker_log", Name: "Remote stdout", Ref: "/home/bot/work/worker/stdout.log", CreatedAt: now, UpdatedAt: now.Add(time.Minute)},
{ID: "pr-open", TaskID: "task-1", Kind: "github_pull_request", Name: "Open result", Ref: "feature/open", URL: "https://github.com/owner/repo/pull/2", CreatedAt: now, UpdatedAt: now.Add(time.Minute)},
{ID: "benchmark", TaskID: "task-1", Kind: "benchmark", Name: "Benchmark", Ref: "shared/bench.txt", CreatedAt: now, UpdatedAt: now.Add(2 * time.Minute)},
},
}
Expand All @@ -298,6 +299,7 @@ func TestBuildTaskAssignmentsDisplayRowsHideHistoricalFailures(t *testing.T) {
displayRowAbsent(t, result.DisplayRows, "pr:pr-merged")
displayRowAbsent(t, result.DisplayRows, "feedback:feedback-merged")
displayRowAbsent(t, result.DisplayRows, "artifact:stdout-log")
displayRowAbsent(t, result.DisplayRows, "artifact:pr-open")

displayRowByID(t, result.DisplayRows, "work:queued-work")
displayRowByID(t, result.DisplayRows, "debug_worker:worker-queued")
Expand Down
3 changes: 2 additions & 1 deletion web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4671,7 +4671,8 @@ function isTerminalPullRequestState(state: PullRequestState["state"] | undefined
}

function isManagerVisibleArtifact(artifact: Artifact): boolean {
return artifact.kind.trim().toLowerCase() !== "worker_log";
const kind = artifact.kind.trim().toLowerCase();
return kind !== "worker_log" && kind !== "github_pull_request";
}

function formatDuration(start: string, end: string): string {
Expand Down
Loading