Skip to main content

Self-healing QA for the coding-agent era. Your tests have nine lives.

Project description

🐾 9lives

Your tests have nine lives. Self-healing QA for the coding-agent era, by QualityMax.

Your coding agent shipped a change and your Playwright test went red? Don't rewrite it — resurrect it:

9l heal login.spec.ts

9l runs the test, classifies the failure, and heals it in tiers:

  1. Tier 1 — offline, free, instant. Selector drifted? 9lives finds the element again from the failure-time page snapshot (text, testid, id, class, aria-label) and rewrites the locator. No LLM, no network, no account.
  2. Tier 2 — the subscription you already pay for. Structural change? 9lives shells out to your installed coding-agent CLI — Claude Code (claude -p), Codex (codex exec), or OpenCode (opencode run) — so your existing subscription does the thinking. No API key to mint, nothing to configure: if the CLI is logged in, healing works. (Prefer raw API? ANTHROPIC_API_KEY / OPENAI_API_KEY work too.)
  3. Always a diff, never a surprise. Healed code is shown as a unified diff and applied only when you approve (or --yes in CI).

Install

curl -sL 9lives.run | sh
pip install 9lives          # or: uv tool install 9lives

Requires Node.js ≥ 18 (Playwright itself runs on Node). Check your setup with 9l doctor.

Commands

9l run <spec>         # run a spec locally; screenshots/videos/traces in .9lives/
9l heal <spec>        # run → heal → re-run → diff → apply on confirm
9l heal <spec> --yes  # CI mode: apply automatically, exit code tells the story
9l doctor             # environment check

Works inside an existing Playwright project (uses your package.json) or on a bare .spec.ts file (scaffolds an ephemeral project automatically). All commands accept multiple specs/globs.

In CI: the GitHub Action

- uses: quality-max/9lives/action@v1
  with:
    specs: "tests/**/*.spec.ts"
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    commit-healed: "true"

Runs on your runner, heals with your key, posts a 🐾 report comment on the PR, and can commit healed specs straight back to the branch. See action/.

BYO everything

  • Your subscription: an installed claude / codex / opencode CLI is auto-detected and used for Tier 2, so the subscription you already use for coding can heal tests too.
  • Or your key: ANTHROPIC_API_KEY / OPENAI_API_KEY. Force a choice with NINELIVES_PROVIDER (claude-code, codex, opencode, anthropic, openai) and NINELIVES_MODEL.
  • Your runner: everything executes on your machine or your CI. Nothing leaves it, nothing phones home.
  • No account. Ever, for anything in this tool.

Security & trust boundary

Tier 1 healing is fully offline and never sends anything anywhere.

Tier 2 builds its prompt from the failing test plus the page snapshot captured at failure. If you heal tests against a site you don't control, that page content becomes model input. In subscription mode it is handed to your local coding-agent CLI (claude / codex / opencode), which can run tools — so a hostile page could attempt prompt injection against your agent. 9lives runs the CLI in an empty scratch directory to limit blast radius, but if you heal against untrusted targets, force plain API mode (no agent tools) with:

NINELIVES_PROVIDER=anthropic   # or openai

Roadmap

  • 9l check — map your git diff to affected user flows, run/generate targeted tests: "did my agent break anything?"
  • 9lives-action — GitHub Action that posts the QA report on PRs, healed commits included
  • 9l gen <url> — crawl a live app and generate a starter test suite

Status

v0.1 prototype — built by QualityMax for local, BYO self-healing Playwright workflows. MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

9lives-0.1.2.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

9lives-0.1.2-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file 9lives-0.1.2.tar.gz.

File metadata

  • Download URL: 9lives-0.1.2.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for 9lives-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2289b64ce828973fc8af68c1943c95c6fd37d31c56e69836bc23cb817bae0922
MD5 54d9d1e120b1ca76c276fd64bfac7a86
BLAKE2b-256 0aefeba5f5aebaa87c0b30a10ec410021bb901b354373834c1a9ed074083e051

See more details on using hashes here.

Provenance

The following attestation bundles were made for 9lives-0.1.2.tar.gz:

Publisher: release.yml on Quality-Max/9lives

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file 9lives-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: 9lives-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for 9lives-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b97cf5bb35416c5856b4d5eb39bccc5c630846f764c2e71d1b0bdaf1531c3ddc
MD5 f0d856c1520d632623edeaff5d53207e
BLAKE2b-256 2d5e1eeb4768e2ce00e6bf49a4bf92866a31a8ef4fe6720fb7624c8bdfcea098

See more details on using hashes here.

Provenance

The following attestation bundles were made for 9lives-0.1.2-py3-none-any.whl:

Publisher: release.yml on Quality-Max/9lives

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page