Skip to content

fix: integration workflow — correct binary name and report job#755

Merged
PureWeen merged 1 commit intomainfrom
fix/integration-workflow-bugs
Apr 23, 2026
Merged

fix: integration workflow — correct binary name and report job#755
PureWeen merged 1 commit intomainfrom
fix/integration-workflow-bugs

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

Summary

Fixes two bugs in polypilot-integration.yml that caused the integration test run dispatched by PR #745 to fail:

Bug 1: Linux/GTK binary not found

The find-binary step searched for PolyPilot.Gtk / PolyPilot.Gtk.dll, but the GTK csproj has <AssemblyName>PolyPilot</AssemblyName>. The build output is named PolyPilot / PolyPilot.dll, so the search always failed.

Bug 2: Report job — 'not a git repository'

The report job runs gh pr comment without an actions/checkout step. The gh CLI can't determine the repo without a git context. Fixed by adding --repo ${{ github.repository }}.

Evidence

Integration test run #24815950280 — dispatched by agent-fix for PR #745 — failed on both of these.

Two bugs in polypilot-integration.yml:

1. Linux/GTK binary detection searched for 'PolyPilot.Gtk' but the
   csproj has AssemblyName='PolyPilot'. Fixed to search for 'PolyPilot'
   and 'PolyPilot.dll'.

2. Report job's 'gh pr comment' failed with 'not a git repository'
   because there's no checkout step. Added --repo flag instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen merged commit df92792 into main Apr 23, 2026
1 check passed
@PureWeen PureWeen deleted the fix/integration-workflow-bugs branch April 23, 2026 18:25
@github-actions github-actions Bot mentioned this pull request Apr 23, 2026
PureWeen added a commit that referenced this pull request Apr 23, 2026
)

## Summary

The auto-fix feedback loop (`auto-fix-on-failure.yml`) has **never
triggered** (0 runs) because two bugs prevented it from working with
`workflow_dispatch`-based integration tests.

### Bug 1: `branches-ignore: main`
Integration tests dispatched by the agent-fix workflow use
`workflow_dispatch`, which always runs on `main` (the `ref` input only
controls which code is checked out). The `branches-ignore: main` filter
excluded all such runs.

### Bug 2: PR lookup by `head_branch`  
For `workflow_dispatch` runs, `head_branch` is `main`, not the PR
branch. The original code searched for a PR with `--head main`, finding
nothing.

**Fix:** Read `pr_number` from the failed run's inputs via the API
first, fall back to branch-based lookup for push/PR-triggered runs. Also
resolve the actual PR branch name for the comment.

### Bug 3: Insufficient permissions
`pull-requests: read` → `pull-requests: write` (needed for `gh pr
comment`).

### Testing
This was discovered while validating the end-to-end agent-fix pipeline
for PR #745. The agent correctly dispatched integration tests, but when
they failed (due to workflow YAML bugs fixed in #755), the auto-fix loop
never fired.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 23, 2026
## Summary

Closes the last gaps in the agent-fix pipeline so it runs **fully
end-to-end** without human intervention:

**label issue → agent implements fix → self-review → non-draft PR →
integration tests + expert review dispatched → auto-fix if tests fail**

## Changes

1. **`draft: false`** — PRs are now created as non-draft, so
`review-on-open.agent` can trigger on `ready_for_review`
2. **Dispatch `review.agent` directly** — bypasses the `action_required`
approval gate that blocks `pull_request`-triggered workflows for
bot-created PRs
3. **Increase dispatch max** from 2 → 3 (verify-build + integration +
review)
4. **Updated Step 8** — instructions now include dispatching the expert
review with `pr_number`
5. **Recompiled lock file** — `gh aw compile` auto-detected
`review.agent` as a gh-aw workflow and added `.lock.yml` extension
mapping

## Pipeline Flow (after this PR)

```
Issue labeled 'agent-fix'
  → Agent reads issue, explores code, implements fix
  → 3-model self-review (Opus 4.6, Sonnet 4.6, GPT-5.3-Codex)
  → Non-draft PR created
  → Dispatches: verify-build + polypilot-integration + review.agent
  → If tests fail: auto-fix-on-failure dispatches /fix
  → Result: fully reviewed, tested PR ready for merge
```

## Context

This is the final piece of the pipeline work started across PRs #755
(integration test fixes), #756 (auto-fix-on-failure), and #757 (run-name
embedding for PR discovery). Those PRs fixed bugs that prevented the
existing pipeline from completing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant