Skip to content

Ship a GitHub Action that opens a PR with the proposed repair #74

Description

@Johin2

Problem

The natural home for this library is CI: tests fail, self-heal proposes a fix, a human reviews it. Today getting there means hand-rolling a workflow that pip-installs the package, invokes the CLI, parses its stdout, and drives git and gh itself. Every adopter writes the same fifty lines of YAML, slightly differently.

The alternative people will reach for otherwise is --apply plus an auto-commit, which is exactly the usage that should be discouraged.

Proposal

Ship a composite GitHub Action in this repo.

- uses: Johin2/self-heal@v1
  with:
    target: src/billing.py::compute_total
    test: tests/test_billing.py::test_totals
    proposer: claude
    mode: pull-request      # or: comment | check-only

pull-request opens a branch with the applied patch and the repair trace in the PR body. comment posts the proposed diff on the failing PR without touching any branch. check-only just reports pass/fail. Default to a review-required mode; never push to the default branch.

Acceptance criteria

  • Composite action definition lives in the repo and is versioned with a v1 tag.
  • Provider API key is read from repo secrets, never echoed into logs.
  • PR body includes the diff and the attempt trace.
  • Documented end-to-end in the README with a copy-pasteable workflow.
  • Runs against this repo's own suite as a self-hosted dogfood check.

Notes

Depends on the report export in #60 for the PR body content, and reads much better once #33's token/cost accounting exists, so the PR can state what the repair cost.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions