Align strict-mode compatibility: allow Playwright MCP warnings and honor workflow-level strict opt-out for pull_request_target#31914
Merged
Conversation
…arn for playwright MCP Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… for pull_request_target Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update daily compat report for 2026-05-13
Align strict-mode compatibility: allow Playwright MCP warnings and honor workflow-level strict opt-out for pull_request_target
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts strict-mode compatibility for two validators so consumer workflows don’t fail compilation unexpectedly while still surfacing security/deprecation guidance via warnings.
Changes:
- Playwright: allow deprecated MCP mode in strict mode by emitting a warning instead of returning an error.
pull_request_target: honor workflow frontmatterstrict: falseas an opt-out for strict-only behavior even when strict mode is enabled via CLI, downgrading the insecure-checkout diagnostic from error to warning.- Update/add unit tests for the new warning-only behaviors.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/pull_request_target_validation.go | Computes an effective strictness for this validator that honors frontmatter strict: false, and uses it to gate strict-only warnings/errors. |
| pkg/workflow/pull_request_target_validation_test.go | Adds a regression test for --strict + frontmatter strict: false expecting warning-only behavior. |
| pkg/workflow/playwright_validation.go | Changes MCP-mode handling to always warn (including strict mode) instead of erroring in strict mode. |
| pkg/workflow/playwright_validation_test.go | Updates strict-mode test cases to reflect warn-only behavior (but currently doesn’t assert warnings). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
Comment on lines
+58
to
62
| name: "playwright mcp mode in strict mode warns only", | ||
| tools: map[string]any{"playwright": map[string]any{"mode": "mcp"}}, | ||
| strictMode: true, | ||
| expectWarn: true, | ||
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Fix
What was the bug?
Daily compat runs exposed a strict-mode mismatch: workflows using
tools.playwrightin MCP mode failed hard in strict mode, andpull_request_targetvalidation ignored per-workflowstrict: false, causing post-codemod compile failures in real consumer repos.How did you fix it?
Playwright strict behavior
validatePlaywrightModeto always emit a deprecation warning for MCP mode (including strict mode), instead of returning a strict-mode error.pull_request_target strict consistency
validatePullRequestTargetTriggerto compute effective strictness from compiler strict mode + workflow frontmatter override.strict: false, strict-only hard error behavior is disabled for this validator, and insecure checkout remains a warning.Targeted regression coverage
pull_request_targettest case for--strict+ frontmatterstrict: falseto assert warning-only behavior.Testing
Behavior is covered by updated unit tests in:
pkg/workflow/playwright_validation_test.gopkg/workflow/pull_request_target_validation_test.go