Skip to content

feat(e2e): add /fix-e2e command and AI agent skills#4516

Open
zdrapela wants to merge 22 commits intoredhat-developer:mainfrom
zdrapela:skill-agent-e2e-fix
Open

feat(e2e): add /fix-e2e command and AI agent skills#4516
zdrapela wants to merge 22 commits intoredhat-developer:mainfrom
zdrapela:skill-agent-e2e-fix

Conversation

@zdrapela
Copy link
Copy Markdown
Member

@zdrapela zdrapela commented Mar 31, 2026

How /fix-e2e works

The /fix-e2e command accepts a Prow job URL, Playwright report URL, or Jira ticket and runs through 7 phases autonomously:

  1. Parse the CI failure to extract test name, spec file, platform, and error details
  2. Create a fix branch from the correct upstream release branch (or use the current branch)
  3. Deploy RHDH to a cluster via local-run.sh
  4. Reproduce the failure using the Playwright healer agent (or direct execution in Cursor)
  5. Diagnose and fix — the healer debugs the test, inspects the live UI, and edits the code
  6. Verify — single run, 5x stability check, and optionally full project run with CI=true
  7. Submit PR — create draft PR, trigger Qodo review, address feedback, run CI

Each phase loads a dedicated skill with detailed instructions. The agent stops and asks for user input at decision gates (e.g., product bug vs test issue, cannot reproduce, skip deployment).

This agent was already used to create this PR: #4526

Summary

  • Add 6 AI agent skills and /fix-e2e command for autonomous E2E CI failure investigation and fix workflow
  • Initialize Playwright Test Agents (healer/generator/planner) with MCP server for live browser interaction
  • Auto-generate .env file via local-test-setup.sh --env with secure file handling and multiline secret support
  • All skills managed via rulesync and synced to OpenCode, Claude Code, and Cursor

Skills

Skill Purpose
e2e-parse-ci-failure Parse Prow URL, Playwright report (via Playwright MCP), or Jira ticket to extract failure details
e2e-deploy-rhdh Deploy RHDH via local-run.sh with error recovery, OCP vs K8s differentiation
e2e-reproduce-failure Run failing test via healer agent, classify as consistent/flaky/unreproducible
e2e-diagnose-and-fix Root cause analysis + fix using Playwright healer agent, Playwright best practices
e2e-verify-fix Single + multi-run stability, full project check, code quality validation
e2e-submit-and-review Create cross-fork PR, trigger Qodo review, select CI jobs from /test ? response

Key design decisions

  • Sourcebot/Context7 are optional with gh search code / local clone fallbacks
  • OCP jobs support -s deploy-only mode; K8s jobs (AKS/EKS/GKE) require full execution
  • test.fixme() requires healer confirmation, user approval, and a RHDHBUGS Jira ticket
  • Playwright healer not available in Cursor — skills include fallback to direct execution
  • Multiple failures from one job: present classified table, ask user, group by root cause
  • --project=any-test for individual test runs to skip smoke test dependency
  • /test ? bot responds in seconds (5s poll); Qodo review takes 1-3 min (15s poll)
  • Required CI jobs only trigger on non-draft PRs
  • .env written atomically via temp file with umask 077 + chmod 600

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 31, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions
Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@zdrapela zdrapela force-pushed the skill-agent-e2e-fix branch from e8cd40c to d237b44 Compare April 1, 2026 06:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

The container image build workflow finished with status: cancelled.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

The container image build workflow finished with status: cancelled.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

The container image build workflow finished with status: cancelled.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Copy Markdown
Contributor

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@zdrapela zdrapela force-pushed the skill-agent-e2e-fix branch from d947b22 to 0a20e05 Compare April 13, 2026 09:38
@github-actions
Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@zdrapela
Copy link
Copy Markdown
Member Author

Addressing review comment #4516 (comment):

This says .env is already in .gitignore, but e2e-tests/.gitignore doesn't have a .env entry.

Fixed. .env was already in e2e-tests/.gitignore at line 31. The .env file is now auto-generated by local-test-setup.sh --env (with proper single-quoting for multiline secrets like PEM certs), replacing the broken manual env | grep approach. The skill text has been updated to reflect this.

@zdrapela
Copy link
Copy Markdown
Member Author

Addressing review comment #4516 (comment):

git add -A can accidentally stage the .env file from the earlier step. Should use git add <specific-files> instead.

Fixed. Replaced git add -A with git add <specific-files> and added an explicit warning against using git add -A or git add .. The .env file is now also properly gitignored in e2e-tests/.gitignore.

@zdrapela zdrapela force-pushed the skill-agent-e2e-fix branch from 0a20e05 to def054a Compare April 13, 2026 14:18
@zdrapela zdrapela marked this pull request as ready for review April 13, 2026 14:19
@openshift-ci openshift-ci bot requested review from albarbaro and benwilcock April 13, 2026 14:19
@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge bot commented Apr 13, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Insecure .env permissions🐞
Description
local-test-setup.sh --env writes K8S_CLUSTER_TOKEN and all Vault secrets to e2e-tests/.env but
never restricts file permissions, so credentials can be readable by other users on shared machines.
.gitignore prevents commits but does not prevent local file disclosure.
Code

e2e-tests/local-test-setup.sh[R145-186]

+# Generate .env file for Playwright Test Agents (healer, planner, generator)
+# Only when --env flag is passed. The .env file is gitignored and must never be committed.
+if [[ "$GENERATE_ENV" == "true" ]]; then
+  ENV_FILE="$SCRIPT_DIR/.env"
+  log::info "Generating .env file: $ENV_FILE"
+
+  # Helper: single-quote a value for .env to handle multiline content (PEM certs, private keys)
+  env_quote() {
+    local val="$1"
+    # Escape existing single quotes: ' → '"'"'
+    val="${val//\'/\'\"\'\"\'}"
+    printf "'%s'" "$val"
+  }
+
+  {
+    echo "# Auto-generated by local-test-setup.sh --env — do not commit"
+    echo "# Regenerate by running: source local-test-setup.sh <showcase|rbac> --env"
+    echo ""
+    echo "BASE_URL=$(env_quote "$BASE_URL")"
+    echo "K8S_CLUSTER_URL=$(env_quote "$K8S_CLUSTER_URL")"
+    echo "K8S_CLUSTER_TOKEN=$(env_quote "$K8S_CLUSTER_TOKEN")"
+    echo "JOB_NAME=$(env_quote "$JOB_NAME")"
+    echo "IMAGE_REGISTRY=$(env_quote "$IMAGE_REGISTRY")"
+    echo "IMAGE_REPO=$(env_quote "$IMAGE_REPO")"
+    echo "TAG_NAME=$(env_quote "$TAG_NAME")"
+    echo "SHOWCASE_URL=$(env_quote "$SHOWCASE_URL")"
+    echo "SHOWCASE_RBAC_URL=$(env_quote "$SHOWCASE_RBAC_URL")"
+    echo "CONTAINER_PLATFORM=$(env_quote "$CONTAINER_PLATFORM")"
+    echo "IS_OPENSHIFT=$(env_quote "$IS_OPENSHIFT")"
+    echo ""
+    echo "# Vault secrets"
+    # Write each vault secret as KEY='VALUE', using the same safe_key transform
+    # Single-quoting handles multiline values (PEM certs, private keys)
+    while IFS= read -r key; do
+      [[ -z "$key" ]] && continue
+      [[ "$key" == "secretsync/"* ]] && continue
+      value=$(printf '%s' "$SECRETS_JSON" | jq -r --arg k "$key" '.[$k]')
+      safe_key=$(echo "$key" | tr './-' '___')
+      echo "$safe_key=$(env_quote "$value")"
+    done < <(printf '%s' "$SECRETS_JSON" | jq -r 'keys[]')
+  } > "$ENV_FILE"
+  log::success ".env file written with $(wc -l < "$ENV_FILE" | tr -d ' ') lines"
Evidence
The script explicitly writes K8S_CLUSTER_TOKEN and “Vault secrets” into a .env file via output
redirection, but does not apply umask/chmod to restrict read access; .gitignore only prevents
committing the file.

e2e-tests/local-test-setup.sh[145-186]
e2e-tests/.gitignore[30-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`e2e-tests/local-test-setup.sh` can generate `e2e-tests/.env` containing `K8S_CLUSTER_TOKEN` and Vault secrets, but the file is created with default permissions. On multi-user systems, this can make credentials readable by other users.

## Issue Context
The `.env` file is intentionally gitignored, but that does not protect it on disk.

## Fix Focus Areas
- e2e-tests/local-test-setup.sh[145-186]

## Implementation notes
- Create the file with a restrictive umask (e.g., `umask 077`) around the write, and/or run `chmod 600 "$ENV_FILE"` immediately after writing.
- Prefer writing to a temp file and `mv` into place to avoid partially-written secret files if the script is interrupted.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. npx may download Playwright🐞
Description
The new MCP server configs run playwright run-test-mcp-server via plain npx, which can
download/execute an unpinned Playwright package if dependencies aren’t installed locally. This can
lead to non-reproducible agent behavior versus the repo’s pinned @playwright/test version.
Code

e2e-tests/.mcp.json[R1-7]

+{
+  "mcpServers": {
+    "playwright-test": {
+      "command": "npx",
+      "args": ["playwright", "run-test-mcp-server"]
+    }
+  }
Evidence
Both .mcp.json and opencode.json invoke playwright through npx, while the repo already pins
Playwright via @playwright/test; using npx without --no-install risks pulling a different
version in a clean environment.

e2e-tests/.mcp.json[1-8]
e2e-tests/opencode.json[3-8]
e2e-tests/package.json[35-39]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Using `npx playwright ...` without `--no-install` can download a different Playwright version when `node_modules` is missing, causing inconsistent MCP/agent behavior.

## Issue Context
`e2e-tests/package.json` pins `@playwright/test`, which provides the `playwright` CLI; prefer the local pinned CLI.

## Fix Focus Areas
- e2e-tests/.mcp.json[1-8]
- e2e-tests/opencode.json[3-8]
- e2e-tests/package.json[35-39]

## Suggested fix
- Prefer `yarn playwright run-test-mcp-server` (or `./node_modules/.bin/playwright ...`).
- Alternatively use `npx --no-install playwright ...` to force the local binary, or pin: `npx playwright@<pinned-version> ...`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Agent prompts not shipped🐞
Description
e2e-tests/opencode.json references prompt files under .opencode/prompts/*, but
e2e-tests/.gitignore excludes the entire .opencode/ directory, so those prompt files are absent
in a fresh checkout. This makes the OpenCode Playwright agents unusable unless users first run `npx
playwright init-agents` to regenerate the missing artifacts.
Code

e2e-tests/opencode.json[R14-69]

+    "playwright-test-generator": {
+      "description": "Use this agent when you need to create automated browser tests using Playwright",
+      "mode": "subagent",
+      "prompt": "{file:.opencode/prompts/playwright-test-generator.md}",
+      "tools": {
+        "ls": true,
+        "glob": true,
+        "grep": true,
+        "read": true,
+        "playwright-test*browser_click": true,
+        "playwright-test*browser_drag": true,
+        "playwright-test*browser_evaluate": true,
+        "playwright-test*browser_file_upload": true,
+        "playwright-test*browser_handle_dialog": true,
+        "playwright-test*browser_hover": true,
+        "playwright-test*browser_navigate": true,
+        "playwright-test*browser_press_key": true,
+        "playwright-test*browser_select_option": true,
+        "playwright-test*browser_snapshot": true,
+        "playwright-test*browser_type": true,
+        "playwright-test*browser_verify_element_visible": true,
+        "playwright-test*browser_verify_list_visible": true,
+        "playwright-test*browser_verify_text_visible": true,
+        "playwright-test*browser_verify_value": true,
+        "playwright-test*browser_wait_for": true,
+        "playwright-test*generator_read_log": true,
+        "playwright-test*generator_setup_page": true,
+        "playwright-test*generator_write_test": true
+      }
+    },
+    "playwright-test-healer": {
+      "description": "Use this agent when you need to debug and fix failing Playwright tests",
+      "mode": "subagent",
+      "prompt": "{file:.opencode/prompts/playwright-test-healer.md}",
+      "tools": {
+        "ls": true,
+        "glob": true,
+        "grep": true,
+        "read": true,
+        "edit": true,
+        "write": true,
+        "playwright-test*browser_console_messages": true,
+        "playwright-test*browser_evaluate": true,
+        "playwright-test*browser_generate_locator": true,
+        "playwright-test*browser_network_requests": true,
+        "playwright-test*browser_snapshot": true,
+        "playwright-test*test_debug": true,
+        "playwright-test*test_list": true,
+        "playwright-test*test_run": true
+      }
+    },
+    "playwright-test-planner": {
+      "description": "Use this agent when you need to create comprehensive test plan for a web application or website",
+      "mode": "subagent",
+      "prompt": "{file:.opencode/prompts/playwright-test-planner.md}",
+      "tools": {
Evidence
The committed OpenCode configuration points at .opencode/prompts/*.md, but the repo configuration
explicitly gitignores .opencode/ under e2e-tests/, meaning those referenced prompt files are not
available by default; the skill docs also state the files are generated locally via init-agents.

e2e-tests/opencode.json[14-69]
e2e-tests/.gitignore[80-84]
.rulesync/skills/e2e-diagnose-and-fix/SKILL.md[21-48]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`e2e-tests/opencode.json` references `.opencode/prompts/*.md`, but `e2e-tests/.gitignore` ignores `.opencode/`, so the referenced prompt files are not present in a clean checkout. The resulting OpenCode agent setup is incomplete unless users manually regenerate the missing files.

## Issue Context
The workflow docs mention `npx playwright init-agents`, but the repo currently commits `opencode.json` while excluding the prompt directory it depends on.

## Fix Focus Areas
- e2e-tests/opencode.json[14-69]
- e2e-tests/.gitignore[80-84]
- .rulesync/skills/e2e-diagnose-and-fix/SKILL.md[21-48]

## Resolution options (pick one and align repo/docs)
1) **Fully checked-in config**: Commit the required prompt files and stop ignoring that subset of `.opencode/`.
2) **Fully generated local tooling**: Add `e2e-tests/opencode.json` (and any other generated agent artifacts) to `.gitignore` and ensure docs instruct running `init-agents` before use.
3) **Inline prompts**: Remove `{file:...}` references and embed prompts directly if supported by OpenCode.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@rhdh-qodo-merge
Copy link
Copy Markdown

Review Summary by Qodo

Add autonomous E2E CI failure fix workflow with Playwright agents and multi-platform skill distribution

✨ Enhancement 📝 Documentation 🧪 Tests

Grey Divider

Walkthroughs

Description
• Add comprehensive autonomous E2E CI failure investigation and fix workflow with 7 AI agent skills
• Implement /fix-e2e command orchestrating full lifecycle: parse failure, create branch, deploy
  RHDH, reproduce, diagnose/fix with Playwright agents, verify, and submit PR with Qodo review
• Initialize Playwright Test Agents (healer/generator/planner) with MCP server configuration for
  live browser interaction
• Distribute all skills and rules across rulesync, Claude, Cursor, and OpenCode platforms for
  consistent AI agent access
• Add seed test for E2E initialization and .env file generation for Playwright Test Agents
  environment setup
• Enable rulesync skills feature and configure MCP server for Playwright test automation
Diagram
flowchart LR
  A["CI Failure"] -->|parse-ci-failure| B["Extract Metadata"]
  B -->|setup-fix-branch| C["Create Fix Branch"]
  C -->|deploy-rhdh| D["Deploy RHDH"]
  D -->|reproduce-failure| E["Classify Failure"]
  E -->|diagnose-and-fix| F["Fix with Playwright Agents"]
  F -->|verify-fix| G["Stability & Quality Check"]
  G -->|submit-and-review| H["Submit PR & Qodo Review"]
  H --> I["Monitor CI"]
  J["Skills & Rules"] -->|rulesync| K["Claude/Cursor/OpenCode"]
  L["MCP Server"] -->|Playwright Agents| F
Loading

Grey Divider

File Changes

1. e2e-tests/playwright.config.ts ⚙️ Configuration changes +3/-0

Exclude seed test from Playwright project configurations

• Added **/playwright/seed.spec.ts to testIgnore patterns in three Playwright projects
 (showcase, k8s, showcase-operator)
• Prevents the seed test from running in these project configurations

e2e-tests/playwright.config.ts


2. e2e-tests/playwright/seed.spec.ts 🧪 Tests +22/-0

Add seed test for E2E test initialization

• New minimal Playwright test file for seeding/initialization purposes
• Includes component annotation for "core" and guest login flow
• Verifies "Welcome back!" message is visible after login

e2e-tests/playwright/seed.spec.ts


3. e2e-tests/local-test-setup.sh ✨ Enhancement +61/-2

Add .env file generation for Playwright Test Agents

• Added --env flag support to generate .env file with environment variables for Playwright Test
 Agents
• Improved argument parsing to handle both test type (showcase|rbac) and --env flag
• Implemented .env file generation with proper quoting for multiline values (PEM certs, private
 keys)
• Added helper function env_quote() to safely escape single quotes in environment variable values

e2e-tests/local-test-setup.sh


View more (39)
4. .rulesync/rules/e2e-fix-workflow.md 📝 Documentation +355/-0

Add comprehensive E2E fix workflow documentation

• Comprehensive knowledge base for autonomous E2E CI failure investigation and fix workflow
• Documents 7-phase workflow: parse failure, setup branch, deploy RHDH, reproduce, diagnose/fix,
 verify, submit PR
• Includes detailed job name mapping tables, deployment procedures, failure classification,
 Playwright agent usage, and PR submission guidelines
• Covers RHDH coding conventions, utility classes, and cross-repo investigation strategies

.rulesync/rules/e2e-fix-workflow.md


5. .cursor/rules/e2e-fix-workflow.mdc 📝 Documentation +352/-0

Add E2E fix workflow rule for Cursor IDE

• Cursor-specific version of E2E fix workflow documentation
• Identical content to rulesync version with Cursor-compatible frontmatter
• Provides complete reference for autonomous E2E CI failure investigation and fix workflow

.cursor/rules/e2e-fix-workflow.mdc


6. .opencode/memories/e2e-fix-workflow.md 📝 Documentation +349/-0

Add E2E fix workflow memory for OpenCode

• OpenCode-specific memory file for E2E fix workflow knowledge base
• Contains consolidated reference knowledge for all phases of the autonomous fix workflow
• Includes job name mappings, deployment procedures, failure patterns, and verification steps

.opencode/memories/e2e-fix-workflow.md


7. .claude/rules/e2e-fix-workflow.md 📝 Documentation +349/-0

Add E2E fix workflow rule for Claude

• Claude-specific rule file for E2E fix workflow documentation
• Provides complete knowledge base for autonomous E2E CI failure investigation and fix workflow
• Covers all 7 phases with detailed procedures, tables, and decision gates

.claude/rules/e2e-fix-workflow.md


8. .rulesync/skills/e2e-diagnose-and-fix/SKILL.md 📝 Documentation +252/-0

Add E2E diagnose-and-fix skill documentation

• Skill documentation for diagnosing and fixing failing E2E tests using Playwright Test Agents
• Mandates use of Playwright healer agent for all test failures with initialization and environment
 setup instructions
• Documents 6 failure pattern categories with fix approaches and cross-repo investigation strategies
• Includes decision framework for product bugs vs test issues with test.fixme() guidelines

.rulesync/skills/e2e-diagnose-and-fix/SKILL.md


9. .claude/skills/e2e-diagnose-and-fix/SKILL.md 📝 Documentation +250/-0

Add E2E diagnose-and-fix skill for Claude

• Claude-specific skill documentation for E2E test diagnosis and fixing
• Covers Playwright healer agent usage, failure pattern recognition, and coding conventions
• Includes cross-repo investigation procedures and product bug decision framework

.claude/skills/e2e-diagnose-and-fix/SKILL.md


10. .opencode/skill/e2e-diagnose-and-fix/SKILL.md 📝 Documentation +250/-0

Add E2E diagnose-and-fix skill for OpenCode

• OpenCode-specific skill documentation for diagnosing and fixing E2E tests
• Provides mandatory Playwright healer agent usage guidelines and failure classification
• Documents coding conventions, cross-repo investigation, and product bug decision process

.opencode/skill/e2e-diagnose-and-fix/SKILL.md


11. .rulesync/commands/fix-e2e.md 📝 Documentation +163/-0

Add /fix-e2e command documentation

• Command documentation for autonomous E2E CI failure fix workflow triggered by /fix-e2e
• Orchestrates 7-phase workflow with decision gates at each phase
• Includes detailed procedures for parsing failures, deploying RHDH, reproducing issues, fixing
 tests, verifying fixes, and submitting PRs
• Provides final summary report format

.rulesync/commands/fix-e2e.md


12. rulesync.jsonc ⚙️ Configuration changes +2/-1

Enable skills feature in rulesync configuration

• Added skills to the features array to enable skill synchronization
• Allows rulesync to manage and sync skill definitions across tools

rulesync.jsonc


13. e2e-tests/.mcp.json ⚙️ Configuration changes +8/-0

Add Playwright Test Agents MCP server configuration

• New MCP (Model Context Protocol) server configuration file for Playwright Test Agents
• Configures playwright-test MCP server to run Playwright's test MCP server
• Enables AI agents to interact with Playwright tests via MCP protocol

e2e-tests/.mcp.json


14. .cursor/skills/e2e-diagnose-and-fix/SKILL.md 📝 Documentation +248/-0

E2E Test Diagnosis and Fix Skill with Playwright Agents

• Comprehensive skill guide for diagnosing and fixing failing E2E tests using Playwright Test Agents
• Mandatory use of Playwright healer agent for all test failures with initialization and environment
 setup instructions
• Detailed failure pattern recognition covering 6 categories: locator drift, timing/race conditions,
 assertion mismatches, data dependencies, platform-specific issues, and deployment configuration
 problems
• Decision framework for distinguishing product bugs from test issues with test.fixme() guidelines
 and cross-repo investigation strategies

.cursor/skills/e2e-diagnose-and-fix/SKILL.md


15. .rulesync/skills/e2e-submit-and-review/SKILL.md 📝 Documentation +318/-0

E2E Test Fix PR Submission and Review Workflow

• Complete PR submission workflow including pre-commit hook resolution and conventional commit
 formatting
• Qodo agentic review integration with polling and feedback address mechanisms
• CI job discovery and triggering via openshift-ci bot with critical guidance on using only
 bot-provided job names
• Comprehensive monitoring and re-trigger procedures for CI pipeline checks

.rulesync/skills/e2e-submit-and-review/SKILL.md


16. .claude/skills/e2e-submit-and-review/SKILL.md 📝 Documentation +316/-0

E2E Test Fix PR Submission and Review Workflow

• Complete PR submission workflow including pre-commit hook resolution and conventional commit
 formatting
• Qodo agentic review integration with polling and feedback address mechanisms
• CI job discovery and triggering via openshift-ci bot with critical guidance on using only
 bot-provided job names
• Comprehensive monitoring and re-trigger procedures for CI pipeline checks

.claude/skills/e2e-submit-and-review/SKILL.md


17. .opencode/skill/e2e-submit-and-review/SKILL.md 📝 Documentation +316/-0

E2E Test Fix PR Submission and Review Workflow

• Complete PR submission workflow including pre-commit hook resolution and conventional commit
 formatting
• Qodo agentic review integration with polling and feedback address mechanisms
• CI job discovery and triggering via openshift-ci bot with critical guidance on using only
 bot-provided job names
• Comprehensive monitoring and re-trigger procedures for CI pipeline checks

.opencode/skill/e2e-submit-and-review/SKILL.md


18. .cursor/skills/e2e-submit-and-review/SKILL.md 📝 Documentation +314/-0

E2E Test Fix PR Submission and Review Workflow

• Complete PR submission workflow including pre-commit hook resolution and conventional commit
 formatting
• Qodo agentic review integration with polling and feedback address mechanisms
• CI job discovery and triggering via openshift-ci bot with critical guidance on using only
 bot-provided job names
• Comprehensive monitoring and re-trigger procedures for CI pipeline checks

.cursor/skills/e2e-submit-and-review/SKILL.md


19. .rulesync/skills/e2e-deploy-rhdh/SKILL.md 📝 Documentation +234/-0

RHDH Deployment Skill with Error Recovery

• RHDH deployment skill using local-run.sh with critical execution rules for long-running
 operations
• CLI mode configuration with required flags (-j, -r, -t) and deploy-only mode for OCP jobs
• Comprehensive deployment error recovery covering CrashLoopBackOff, ImagePullBackOff, Helm
 failures, and operator issues
• Cross-repo investigation strategies for operator and chart configuration problems

.rulesync/skills/e2e-deploy-rhdh/SKILL.md


20. .claude/skills/e2e-deploy-rhdh/SKILL.md 📝 Documentation +232/-0

RHDH Deployment Skill with Error Recovery

• RHDH deployment skill using local-run.sh with critical execution rules for long-running
 operations
• CLI mode configuration with required flags (-j, -r, -t) and deploy-only mode for OCP jobs
• Comprehensive deployment error recovery covering CrashLoopBackOff, ImagePullBackOff, Helm
 failures, and operator issues
• Cross-repo investigation strategies for operator and chart configuration problems

.claude/skills/e2e-deploy-rhdh/SKILL.md


21. .opencode/skill/e2e-deploy-rhdh/SKILL.md 📝 Documentation +232/-0

RHDH Deployment Skill with Error Recovery

• RHDH deployment skill using local-run.sh with critical execution rules for long-running
 operations
• CLI mode configuration with required flags (-j, -r, -t) and deploy-only mode for OCP jobs
• Comprehensive deployment error recovery covering CrashLoopBackOff, ImagePullBackOff, Helm
 failures, and operator issues
• Cross-repo investigation strategies for operator and chart configuration problems

.opencode/skill/e2e-deploy-rhdh/SKILL.md


22. .cursor/skills/e2e-deploy-rhdh/SKILL.md 📝 Documentation +230/-0

RHDH Deployment Skill with Error Recovery

• RHDH deployment skill using local-run.sh with critical execution rules for long-running
 operations
• CLI mode configuration with required flags (-j, -r, -t) and deploy-only mode for OCP jobs
• Comprehensive deployment error recovery covering CrashLoopBackOff, ImagePullBackOff, Helm
 failures, and operator issues
• Cross-repo investigation strategies for operator and chart configuration problems

.cursor/skills/e2e-deploy-rhdh/SKILL.md


23. .rulesync/skills/e2e-parse-ci-failure/SKILL.md 📝 Documentation +204/-0

E2E CI Failure Parsing and Metadata Extraction Skill

• Skill for parsing Prow CI job URLs, Jira tickets, and Playwright reports to extract E2E test
 failure details
• Comprehensive URL parsing for periodic, postsubmit, and presubmit jobs with GCS artifacts
 derivation
• Structured output with test metadata, derivation details, and ready-to-use local-run.sh commands
• Job name mapping reference to release branch, platform, deployment method, and image repo/tag

.rulesync/skills/e2e-parse-ci-failure/SKILL.md


24. .claude/skills/e2e-parse-ci-failure/SKILL.md 📝 Documentation +202/-0

E2E CI failure parsing skill with Prow and Jira integration

• Comprehensive skill documentation for parsing Prow CI job URLs and Jira tickets to extract E2E
 test failure details
• Covers input detection (Playwright reports, Prow URLs, Jira tickets), URL parsing, GCS artifact
 derivation, and build log extraction
• Provides structured output format with failure summary, derivation details, GCS artifacts
 location, and local-run.sh command generation
• Includes mapping references to e2e-fix-workflow rule for job name to release
 branch/platform/deployment method conversions

.claude/skills/e2e-parse-ci-failure/SKILL.md


25. .opencode/skill/e2e-parse-ci-failure/SKILL.md 📝 Documentation +202/-0

E2E CI failure parsing skill for OpenCode platform

• Identical copy of Claude skill documentation for OpenCode platform
• Ensures skill is available across multiple AI coding tools via rulesync distribution

.opencode/skill/e2e-parse-ci-failure/SKILL.md


26. .cursor/skills/e2e-parse-ci-failure/SKILL.md 📝 Documentation +200/-0

E2E CI failure parsing skill for Cursor IDE

• Cursor-specific variant of E2E CI failure parsing skill with slightly condensed formatting
• Maintains same core content as Claude/OpenCode versions with minor YAML description adjustments

.cursor/skills/e2e-parse-ci-failure/SKILL.md


27. .claude/commands/fix-e2e.md 📝 Documentation +161/-0

Autonomous E2E CI failure fix workflow command

• Main command orchestration workflow for autonomous E2E CI failure investigation and fix
• Defines 7-phase workflow: parse failure, setup branch, deploy RHDH, reproduce, diagnose/fix,
 verify, submit PR with Qodo review
• Includes decision gates requiring explicit user approval for skipped phases (no cluster, cannot
 reproduce, verification failures)
• Provides detailed instructions for each phase with skill references and final summary report
 format

.claude/commands/fix-e2e.md


28. .opencode/command/fix-e2e.md 📝 Documentation +161/-0

E2E CI failure fix command for OpenCode platform

• OpenCode platform variant of the /fix-e2e command with identical workflow structure
• Ensures command is available across multiple AI coding tools via rulesync distribution

.opencode/command/fix-e2e.md


29. .cursor/commands/fix-e2e.md 📝 Documentation +158/-0

E2E CI failure fix command for Cursor IDE

• Cursor IDE variant of the /fix-e2e command with slightly condensed formatting
• Maintains same 7-phase workflow and decision gates as Claude/OpenCode versions

.cursor/commands/fix-e2e.md


30. .rulesync/skills/e2e-reproduce-failure/SKILL.md 📝 Documentation +188/-0

E2E test failure reproduction and classification skill

• Skill for running failing E2E tests against deployed RHDH to confirm and classify failures
• Covers environment setup, mandatory Playwright healer agent usage, flakiness detection (10-run
 loop), and artifact collection
• Includes classification logic: consistent failure (10/10), flaky (partial), cannot reproduce
 (0/10) with decision gates
• Provides fallback direct execution and headed/debug mode options

.rulesync/skills/e2e-reproduce-failure/SKILL.md


31. .claude/skills/e2e-reproduce-failure/SKILL.md 📝 Documentation +186/-0

E2E test failure reproduction skill for Claude

• Claude platform variant of E2E test reproduction skill with identical core content
• Includes mandatory Playwright healer agent initialization and environment setup instructions
• Covers flakiness detection, result classification, and artifact collection (traces, HTML reports,
 screenshots)

.claude/skills/e2e-reproduce-failure/SKILL.md


32. .opencode/skill/e2e-reproduce-failure/SKILL.md 📝 Documentation +186/-0

E2E test failure reproduction skill for OpenCode

• OpenCode platform variant of E2E test reproduction skill
• Maintains same structure and content as Claude version for cross-platform consistency

.opencode/skill/e2e-reproduce-failure/SKILL.md


33. .cursor/skills/e2e-reproduce-failure/SKILL.md 📝 Documentation +184/-0

E2E test failure reproduction skill for Cursor

• Cursor IDE variant of E2E test reproduction skill with slightly condensed formatting
• Includes all core functionality: healer agent usage, flakiness detection, classification logic,
 and artifact collection

.cursor/skills/e2e-reproduce-failure/SKILL.md


34. .rulesync/skills/e2e-verify-fix/SKILL.md 📝 Documentation +149/-0

E2E test fix verification with stability and quality checks

• Skill for verifying E2E test fixes through multi-run stability checks and code quality validation
• Covers mandatory Playwright healer agent usage, single-run verification, 5-run stability check
 (5/5 pass requirement)
• Includes code quality checks (yarn tsc:check, yarn lint:check, yarn prettier:check) and
 optional regression testing
• Provides result summary format and emphasizes never skipping verification without explicit user
 approval

.rulesync/skills/e2e-verify-fix/SKILL.md


35. .claude/skills/e2e-verify-fix/SKILL.md 📝 Documentation +147/-0

E2E test fix verification skill for Claude

• Claude platform variant of E2E test fix verification skill
• Includes mandatory healer agent initialization, 5-run stability check, and comprehensive code
 quality validation
• Emphasizes strict verification requirements and user approval gates for skipped steps

.claude/skills/e2e-verify-fix/SKILL.md


36. .opencode/skill/e2e-verify-fix/SKILL.md 📝 Documentation +147/-0

E2E test fix verification skill for OpenCode

• OpenCode platform variant of E2E test fix verification skill with identical content
• Maintains same verification workflow and decision gates as Claude version

.opencode/skill/e2e-verify-fix/SKILL.md


37. .cursor/skills/e2e-verify-fix/SKILL.md 📝 Documentation +145/-0

E2E test fix verification skill for Cursor

• Cursor IDE variant of E2E test fix verification skill with condensed formatting
• Includes all core verification steps: healer agent usage, 5-run stability check, code quality
 checks, and result summary

.cursor/skills/e2e-verify-fix/SKILL.md


38. e2e-tests/opencode.json Configuration +97/-0

OpenCode Playwright Test Agents configuration

• OpenCode configuration file enabling Playwright Test MCP server integration
• Defines three Playwright test agents: playwright-test-generator (test creation),
 playwright-test-healer (test debugging/fixing), playwright-test-planner (test planning)
• Each agent has specific tool permissions for browser interaction, test execution, and code
 generation
• Disables generic Playwright tools in favor of agent-specific MCP-based tools

e2e-tests/opencode.json


39. .rulesync/skills/e2e-setup-fix-branch/SKILL.md 📝 Documentation +73/-0

E2E fix branch creation and git workflow skill

• Skill for creating properly-based git branches for E2E test fixes
• Covers branch naming conventions with/without Jira tickets, upstream fetching, and branch
 verification
• Includes important notes on using upstream/<branch> instead of local branches and upstream
 remote setup

.rulesync/skills/e2e-setup-fix-branch/SKILL.md


40. .claude/skills/e2e-setup-fix-branch/SKILL.md 📝 Documentation +71/-0

E2E fix branch setup skill for Claude

• Claude platform variant of E2E fix branch setup skill
• Covers branch naming conventions, upstream fetching, and verification steps
• Includes notes on upstream remote configuration and fork setup

.claude/skills/e2e-setup-fix-branch/SKILL.md


41. .opencode/skill/e2e-setup-fix-branch/SKILL.md 📝 Documentation +71/-0

E2E fix branch setup skill for OpenCode

• OpenCode platform variant of E2E fix branch setup skill with identical content
• Maintains same workflow and branch naming conventions as Claude version

.opencode/skill/e2e-setup-fix-branch/SKILL.md


42. .cursor/skills/e2e-setup-fix-branch/SKILL.md Additional files +69/-0

...

.cursor/skills/e2e-setup-fix-branch/SKILL.md


Grey Divider

Qodo Logo

zdrapela added 10 commits April 14, 2026 11:53
…mit-and-review

Document required vs optional job sections, shortened job names, and
update the mapping table with actual /test commands from the bot.

Assisted-by: OpenCode
…Qodo polling

- Fix duplicate ### 5 numbering in e2e-verify-fix (Review the Diff is now ### 6)
- Add Playwright report URL to fix-e2e.md input list
- Add scripted polling loop for Qodo review (15s interval, 5 min timeout)
- Update command to match new Qodo polling interval

Assisted-by: OpenCode
…e job

Present classified failures, ask user which to fix, group by shared
root cause when possible.

Assisted-by: OpenCode
The healer agent is only supported in OpenCode and Claude Code.
Add notes to all 3 healer-using skills directing Cursor users to
direct execution and manual diagnosis instead.

Assisted-by: OpenCode
@zdrapela zdrapela force-pushed the skill-agent-e2e-fix branch from 2863dcb to 138c106 Compare April 14, 2026 09:54
@github-actions
Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions
Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@zdrapela zdrapela changed the title feat: add autonomous E2E CI failure fix workflow with skills and Playwright agents feat(e2e): add /fix-e2e command and AI agent skills Apr 14, 2026
echo "$safe_key=$(env_quote "$value")"
done < <(printf '%s' "$SECRETS_JSON" | jq -r 'keys[]')
} > "$ENV_TMP"
mv -f "$ENV_TMP" "$ENV_FILE"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No set -e here, so if mv -f fails the script keeps going and log::success below still prints. Worth wrapping it as if ! mv -f "$ENV_TMP" "$ENV_FILE"; then rm -f "$ENV_TMP"; return 1; fi, plus a trap 'rm -f "$ENV_TMP"' RETURN so the temp file doesn't leak on other failures.


// BAD — deprecated CSS selectors
page.locator('.MuiButton-root')
page.locator('[data-testid="..."]')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line calls data-testid deprecated, but playwright-locators.md in this repo lists getByTestId as a valid option (priority 7). The bad part is using the CSS form (page.locator('[data-testid=...]')), not the attribute itself. As written, the healer will start rewriting legitimate getByTestId calls thinking they're the old pattern.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll remove that, and it's better to link the existing best practices, instead of repeating them here

```

**Forbidden patterns**:
- `page.waitForNetworkIdle()` / `networkidle`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page.waitForNetworkIdle() isn't a real Playwright method — the actual one is page.waitForLoadState('networkidle'). The agent won't flag the real anti-pattern if it's looking for a non-existent API name.

| Pattern in job name | Release branch |
|---------------------|---------------|
| `*-rhdh-main-*` | `main` |
| `*-rhdh-release-1.9-*` | `release-1.9` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table (and the image tag table below) needs manual edits every release cycle in four places. Since the job name always contains -rhdh-<branch>-, a regex would cover future versions without touching the file:

BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | sed 's/^-rhdh-//;s/-$//')
if [[ "$BRANCH" == "main" ]]; then
  REPO="rhdh-community/rhdh"; TAG="next"
else
  REPO="rhdh/rhdh-hub-rhel9"; TAG="${BRANCH#release-}"
fi

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, let's do that for BRANCH

Copy link
Copy Markdown
Member Author

@zdrapela zdrapela Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image resolution is done later and we also have the next-1.9 etc. tags at rhdh-community/rhdh


```bash
# Get the PR number from the create output, then comment
gh pr comment <PR-number> --repo redhat-developer/rhdh --body "/agentic_review"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow can loop through Phase 5→6→7 multiple times, and each iteration re-triggers /agentic_review. Qodo has quota limits on some plans — worth noting in the skill that this should fire once per PR lifecycle, with /improve or /review used for follow-up passes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an option to opt out of Qodo for users without the enterprise Qodo account, but I'd rather keep it as the default, as it creates a great feedback loop for the PRs.

zdrapela added 11 commits April 14, 2026 14:49
Set PLAYWRIGHT_HTML_OPEN=never in generated .env and replace
show-report instruction with direct file access.

Assisted-by: OpenCode
Replace duplicated coding conventions, debugging modes, and reference
files with cross-references to playwright-locators and ci-e2e-testing.

Assisted-by: OpenCode
…nches

When working on a release branch, check if the failing test was already
fixed on main and cherry-pick if possible.

Assisted-by: OpenCode
Add fallback for determining base branch from feature branches.

Assisted-by: OpenCode
Prevents depleting limited Qodo quota on iterative fixes.

Assisted-by: OpenCode
Remove duplicated sections (deployment, reproduction, diagnosis, verification,
PR submission) that are maintained in the skills. Keep only the workflow
overview, job name mapping tables (single source of truth), and coding
convention cross-references.

290 lines → 85 lines.

Assisted-by: OpenCode
Reference e2e-fix-workflow rule for derivation logic.

Assisted-by: OpenCode
… rule

Single source of truth for branch-to-image derivation.

Assisted-by: OpenCode
@sonarqubecloud
Copy link
Copy Markdown

@gustavolira
Copy link
Copy Markdown
Member

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants