Skip to content

Add hourly GitHub Actions workflow to auto-fix issues labeled agent_fix#1

Open
hahacium wants to merge 1 commit into
masterfrom
codex/-agent_fix-issues
Open

Add hourly GitHub Actions workflow to auto-fix issues labeled agent_fix#1
hahacium wants to merge 1 commit into
masterfrom
codex/-agent_fix-issues

Conversation

@hahacium

Copy link
Copy Markdown
Owner

Motivation

  • Automatically detect open issues labeled agent_fix and attempt small, safe repository fixes on an hourly schedule to reduce manual triage overhead.
  • Ensure repairs are reproducible, scoped, and reviewed by creating a repair branch and PR instead of pushing direct changes.

Description

  • Add a scheduled and manually-triggerable workflow at .github/workflows/agent-fix.yml that selects one open issue with the agent_fix label, skips if a corresponding PR already exists, creates a branch, runs a Codex repair agent, commits repository changes when present, and opens a PR.
  • Add a reusable Codex prompt at .github/codex/prompts/agent-fix.md that instructs the repair agent to reproduce the issue when possible, make the smallest safe change, preserve project style, run lightweight checks, and produce a concise final summary.
  • The workflow builds a combined prompt file (codex-agent-fix-prompt.md), invokes openai/codex-action@v1 with sandbox: workspace-write, removes temporary prompt/output files before checking for repository changes, and uses printf to safely construct the PR body.
  • The job includes concurrency control and checks to avoid duplicate processing and to only commit when there are actual changes.

Testing

  • Attempted YAML validation with python3 + yaml.safe_load failed due to the environment missing the PyYAML module (expected failure).
  • Validated the workflow YAML with Ruby/Psych using ruby -e 'require "psych"; Psych.load_file(ARGV[0]); puts "#{ARGV[0]}: ok"' .github/workflows/agent-fix.yml, which succeeded.
  • Confirmed repository state and staged changes using git status --short and git diff --cached --stat, which showed the two new files were added.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant