Retry card-close PR creation instead of failing silently #86

Merged
weichen merged 3 commits from fix/close-pr-retry into main 2026-09-30 16:48:29 +00:00
Owner

同一文档两用(任务卡=PR 描述):

  • Why: cmd_close 的 PR 创建是单发 curl + 2>/dev/null || true,HTTPS 面任何瞬时故障都会让闭合分支已推送而 PR 静默缺失,2026-09-30 三次踩中均需手工 API 补建。
  • Evidence: bash -n 通过;桩服务器三模式验证(代码块 sed 逐字提取自本文件、在 worktree 分支上下文运行):ok 首发回收 PR URL;exists(POST 恒 500)4 次可见重试后按 head GET 查回已存在 PR;fail(真实 git-panel 主机)4 次重试可见后落 [next] 提示。
  • Impact: 仅 scripts/task.sh cmd_close;其余命令与合入权归属不变;post-merge 钩子与 task-finish 自动闭合经同一函数受益。
  • Refs: 任务卡 fix-close-pr-retry
同一文档两用(任务卡=PR 描述): - Why: cmd_close 的 PR 创建是单发 curl + 2>/dev/null || true,HTTPS 面任何瞬时故障都会让闭合分支已推送而 PR 静默缺失,2026-09-30 三次踩中均需手工 API 补建。 - Evidence: bash -n 通过;桩服务器三模式验证(代码块 sed 逐字提取自本文件、在 worktree 分支上下文运行):ok 首发回收 PR URL;exists(POST 恒 500)4 次可见重试后按 head GET 查回已存在 PR;fail(真实 git-panel 主机)4 次重试可见后落 [next] 提示。 - Impact: 仅 scripts/task.sh cmd_close;其余命令与合入权归属不变;post-merge 钩子与 task-finish 自动闭合经同一函数受益。 - Refs: 任务卡 fix-close-pr-retry
weichen added 3 commits 2026-09-30 16:48:26 +00:00
Why: cmd_close posted the PR with a single curl wrapped in
2>/dev/null || true, so any transient TLS/timeout on the git-home
HTTPS surface left the card-close branch pushed with no PR and no
diagnostics; this hit three times on 2026-09-30 and each needed a
manual API call to recover.

Evidence: bash -n clean; stub-server harness running the block
verbatim (sed-extracted from this file, executed inside the worktree
branch context): ok mode recovers the PR URL on first POST; exists
mode (POST always 500) retries 4x with visible stderr then recovers
the pre-existing open PR via GET ?state=open matching head ref;
fail mode against the retired git-panel host shows four visible
retry notices and falls through to the existing [next] hint.

Impact: scripts/task.sh cmd_close only; precheck/start/sync/finish
untouched; card-close merge authority unchanged (owner merges).
post-merge hook and task-finish auto-close inherit the fix through
the same function.

Refs: task card fix-close-pr-retry
Record the sync checkpoint
ci / test (pull_request) Failing after 1m33s
4601e5b407
weichen merged commit 432f0d2eeb into main 2026-09-30 16:48:29 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#86