Skip to content

feat: add autonomous E2E CI failure fix workflow with skills and Playwright agents#4516

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

feat: add autonomous E2E CI failure fix workflow with skills and Playwright agents#4516
zdrapela wants to merge 11 commits intoredhat-developer:mainfrom
zdrapela:skill-agent-e2e-fix

Conversation

@zdrapela
Copy link
Copy Markdown
Member

@zdrapela zdrapela commented Mar 31, 2026

Summary

  • Add 7 AI agent skills for autonomous E2E CI failure investigation and fix workflow
  • Add /fix-e2e command that orchestrates the full lifecycle: parse failure, create branch, deploy RHDH, reproduce, diagnose/fix with Playwright agents, verify, and submit PR
  • Initialize Playwright Test Agents (healer/generator/planner) with MCP server for live browser interaction
  • All skills managed via rulesync and synced to OpenCode, Claude Code, and Cursor
  • Auto-generate .env file via local-test-setup.sh --env with proper quoting for multiline secrets
  • Add seed.spec.ts for Playwright Test Generator agent (excluded from all projects except any-test)

Skills

Skill Purpose
e2e-parse-ci-failure Parse Prow URL, Playwright report (via Playwright MCP), or Jira ticket to extract failure details
e2e-setup-fix-branch Create branch from correct upstream release branch
e2e-deploy-rhdh Deploy RHDH via local-run.sh with error recovery
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
e2e-verify-fix Multi-run stability check + code quality validation
e2e-submit-and-review Create cross-fork PR, trigger Qodo review, monitor CI

Key changes since initial review

  • Renamed all skills with e2e- prefix for clarity
  • Made Sourcebot/Context7 optional with gh search code / local clone fallbacks
  • Differentiated OCP vs K8s jobs for -s deploy-only flag
  • Require Playwright healer confirmation + user approval before test.fixme(), use RHDHBUGS Jira project
  • Expanded Playwright best practices references in coding conventions
  • Auto-generate .env via --env flag with single-quoted values (handles multiline PEM certs)
  • Replaced git add -A with specific file staging
  • Added .playwright-mcp, generated agent files to .gitignore
  • Parse Playwright HTML reports directly via Playwright MCP when available
  • Excluded seed.spec.ts from showcase/showcase-k8s/showcase-operator projects

@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:

@@ -0,0 +1,22 @@
import { test, expect } from "@playwright/test";
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 file sits in playwright/ alongside real tests and no project in projects.json explicitly includes or excludes it. It'll get picked up by any project with a broad testMatch glob. If it's scaffolding for the Playwright Test Generator agent, should it live somewhere outside the test directory, or be excluded in playwright.config.ts?

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.

Good point, looks like the seed test file need to live there and it's good to have our own seed file in the repo (instead of the generic one). I excluded it.

env | grep -E "^(BASE_URL|K8S_CLUSTER|CONTAINER_PLATFORM|IS_OPENSHIFT|JOB_NAME|IMAGE_|TAG_NAME|NAME_SPACE|GITHUB_APP|...)" > .env
```

The `.env` file is already in `.gitignore` — never commit it.
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 says .env is already in .gitignore, but e2e-tests/.gitignore doesn't have a .env entry. The instructions above dump Vault secrets, K8S tokens, and GitHub app credentials into that file — needs an actual gitignore entry to back up this claim.

Copy link
Copy Markdown
Member Author

@zdrapela zdrapela Apr 13, 2026

Choose a reason for hiding this comment

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

It actually does have it 🤔

"rules",
"commands"
"commands",
"skills"
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.

Is the rulesync CI check (rulesync-check.yaml) validated to work with the skills feature? This is the first time it's being added. Worth confirming the check handles skills sync the same way it handles rules and commands.

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 tested it for both Claude code and OpenCode. I couldn't verify for Cursor, because the Playwright agents aren't supported for it

```bash
cd e2e-tests
source local-test-setup.sh <showcase|rbac>
env | grep -E "^(BASE_URL|K8S_CLUSTER|CONTAINER_PLATFORM|IS_OPENSHIFT|JOB_NAME|IMAGE_|TAG_NAME|NAME_SPACE|GITHUB_APP|...)" > .env
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.

That trailing |... in the grep regex will match any three characters, not just serve as a placeholder. If someone copy-pastes this, it'll capture unintended variables. Either list the actual env var prefixes exhaustively or use a different approach (like env > .env with a note to review).

Copy link
Copy Markdown
Member Author

@zdrapela zdrapela Apr 13, 2026

Choose a reason for hiding this comment

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

I added the .env generation to local-test-setup.sh That's a more systematic approach


See https://playwright.dev/docs/test-agents for the full list of supported tools and options.

This creates configuration files with the Playwright MCP server and agent definitions. The generated files are local tooling — do NOT commit them.
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 says "do NOT commit them", but the PR commits e2e-tests/.mcp.json, e2e-tests/opencode.json, and all the agent/prompt markdown files in e2e-tests/.claude/agents/ and e2e-tests/.opencode/prompts/ — which are exactly what npx playwright init-agents generates. If these are meant to be checked in as the project's canonical agent configs, this note needs updating. If they shouldn't be committed, they shouldn't be in this PR.

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 them to gitignore

}
},
"tools": {
"playwright*": false
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 silently disables all Playwright MCP tools outside agent contexts. If a developer tries to use them directly (without going through a subagent), they'll get no feedback about why they're unavailable. Worth a comment in the file or the skill docs explaining this design choice.

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.

Good point, I rather gitignored the files generated by the Playwright agent init

```bash
# Make the change locally
# Then commit and push
git add -A
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.

git add -A can accidentally stage the .env file from the earlier step (especially since it's not actually gitignored — see other comment on diagnose-and-fix). Should use git add <specific-files> instead, which is also what the project's own commit conventions recommend.


1. **Mark the test as `test.fixme()`** with a descriptive comment:
```typescript
test.fixme('RHIDP-XXXX: Button no longer visible after version upgrade');
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.

Playwright's test.fixme() signature is test.fixme(condition?, description?). This string-only form works (the string is truthy) but it's non-standard and could confuse contributors checking the Playwright docs. The canonical form would be test.fixme(true, 'RHIDP-XXXX: description').

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 rewrote it to use instead this format, which we use the most often

// TODO: https://jira.link
test.fixme();
``

@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

@github-actions
Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@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:

@github-actions
Copy link
Copy Markdown
Contributor

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

@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 a22f6c2 to 3b547f3 Compare April 14, 2026 09:00
@zdrapela
Copy link
Copy Markdown
Member Author

/test ?

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 14, 2026

@zdrapela: The following commands are available to trigger required jobs:

/test e2e-ocp-helm

The following commands are available to trigger optional jobs:

/test cleanup-mapt-destroy-orphaned-aks-clusters
/test cleanup-mapt-destroy-orphaned-eks-clusters
/test e2e-aks-helm-nightly
/test e2e-aks-operator-nightly
/test e2e-eks-helm-nightly
/test e2e-eks-operator-nightly
/test e2e-gke-helm-nightly
/test e2e-gke-operator-nightly
/test e2e-ocp-helm-nightly
/test e2e-ocp-helm-upgrade-nightly
/test e2e-ocp-operator-auth-providers-nightly
/test e2e-ocp-operator-nightly
/test e2e-ocp-v4-19-helm-nightly
/test e2e-ocp-v4-20-helm-nightly
/test e2e-ocp-v4-21-helm-nightly
/test e2e-osd-gcp-helm-nightly
/test e2e-osd-gcp-operator-nightly

Use /test all to run the following jobs that were automatically triggered:

pull-ci-redhat-developer-rhdh-main-e2e-ocp-helm
Details

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@zdrapela zdrapela force-pushed the skill-agent-e2e-fix branch from 3b547f3 to d70a000 Compare April 14, 2026 09:32
@github-actions
Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions
Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

zdrapela added 11 commits April 14, 2026 11:53
…wright agents

Add 6 AI agent skills and /fix-e2e command for autonomous E2E CI failure
investigation and fix workflow. Skills: e2e-parse-ci-failure, e2e-deploy-rhdh,
e2e-reproduce-failure, e2e-diagnose-and-fix, e2e-verify-fix, e2e-submit-and-review.

Key features:
- Playwright Test Agents (healer/generator/planner) with MCP server
- Auto-generate .env via local-test-setup.sh --env with secure file handling
- Sourcebot/Context7 optional with gh/clone fallbacks
- OCP vs K8s job differentiation for deploy-only mode
- Playwright MCP for parsing HTML test reports
- All skills managed via rulesync, synced to OpenCode, Claude Code, and Cursor

Assisted-by: OpenCode
…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.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

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

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