Skip to content

feat: pipeline orchestrator + review-responder thread ID fix#130

Merged
microsasa merged 4 commits intomainfrom
feat/pr-rescue-agent
Mar 16, 2026
Merged

feat: pipeline orchestrator + review-responder thread ID fix#130
microsasa merged 4 commits intomainfrom
feat/pr-rescue-agent

Conversation

@microsasa
Copy link
Owner

Pipeline Orchestrator

New gh-aw agent that owns the full lifecycle of agent work — from issue to merged PR.

Issue dispatch (one at a time):

  • Only dispatches implementer if no aw-labeled PR is already in flight AND no implementer run is in progress
  • Finds open code-health/test-audit issues with no PR
  • Dispatches issue-implementer for the first eligible issue

PR orchestration (unstick what's in flight):

  • No Copilot review → requests one
  • Unresolved threads with responder reply → resolves via GraphQL (uses $GITHUB_REPOSITORY_OWNER for identity)
  • Behind main → logs, skips (requires manual rebase)

Removes dispatch-workflow from code-health and test-analysis — orchestrator is the sole dispatcher. Deletes pr-rescue.yml.

Review-Responder Thread ID Fix

Adds step 6: query real PRRT_ thread IDs via gh api graphql before resolving. No bash: tool config added — the responder already has --allow-all-tools (adding bash: would restrict the allowlist and break CI commands).

Documentation

Closes #116. Closes #117. Closes #90. Refs #129.

Sasa Junuzovic and others added 3 commits March 15, 2026 22:34
Add step 6: agent queries real PRRT_ thread IDs using gh api graphql
before resolving. No bash: tool config needed — the responder already
has --allow-all-tools from the compiler default (no explicit bash
tools = unrestricted). Adding bash: would restrict the allowlist and
break CI commands (uv, ruff, pyright, pytest).

GraphQL query uses proper -f/-F variables for owner, name, and PR number.

Refs #114. Closes #117.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pipeline orchestrator owns the full lifecycle (issue → PR → merge):
- Dispatches implementer for eligible issues (one at a time)
- Gates: no dispatch if aw PR in flight OR implementer already running
- Uses actions toolset to check in-progress workflow runs
- Unsticks stuck PRs: requests reviews, resolves threads via GraphQL
- Uses GITHUB_REPOSITORY_OWNER for responder identity
- Behind main: logs and skips (requires manual rebase)

Removes dispatch-workflow from code-health and test-analysis —
orchestrator is now the sole dispatcher. Deletes pr-rescue.yml.

Closes #116. Closes #90. Refs #129.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a Pipeline Orchestrator — a new gh-aw agent workflow that owns the full lifecycle of agent work from issue dispatch to PR merge. It also updates the review-responder instructions to query real GraphQL thread IDs before resolving, and removes the old pr-rescue.yml bash script.

Changes:

  • New pipeline-orchestrator.md agent workflow that dispatches the issue-implementer for eligible issues (one at a time) and unsticks stuck PRs (requests Copilot reviews, resolves addressed threads via GraphQL, logs behind-main PRs)
  • Removed dispatch-workflow capability from code-health and test-analysis workflows (orchestrator is now the sole dispatcher) and deleted pr-rescue.yml
  • Updated review-responder instructions with a new step 6 for querying real PRRT_ thread IDs via gh api graphql, plus extensive documentation and changelog updates

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/pipeline-orchestrator.md New orchestrator agent: issue dispatch + PR unsticking logic
.github/workflows/pipeline-orchestrator.lock.yml Auto-generated compiled workflow for the orchestrator
.github/workflows/review-responder.md Added step 6 for GraphQL thread ID lookup before resolving
.github/workflows/code-health.md Removed dispatch-workflow safe-output
.github/workflows/code-health.lock.yml Recompiled: removed dispatch-workflow config and permissions
.github/workflows/test-analysis.md Removed dispatch-workflow safe-output
.github/workflows/test-analysis.lock.yml Recompiled: removed dispatch-workflow config and permissions
.github/workflows/pr-rescue.yml Deleted: replaced by pipeline orchestrator
docs/agentic-workflows.md Updated architecture diagram, added pitfalls #13-17, orchestrator docs
docs/changelog.md Changelog entries for orchestrator and thread ID fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

CI fixer dispatch was hardwired into ci.yml as a separate job.
Now the orchestrator detects CI failures on aw-labeled PRs and
dispatches ci-fixer — all dispatch decisions in one place.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 16, 2026 06:16
@microsasa microsasa force-pushed the feat/pr-rescue-agent branch from 1521078 to 8315dff Compare March 16, 2026 06:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a pipeline orchestrator gh-aw agent that centralizes the lifecycle management of agent-created PRs, replaces the old pr-rescue.yml bash script, and fixes the review-responder's thread ID hallucination problem.

Changes:

  • New pipeline-orchestrator.md agent workflow that dispatches implementer for eligible issues (one at a time) and unsticks stalled PRs (requests Copilot review, resolves addressed threads via GraphQL, dispatches CI fixer)
  • Updated review-responder.md with a new step 6 to query real PRRT_ thread IDs via gh api graphql before resolving, preventing hallucinated IDs
  • Removed dispatch-workflow from code-health and test-analysis agents, removed CI fixer dispatch from ci.yml, and deleted pr-rescue.yml — all dispatch decisions now centralized in the orchestrator

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/pipeline-orchestrator.md New orchestrator agent: issue dispatch + PR unsticking logic
.github/workflows/pipeline-orchestrator.lock.yml Compiled workflow for the orchestrator
.github/workflows/review-responder.md Added step 6: GraphQL thread ID lookup before resolving
.github/workflows/ci.yml Removed dispatch-ci-fixer job (moved to orchestrator)
.github/workflows/code-health.md Removed dispatch-workflow config and updated instructions
.github/workflows/code-health.lock.yml Compiled changes: removed dispatch-workflow, actions:write
.github/workflows/test-analysis.md Removed dispatch-workflow config and updated instructions
.github/workflows/test-analysis.lock.yml Compiled changes: removed dispatch-workflow, actions:write
.github/workflows/pr-rescue.yml Deleted — replaced by pipeline orchestrator
docs/agentic-workflows.md Updated architecture diagram, added pitfalls #13-17, history
docs/changelog.md Added changelog entries for orchestrator and label gate fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@microsasa microsasa merged commit c2b57cf into main Mar 16, 2026
28 of 32 checks passed
@microsasa microsasa deleted the feat/pr-rescue-agent branch March 16, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants