How lee-dongwook/e2e-self-heal works
This repository is an AI-driven Playwright E2E self-healing engine, with a separate result-ingestion API and status UI. The primary workflow starts at the CLI: preprocess failure and diff context, run a LangGraph diagnosis-and-repair loop, verify candidate locators, rerun tests, and emit a heal result; review mode produces source-level advice instead. Shadow testing and the optional CI upload path are additional capabilities. Some subsystem links reflect README documentation; unsampled implementation details are not inferred.
Main entry points: graph.py Repair graph · cli.py CLI workflow · preprocess Failure preprocessing · llm.py LLM client
Components 28
Entry and orchestration
- CLI workflow
app/cli.py - Failure preprocessing
app/preprocess - Log parser
app/preprocess/error_log_parser.py - Diff analyzer
app/preprocess/diff_ast_analyzer.py - ARIA snapshot
app/preprocess/aria_snapshot.py
Repair workflow
- Repair graph
app/graph.py - Loop state
app/state.py - Diagnoser
app/nodes/diagnoser.py - Patch generator
app/nodes/patch_generator.py - Selector verifier
app/nodes/selector_verifier.py - Test runner
app/runner.py - Review mode
app/nodes/reviewer.py - LLM client
app/llm.py - AST safety lock
app/verify/ast_lock.py - Sandbox policy
app/sandbox.py - OrcaRouter provider
app/providers/orcarouter.py
Shadow testing
- Shadow runtime
app/shadow/runtime.py - Trace parser
app/shadow/trace_parser.py - HAR parser
app/shadow/har_parser.py - Snapshot storage
app/shadow/snapshot_store.py
Results and integrations
- Report generator
app/core/report/generator.ts - Playwright reporter
integrations/playwright-reporter/src/index.ts - Result API
product/api/src/product_api/main.py - Run ingestion
product/api/src/product_api/ingest.py - Run database
product/api/src/product_api/db.py - Status UI
product/web/src/App.tsx
Other components
- Engineer or CI
- Playwright and LLM services
Connections 26
- Engineer or CI → CLI workflow: starts
README.md - CLI workflow → Failure preprocessing: prepares context
README.md - Failure preprocessing → Log parser: parses logs
README.md - Failure preprocessing → Diff analyzer: analyzes diff
README.md - Failure preprocessing → ARIA snapshot: captures DOM context
- CLI workflow → Repair graph: runs workflow
app/cli.py - Repair graph → Diagnoser: dispatches
app/graph.py - Repair graph → Patch generator: dispatches
app/graph.py - Repair graph → Selector verifier: dispatches
app/graph.py - Repair graph → Review mode: dispatches
app/graph.py - Repair graph → Test runner: runs tests
README.md - Repair graph → Loop state: tracks loop state
app/graph.py - Review mode → LLM client: requests suggestions
app/nodes/reviewer.py - CLI workflow → Shadow runtime: invokes
app/cli.py - HAR parser → Trace parser: uses trace parser
app/shadow/har_parser.py - CLI workflow → Report generator: generates report
- Playwright reporter → Result API: uploads results
README.md - Result API → Run ingestion: routes uploads
product/api/src/product_api/main.py - Run ingestion → Run database: persists runs
product/api/src/product_api/ingest.py - Status UI → Result API: fetches status
product/web/src/App.tsx - LLM client → Playwright and LLM services: calls provider
app/llm.py - Test runner → Playwright and LLM services: runs Playwright
README.md - Selector verifier → Playwright and LLM services: checks live DOM
README.md - LLM client → OrcaRouter provider: supports optional provider
app/llm.py - Patch generator → AST safety lock: checks patch safety
- CLI workflow → Sandbox policy: uses access policy
app/cli.py