close
Skip to content

fix: pipeline improvements + SKILL.md refactor (follow-up to #15892)#15927

Open
qfai wants to merge 5 commits into
devfrom
feat/atk-copilot-pipeline-v2
Open

fix: pipeline improvements + SKILL.md refactor (follow-up to #15892)#15927
qfai wants to merge 5 commits into
devfrom
feat/atk-copilot-pipeline-v2

Conversation

@qfai
Copy link
Copy Markdown
Contributor

@qfai qfai commented May 15, 2026

Summary

Three post-merge pipeline fixes + SKILL.md refactor (follow-up to #15892).

Cleanly rebased on latest dev (2026-05-15).

Changes

Fix 1 - Screenshots not appearing in issue

  • uploads.github.com requires multipart form-data; changed curl --data-binary to -F
  • Removed duplicate GIF upload from inside the Copilot agent prompt

Fix 2 - Agent ignores user comments

  • Step 0.5: agent reads non-bot issue comments and acts on user instructions
  • Handles: fix code, create PR, retry requests

Fix 3 - No retry on test failure

  • Retry loop (2x, 30s) around ts-node in agent prompt (infra failures only)
  • Retry loop (2x, 60s) around copilot --yolo in workflow YAML

Refactor - Extract SKILL.md

Agent prompt now loaded at runtime from packages/tests/copilot-test/SKILL.md.
Introduces 3-mode decision framework:

  • Mode A: test-only -> no PR
  • Mode B: new test -> PR on test/issue-{N}-copilot
  • Mode C: fix/feature -> PR on fix/issue-{N}-copilot, verified with Docker
    Same-PR rule: reuse existing branch/PR for same issue.

ATK Pipeline and others added 2 commits May 15, 2026 16:33
1. Fix GIF upload: use multipart form-data (-F flag) instead of raw
   binary (--data-binary). GitHub's uploads.github.com API requires
   multipart; the old approach returned 'Multipart form data required'
   silently, so screenshots never appeared in issue comments.

2. Fix PR creation: add Step 0.5 to Copilot agent prompt to read non-bot
   issue comments and act on user instructions (fix code, create PR,
   retry) before running tests.

3. Fix retry: add retry loop (up to 2x, 30s delay) around the ts-node
   test run inside the agent prompt, and a second retry loop around the
   copilot --yolo invocation at the workflow level. Both retries detect
   infrastructure failures (no results produced) vs real test failures.

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

The Copilot agent prompt is now loaded from packages/tests/copilot-test/SKILL.md
at runtime (cat'd into the prompt before each run). This makes the agent
instructions maintainable independently of the workflow YAML.

SKILL.md defines three operating modes based on issue + comment analysis:
  Mode A: test-only        -> no PR, just run and report
  Mode B: new test needed  -> PR on branch test/issue-{N}-copilot (test files only)
  Mode C: fix/feature      -> PR on branch fix/issue-{N}-copilot (code changes)

Same-PR rule: if a branch already exists for this issue, reuse it.

Docker is framed as the agent's verification tool, not just a local dev aid.
Issue comments are documented as the cross-session memory (since each label
trigger is a fresh stateless Copilot session).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qfai qfai temporarily deployed to engineering May 15, 2026 08:34 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:34 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:39 — with Image GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.34%. Comparing base (0fc1583) to head (40f53ed).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              dev   #15927   +/-   ##
=======================================
  Coverage   93.34%   93.34%           
=======================================
  Files         590      590           
  Lines       37198    37198           
  Branches     6785     6812   +27     
=======================================
  Hits        34721    34721           
  Misses       1831     1831           
  Partials      646      646           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 08:55 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering May 15, 2026 09:32 — with Image GitHub Actions Inactive
GitHub Copilot and others added 2 commits May 15, 2026 17:52
COPILOT_CLI_RUNNER_TOKEN gets 403 even for issue comments (token lacks
org write access). Revert agent step to GITHUB_TOKEN which CAN post
comments but cannot create PRs (org policy blocks both tokens equally).

Add explicit constraint to SKILL.md: do NOT attempt gh pr create.
Instead push the branch and tell the user the branch name + manual PR
creation command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gh pr create returns 403 (org policy). Agent should NOT attempt it.
Document the constraint explicitly so the agent pushes the branch and
tells the user to open the PR manually.

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