Skip to content

Reusable workflow: run a small/self-hosted-model agent against a PR #436

Description

@d-morrison

Summary

Add a reusable workflow (a sibling to this repo's claude.yml) that runs a small, self-hosted-model agent against a pull request --- the CI-side runnable counterpart to Morrison-Lab/wai#39 and its companion chapter section, "Small, Local Models for Autonomous Agentic Coding."

Division of labor (from wai#39): wai explains, ai-config configures, gha runs. This issue is the gha half; Morrison-Lab/ai-config#1292 is the sibling ai-config half (the skill that configures and launches the loop locally).

What the workflow should do

Run a self-hosted (or locally-reachable) small model against a PR's diff, using this repo's own composite actions as the loop's verification gates rather than a bespoke test harness:

  • lint-qmd / lint-markdown for Quarto/Markdown content
  • check-links for link validity
  • check-phi for sensitive-data leakage
  • test-coverage (R package tests) where applicable

Each gate should behave the way wai#39's "Guardrails for autonomy" section describes: a non-zero result is a hard stop for that step, not advisory, and the loop should report rather than silently continue past a failed gate.

Open questions to resolve while scoping this

  • How the workflow reaches a self-hosted model (a self-hosted runner with a local Ollama endpoint vs. a remote endpoint reachable from a GitHub-hosted runner) --- this has real security and secrets implications and should be resolved explicitly, not assumed.
  • Whether this composes with the existing claude.yml / claude-code-review.yml pattern (dispatch, concurrency group, permissions) or needs its own trigger shape given a self-hosted runner's different lifecycle.

Non-goals for this issue

  • Model selection and guardrail rationale --- that's wai#39, link back to it rather than duplicating.
  • The local/interactive launcher --- that's ai-config#1292.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions