elastic / elastic/ai-github-actions

Fix create-PR prompts to match available safe-output tools

Open
#1,803 0 comments 0 reactions 0 assignees View on GitHub
agentic-workflows
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

> [!CAUTION]
> Protected files were modified in this change.
> This pull request is in `request_review` mode and requires explicit human scrutiny before merge.
>
> Protected files: `.github/workflows/gh-aw-create-pr-from-issue.lock.yml`, `.github/workflows/gh-aw-create-pr-from-issue.md`, `.github/workflows/gh-aw-fragments/safe-output-create-pr.md`, `.github/workflows/gh-aw-issue-fixer.lock.yml`, `.github/workflows/gh-aw-issue-fixer.md`, `.github/workflows/gh-aw-mention-in-issue-by-id.lock.yml`, `.github/workflows/gh-aw-mention-in-issue-by-id.md`, `.github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml`, `.github/workflows/gh-aw-mention-in-issue-no-sandbox.md`, `.github/workflows/gh-aw-mention-in-issue.lock.yml`, `.github/workflows/gh-aw-mention-in-issue.md`, `.github/workflows/gh-aw-release-update.lock.yml`, `.github/workflows/gh-aw-release-update.md`, `.github/workflows/gh-aw-scheduled-fix.lock.yml`, `.github/workflows/gh-aw-small-problem-fixer.lock.yml`, `.github/workflows/gh-aw-small-problem-fixer.md`

## Summary

This fixes the prompt/tool mismatch reported in #1802 where workflows required `ready_to_make_pr` even though it is not exposed in the compiled safe-output tool list.

### What changed

- Removed the unsupported `safe-inputs` / `ready-to-make-pr` frontmatter block from `.github/workflows/gh-aw-fragments/safe-output-create-pr.md`.
- Replaced the `ready_to_make_pr` call instruction in that fragment with an explicit manual pre-PR checklist.
- Updated workflow source prompts that referenced `ready_to_make_pr` to use the manual readiness pass + `create_pull_request` flow:
- `.github/workflows/gh-aw-create-pr-from-issue.md`
- `.github/workflows/gh-aw-small-problem-fixer.md`
- `.github/workflows/gh-aw-release-update.md`
- `.github/workflows/gh-aw-issue-fixer.md`
- `.github/workflows/gh-aw-mention-in-issue.md`
- `.github/workflows/gh-aw-mention-in-issue-no-sandbox.md`
- `.github/workflows/gh-aw-mention-in-issue-by-id.md`
- Recompiled lock files with `make compile` so generated prompts are aligned with available tools.

## Verification

- `make compile`
- `make lint`
- Confirmed compiled lock prompts no longer require `ready_to_make_pr`.

Closes \#1802

> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `models.dev`
>> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "models.dev"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Bug Hunter](https://github.com/elastic/ai-github-actions/actions/runs/31486099190)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

---

> [!NOTE]
> This was originally intended as a pull request, but the git push operation failed.
>
> **Original error:** pushSignedCommits: refusing unsigned push for branch 'fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb': Signed-commit payload violates file-protection policy (request_review): .github/workflows/gh-aw-create-pr-from-issue.lock.yml, .github/workflows/gh-aw-create-pr-from-issue.md, .github/workflows/gh-aw-fragments/safe-output-create-pr.md, .github/workflows/gh-aw-issue-fixer.lock.yml, .github/workflows/gh-aw-issue-fixer.md, .github/workflows/gh-aw-mention-in-issue-by-id.lock.yml, .github/workflows/gh-aw-mention-in-issue-by-id.md, .github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml, .github/workflows/gh-aw-mention-in-issue-no-sandbox.md, .github/workflows/gh-aw-mention-in-issue.lock.yml, .github/workflows/gh-aw-mention-in-issue.md, .github/workflows/gh-aw-release-update.lock.yml, .github/workflows/gh-aw-release-update.md, .github/workflows/gh-aw-scheduled-fix.lock.yml, .github/workflows/gh-aw-small-problem-fixer.lock.yml, .github/workflows/gh-aw-small-problem-fixer.md
>
> **Workflow Run:** [View run details and download bundle artifact](https://github.com/elastic/ai-github-actions/actions/runs/31486099190)
>
> The bundle file is available in the `agent` artifact in the workflow run linked above.

To create a pull request with the changes:

```sh
# Download the artifact from the workflow run
gh run download 31486099190 -n agent -D /tmp/agent-31486099190

# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-31486099190/aw-fix-1802-remove-unavailable-ready-tool.bundle refs/heads/fix-1802-remove-unavailable-ready-tool:refs/bundles/create-pr-fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb-980e1f13
git update-ref refs/heads/fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb refs/bundles/create-pr-fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb-980e1f13
git checkout fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb-980e1f13

# Push the branch to origin
git push origin fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb

# Create the pull request
gh pr create --title 'Fix create-PR prompts to match available safe-output tools' --base main --head fix-1802-remove-unavailable-ready-tool-bd1c0d06dde8adcb --repo elastic/ai-github-actions
```

Contributor guide

Open the contributing guide

Research direction

Start with .github/workflows/gh-aw-fragments/safe-output-create-pr.md and the listed workflow source prompts, then inspect their generated .lock.yml files. Run make compile and make lint, and confirm the compiled prompts no longer require ready_to_make_pr while using the documented manual readiness check and create_pull_request flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, markdown, yaml
Domain
ci-cd, devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.