Skip to content

fix(maintainers): parse merge comment URL structurally - #120649

Merged
vincentkoc merged 1 commit into
mainfrom
fix/pr-merge-comment-url
Aug 8, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/pr-merge-comment-url

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where a successful scripts/pr merge-run could hang while parsing the human-readable output from gh pr comment, preventing post-merge cleanup from running.

Why This Change Was Made

The merge wrapper now posts its completion comment through the GitHub issue-comments API and reads the returned html_url directly. Empty or failed responses retain the existing three-attempt fail-closed behavior, while successful comments still precede remote and local cleanup.

User Impact

Maintainers can complete a merge without depending on human CLI output parsing. Successful runs report the exact completion-comment URL and continue through branch, worktree, and operation cleanup.

Evidence

  • Exact signed head: 82d75551a65e6a85fc442fcd7f487014f3161ea3
  • Focused tests: 30/30 passed in test/scripts/pr-merge.test.ts and test/scripts/pr-wrappers.test.ts
  • node scripts/check-changed.mjs -- scripts/pr-lib/merge.sh test/scripts/pr-merge.test.ts test/scripts/pr-wrappers.test.ts: passed via approved trusted-source local fallback after remote providers were unavailable
  • git diff --check: passed
  • Targeted format check: passed
  • Autoreview: clean, no accepted/actionable findings
  • Local ClawSweeper: nothing_found, high confidence, exact-head best-fix verdict
  • Live structured API proof: fix(maintainers): parse merge comment URL structurally #120649 (comment)
  • Product runtime LOC: 0; maintainer script delta: +20/-15; test delta: +87/-6

Agent Transcript

Redacted Codex session transcript
user:
Implement, prove, publish, and squash-merge the approved maintainer-tooling fix.
Keep the change to the merge wrapper and its two focused test files. Replace
human comment-output parsing with the structured issue-comments API response,
preserve retries and cleanup ordering, run local review and ClawSweeper, then
land through the repository-native PR workflow.

assistant:
Created a fresh worktree from current main and confirmed the defect occurs
after a successful merge comment but before cleanup. Implemented structured
comment creation with a required non-empty html_url, preserving the existing
three attempts and fail-closed cleanup boundary.

assistant:
Added regression coverage for the exact body and URL, comment-before-cleanup
ordering, zero success-path ripgrep calls, transient retries, terminal failure,
and empty structured responses. Focused tests passed 30/30.

assistant:
The first changed-file gate could not reach a remote provider. The approved
trusted-source local fallback initially exposed sparse-checkout and workspace
dependency-link issues; after repairing only the task worktree shape, the exact
gate passed with no source changes.

assistant:
Committed the three-file patch as signed head
82d75551a65e6a85fc442fcd7f487014f3161ea3. Autoreview returned no actionable
findings. Local ClawSweeper returned nothing_found with high confidence and
confirmed the structured API response is the best owner-boundary fix.

@vincentkoc vincentkoc self-assigned this Aug 8, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Structured comment API live proof for exact head 82d75551a65e6a85fc442fcd7f487014f3161ea3. This retained comment was created through the issue-comments endpoint with --raw-field body=... and its URL was read directly from the response via --jq '.html_url // empty'; no human CLI output parsing or stdin transport was used.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 8, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 8, 2026 17:26
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 8, 2026
@vincentkoc
vincentkoc merged commit a07d0e2 into main Aug 8, 2026
215 of 219 checks passed
@vincentkoc
vincentkoc deleted the fix/pr-merge-comment-url branch August 8, 2026 17:58
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to IsaiahStapleton/openclaw that referenced this pull request Aug 8, 2026
…0807

* origin/main:
  fix(qa): honor Crabbox SSH fallback ports (openclaw#120539)
  refactor(core): adopt normalization-core leaf helpers across production (openclaw#120350)
  fix(release): scope upgrade plugin credentials (openclaw#120666)
  fix(ai): preserve long Responses sessions after server compaction (openclaw#120457)
  fix(test): keep fork E2E setup builds observable (openclaw#120653)
  fix(cloud-workers): retain provider operation ownership (openclaw#120661)
  docs: runners plan — one placement model for sessions, devices, and cloud (openclaw#120657)
  refactor(cli): inline state migration policy (openclaw#120641)
  feat(update): scheduled update campaigns with countdown, dev-channel auto-update, and Updates settings page (openclaw#120506)
  chore(i18n): refresh native locales (openclaw#120614)
  fix(ci): retry transient artifact API reads (openclaw#120654)
  fix(clawrouter): honor advertised reasoning efforts (openclaw#120631)
  fix(infra): unify env-truthiness, missing-path, realpath, and abort-sleep semantics (openclaw#120359)
  fix(maintainers): parse merge comment URL structurally (openclaw#120649)
  fix(ui): label only operator-pinned runtimes in model picker rows (openclaw#120646)
  docs(agents): replace exact-head re-review gate with 12-hour review window

# Conflicts:
#	src/agents/payload-redaction.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant