Skip to content

perf: rewrite pipeline orchestrator as regular GitHub Action (yml) #135

@microsasa

Description

@microsasa

Problem

The pipeline orchestrator is a gh-aw agent (Claude Opus) that takes 7-10+ minutes per run to make simple if/else decisions: check PR state, resolve threads, request reviews. It runs every 15 minutes via cron, burning significant inference tokens for logic that should execute in seconds.

22 overnight runs × ~10 min × Opus pricing = expensive noop loop.

Proposed fix

Rewrite pipeline-orchestrator.md as a regular pipeline-orchestrator.yml GitHub Action with bash logic. The decisions are deterministic — no AI reasoning needed:

  1. Check if aw PR in flight → if not, find eligible issue, dispatch implementer
  2. For each aw PR: check review state, resolve addressed threads, detect CI failures
  3. All via gh api graphql + gh pr commands

The batched GraphQL query from #131 gives us all PR state in one call. The thread resolution logic is: query threads, check last author, resolve if responder replied. Simple bash.

What we learned

  • gh-aw agents are great for tasks requiring judgment (code review, implementation, debugging)
  • gh-aw agents are overkill for deterministic orchestration (if/else on API state)
  • The old pr-rescue.yml approach was right — the bugs were from sloppy implementation, not the approach

Scope

  • New pipeline-orchestrator.yml replacing pipeline-orchestrator.md
  • Same logic: issue dispatch (one at a time), PR orchestration (review, threads, CI)
  • Auth via GH_AW_GITHUB_MCP_SERVER_TOKEN (read) + GH_AW_WRITE_TOKEN (write safe-outputs become direct API calls)
  • Delete pipeline-orchestrator.md + .lock.yml
  • Keep the orchestrator running as gh-aw for now until yml is proven

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions