Skip to content

Commit cb029a9

Browse files
shivamstaqclaude
andcommitted
Add diagnostic logging for project status update + verify HandedOff fix
The re-dispatch loop was caused by running a binary WITHOUT the HandedOff eligibility check (commit 895ef47). The fix is now in place. Additionally: if the project status update (UpdateProjectField) was being silently skipped due to empty ProjectID/FieldID/OptionID, no log was emitted. Now logs a warning with the actual values so the root cause is visible: "project status update skipped (missing metadata)". This helps diagnose why the project status doesn't change on GitHub — if the FetchProjectFieldMeta at startup failed or the "Human Review" option doesn't exist in the project, the metadata will be empty. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 895ef47 commit cb029a9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

internal/orchestrator/worker.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,23 @@ func (r *Runner) performWriteBack(ctx context.Context, item WorkItem, ws *worksp
317317
// Move project status to handoff value (best-effort)
318318
cfg := r.deps.PullRequestCfg
319319
if cfg.ProjectID != "" && cfg.StatusFieldID != "" && cfg.HandoffOptionID != "" {
320+
logger.Info("updating project status",
321+
"project_id", cfg.ProjectID,
322+
"item_id", item.ProjectItemID,
323+
"field_id", cfg.StatusFieldID,
324+
"option_id", cfg.HandoffOptionID,
325+
)
320326
if err := r.deps.WriteBack.UpdateProjectField(ctx, cfg.ProjectID, item.ProjectItemID, cfg.StatusFieldID, cfg.HandoffOptionID); err != nil {
321327
logger.Warn("project status update failed (non-fatal)", "error", err)
322328
} else {
323329
logger.Info("project status updated to handoff", "status", cfg.HandoffProjectStatus)
324330
}
331+
} else {
332+
logger.Warn("project status update skipped (missing metadata)",
333+
"project_id", cfg.ProjectID,
334+
"field_id", cfg.StatusFieldID,
335+
"option_id", cfg.HandoffOptionID,
336+
)
325337
}
326338

327339
return nil

0 commit comments

Comments
 (0)