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.1.tar.gz (33.2 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.1-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: 9lives-0.1.1.tar.gz
  • Upload date:
  • Size: 33.2 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.1.tar.gz
Algorithm Hash digest
SHA256 fa202de0d427a3b5ee041a80957e062ffe2e10c1632bbfcbabdf830670751de4
MD5 bd4b5bc013b8827fa0686a23cbb85f1c
BLAKE2b-256 08c62cde393021f1481e0a809bd5d4b156d9193827ecc6700734814545fabc8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for 9lives-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: 9lives-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9eb3d82d732a68ce5deaaa81dab76acfd36df447a3c7379001cd5fc795f2775
MD5 8c01d86dc561bb951df9bf201fb63187
BLAKE2b-256 759e1301b5168a78a9ac593eb770cc6204959cfea1af79f9a3a9bedd08fc00bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for 9lives-0.1.1-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