Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.58 KB

File metadata and controls

49 lines (34 loc) · 1.58 KB

parrot

Python theow License charmarr

CI auto-healing for charmarr charms using theow.

Parrot wraps tox invocations with theow's recovery loop. When tox fails, deterministic rules handle known patterns (ruff, codespell, transient errors) and LLM rules investigate novel failures. Fixes are delivered as PRs against the feature branch.

Usage

python -m parrot <collection> --charm-path <path> [--suite <test_file>]

Collections: lint, static, unit, itest

# lint a charm
python -m parrot lint --charm-path charms/prowlarr-k8s

# run integration test
python -m parrot itest --charm-path charms/prowlarr-k8s --suite test_deploy.py

How it works

tox passes  → exit 0, no overhead
tox fails   → theow recovery loop
            → deterministic rule? → auto-fix → retry tox
            → LLM rule?          → investigate with gated tools → retry tox
            → fix found?         → create PR, CI fails with PR link
            → no fix?            → post observations as PR comment, CI fails

Setup

uv run --project . python -m parrot --help

Requires GITHUB_TOKEN in CI for PR creation. LLM rules support Copilot, Anthropic, and Gemini APIs via theow.