Skip to content

Commit 13e49c6

Browse files
shivamstaqclaude
andcommitted
Warn loudly at startup if handoff_project_status doesn't exist on project
Root cause of the re-dispatch loop: WORKFLOW.md configured handoff_project_status: "Human Review" but the GitHub Project only has status options [Todo, In Progress, Done]. No "Human Review" option exists. Result: UpdateProjectField silently skipped (empty HandoffOptionID), project status stayed "In Progress" (still in active_values), items re-dispatched endlessly even after PR creation. Fix: At startup, after loading project metadata, verify the configured handoff status exists in the project's status options. If not, emit a prominent stderr warning with available options and how to fix it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cb029a9 commit 13e49c6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

cmd/symphony/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,21 @@ func main() {
175175
"field_id", meta.FieldID,
176176
"options", len(meta.Options),
177177
)
178+
// Verify the handoff status option exists
179+
if _, ok := meta.Options[cfg.PullRequest.HandoffProjectStatus]; !ok {
180+
available := make([]string, 0, len(meta.Options))
181+
for name := range meta.Options {
182+
available = append(available, name)
183+
}
184+
logger.Error("CRITICAL: handoff_project_status not found in project",
185+
"configured", cfg.PullRequest.HandoffProjectStatus,
186+
"available_options", available,
187+
)
188+
fmt.Fprintf(os.Stderr, "\n⚠️ WARNING: handoff_project_status %q does not exist on your GitHub Project.\n", cfg.PullRequest.HandoffProjectStatus)
189+
fmt.Fprintf(os.Stderr, " Available status options: %v\n", available)
190+
fmt.Fprintf(os.Stderr, " Symphony cannot move items to handoff status after PR creation.\n")
191+
fmt.Fprintf(os.Stderr, " Fix: add %q to your project's Status field, or change handoff_project_status in WORKFLOW.md\n\n", cfg.PullRequest.HandoffProjectStatus)
192+
}
178193
}
179194
}
180195

0 commit comments

Comments
 (0)