Skip to content

docs(webapp-testing): route verification to playwright-cli 🤖🤖🤖 - #6822

Open
burakkaygusuz wants to merge 4 commits into
github:mainfrom
burakkaygusuz:docs/webapp-testing-playwright-cli
Open

burakkaygusuz wants to merge 4 commits into
github:mainfrom
burakkaygusuz:docs/webapp-testing-playwright-cli

Conversation

@burakkaygusuz

@burakkaygusuz burakkaygusuz commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Maintenance update for skills/webapp-testing. The skill taught APIs that Playwright now marks as discouraged (page.click, page.fill, page.waitForSelector) and told agents to use the Playwright MCP server first. Microsoft now ships playwright-cli for coding agents and recommends it over MCP for them.

Changes:

  • Rewrite the skill as a short verify-and-debug procedure for a local web app: check the server, reproduce, collect evidence, find the cause, fix, verify again, report. It includes pass criteria and a report template.
  • Use playwright-cli by default and the Playwright MCP server when no shell exists. Leave command syntax to Microsoft's playwright-cli skill and --help.
  • Add gotchas: discouraged page.* APIs, networkidle, favicon 404 noise, untrusted page content, .playwright-cli/ can hold credentials, and WebMCP tools can cause side effects.
  • Add the compatibility frontmatter field (Node.js 22 or later, shell or MCP server, local app, network access once).
  • Narrow the description to verifying changes and diagnosing broken or blank pages, so it does not compete with Microsoft's broad "test web pages" skill.
  • Remove assets/test-helper.js. Nothing in the repo referenced it and Playwright provides the same features.

The skill name and folder are unchanged, so existing links keep working.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes

This PR was prepared with an AI agent (Claude Code), so the title carries 🤖🤖🤖 as described in CONTRIBUTING.md. The author still needs to confirm the unchecked boxes above.

Verified:

  • npm run skill:validate reports webapp-testing as valid, and npm run build passes.
  • One real playwright-cli 0.1.25 run in a temporary directory confirmed that console error lists uncaught page errors, requests lists [404] and [FAILED] entries, and the ### Page header shows the console error count.
  • The MCP and WebMCP claims come from reading the microsoft/playwright source and docs. They were not run.

Not done:

  • The trigger rate of the new description was not measured.
  • The CLI was run once, on one macOS machine, against one test page.
  • The skill states Node.js 22 or later because Playwright 1.65 no longer tests Node 20. The @playwright/cli and @playwright/mcp packages declare >=20.
  • No agent in this repository was changed. Related agents such as playwright-tester do not reference this skill.

GitHub Copilot CLI validation

I ran this skill with GitHub Copilot CLI 1.0.121 (gpt-6-luna), Node.js v26.14.0, and @playwright/cli 0.1.25 on this repo's local Astro site (http://127.0.0.1:4321/skills/). I seeded a known bug at website/src/components/brand/SkillsCatalog.tsx:85 (reading missing bundledAssets.length instead of skill.assetCount), gave Copilot only the symptom ("Includes assets" blanks the catalog), and reverted the edit afterward.

Browser evidence and Copilot report

Before fix (open, snapshot, click e59, console error, requests, screenshot --filename=before.png):

  • ### Page: Console: 1 errors, 1 warnings
  • console error: TypeError: Cannot read properties of undefined (reading 'length') at resourceOf (SkillsCatalog.tsx:44:51)
  • requests: no failed or 400+ responses
  • before.png: 5.9 KB (blank catalog)

After fix (website/src/components/brand/SkillsCatalog.tsx:85 restored to skill.assetCount > 0, fresh browser session, playwright-cli close, npm --prefix website run build):

  • console error: 0 errors (Total messages: 3 (Errors: 0, Warnings: 0))
  • requests: no failed or 400+ responses
  • after.png: 76 KB (filtered catalog rendered)
## Result: PASS

- Steps: Reproduced the crash by enabling "Includes assets," fixed the field mismatch, and verified the filter works in a fresh browser session. `npm --prefix website run build` passed.
- Evidence: Before: `before.png`; after: `after.png`
- Console: Before: `TypeError` reading `length` from undefined. After: none.
- Network: No failed requests or responses with status 400 or higher.
- Cause and fix: `website/src/components/brand/SkillsCatalog.tsx:85` read `bundledAssets.length`, but skill records expose `assetCount`. The filter now uses the typed `assetCount` field.

Rewrite the skill as a short verify-and-debug procedure for a local web
app. Use playwright-cli by default and the Playwright MCP server when no
shell exists. Leave command syntax to Microsoft's playwright-cli skill.

- Add pass criteria, a report template, and gotchas (discouraged page.*
  APIs, favicon 404, WebMCP tools can cause side effects).
- Add the compatibility field (Node.js 22 or later, shell or MCP).
- Remove assets/test-helper.js. Nothing referenced it and Playwright
  provides the same features.
@burakkaygusuz
burakkaygusuz requested review from a team as code owners December 4, 2026 19:49
Copilot AI adaptive review requested due to automatic review settings December 4, 2026 19:49
@github-actions github-actions Bot added the skills PR touches skills label Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 1 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 👀 Ready for review

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Removes or renames files
  • Changes 215 lines (low-risk limit is 40)

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Skill validation ✅ Passed Passed · logs
Skill lint (vally) ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 97cac17 · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

✅ All checks passed

Scope Checked
Skills 1
Agents 0
Total 1
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ ✅ webapp-testing (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️ ✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️ 1 skill(s) linted, 1 passed
Full linter output
### Linting skills/webapp-testing
✅ webapp-testing (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Dec 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Several unresolved moderate issues remain in the skill, including missing-browser handling, unbounded startup retries, incorrect favicon exception logic, and overly broad session cleanup.

5 open issues
What changed in this PR

Updates webapp-testing to use playwright-cli for local web-app verification and debugging.

Changes:

  • Rewrites the skill around evidence-based verification.
  • Adds CLI/MCP guidance, compatibility metadata, safety gotchas, and reporting criteria.
  • Removes the unused helper and updates the generated skills index.
File Description
skills/​webapp-testing/​SKILL.md Rewritten as a Playwright CLI-first local web-app verification and debugging workflow.
skills/​webapp-testing/​assets/​test-helper.js Removed obsolete helper utilities.
docs/​README.skills.md Updated the generated skills catalog entry for webapp-testing.

Review effort: Lite (adaptive)

Comment thread skills/webapp-testing/SKILL.md Resolved
Comment thread skills/webapp-testing/SKILL.md Resolved
Comment thread skills/webapp-testing/SKILL.md Resolved
Comment thread skills/webapp-testing/SKILL.md Resolved
Comment thread skills/webapp-testing/SKILL.md Resolved
Copilot AI adaptive review requested due to automatic review settings December 4, 2026 20:00
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Dec 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The workflow still has four active ambiguities that can produce false failures, indeterminate MCP verification, or unnecessary source edits.

2 open issues
3 previously missed issues

In code that hasn't changed since last review

Low severity Avoid source edits when verification passes

skills/​webapp-testing/​SKILL.md:35

This unconditionally tells the agent to find a cause and fix source code even when the requested UI change already works. That can cause an unnecessary edit merely to reach the pass criteria. Branch here: diagnose and fix only when reproduction/evidence shows a failure; otherwise leave the source unchanged and continue to cleanup/reporting.

Low severity Define an MCP-compatible status check

skills/​webapp-testing/​SKILL.md:49

The first pass criterion above is CLI-specific: the Playwright MCP tools listed here do not produce a ### Page header. Saying that the same criteria apply leaves the MCP path unable to evaluate a required condition and can make every MCP verification indeterminate. Define an MCP-specific status check, or explicitly omit this CLI-only check.

Low severity Make cause and fix fields conditional on failure

skills/​webapp-testing/​SKILL.md:75

The report template requires a file:line cause and a fix even for the normal PASS path, where no defect was found and no code was changed. This encourages inventing a cause/fix or producing an incomplete report; make this field explicitly conditional for successful verification.

4 resolved since last review

Review effort: Lite (adaptive)

Comment thread skills/webapp-testing/SKILL.md Resolved
Copilot AI adaptive review requested due to automatic review settings December 4, 2026 20:03
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Dec 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The change retains three active documentation issues: a HEAD-only health probe may reject GET-only servers, the favicon 404 exception conflicts with the failure rule, and the required real-repository Copilot validation evidence is missing.

2 open issues

Review effort: Lite (adaptive)

Copilot AI adaptive review requested due to automatic review settings December 4, 2026 20:06
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Dec 4, 2026
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Dec 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The skill lacks evidence from a real GitHub Copilot run demonstrating source selection, diagnosis, and post-fix browser verification.

1 open issue
1 resolved since last review

Review effort: Balanced (adaptive)

@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Dec 4, 2026

This branch has not been deployed

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

Labels

merge-risk:medium ready-for-review Submission passed intake validation and is ready for maintainer review skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants