chore(testrunner): only diff big strings#1155
Closed
JoelEinbinder wants to merge 1 commit into
Closed
Conversation
Collaborator
|
I am not so sure about this, the difference between |
Contributor
|
Yeah I'd keep this as-is. |
debs-obrien
pushed a commit
to debs-obrien/playwright
that referenced
this pull request
Jun 10, 2025
2015kmadanap
added a commit
to Sapoto-Health/playwright-new
that referenced
this pull request
May 28, 2026
…oto Tracer microsoft#1155 / Unit G-ops) (#6) Adds four operational MCP CLI flags + matching env vars: --filter-internal-urls PLAYWRIGHT_MCP_FILTER_INTERNAL_URLS --disable-downloads PLAYWRIGHT_MCP_DISABLE_DOWNLOADS --timeout-download <ms> PLAYWRIGHT_MCP_TIMEOUT_DOWNLOAD --allowed-tools <list> PLAYWRIGHT_MCP_ALLOWED_TOOLS Internal-URL filter: `file://`, `data:`, `chrome-extension://`, and the exact hostname `localhost` (not prefix — `localhost.example.com` is a real domain and stays visible). Reuses Unit I's `WeakSet<Page>` persistent-hide pattern so navigating an internal-URL page to a real URL keeps it hidden from `browser_tabs`. Disable-downloads: skips `page.on('download')` listener registration entirely, letting ADF's Electron-side capture stack own downloads exclusively. Timeout-download: tool responses block on pending downloads up to the budget. `Download.savePromise` field stores `download.saveAs()` for the wait; `waitForCompletion(callback)` captures `beforeCount` and calls `_waitForPendingDownloads` with the budget. CRITICAL deadlock-avoidance invariant (PRD user story microsoft#24): `_waitForPendingDownloads` early-returns at the very top when `disableDownloads` is true, BEFORE any loop or promise allocation. Reason: when `disableDownloads=true` no `savePromise` is ever created, so waiting on it deadlocks the tool response indefinitely. Pinned by the Test 1 regression in `tests/mcp/download-wait.spec.ts` which asserts <2500ms elapsed on a `--disable-downloads --timeout-download=5000` invocation (would be 5000ms on regression). Allowed-tools: comma-separated allowlist applied AFTER capability gate. `--allowed-tools=browser_pdf_save` without `--caps=pdf` advertises ZERO pdf tools — the allowlist cannot re-introduce a capability-gated tool. CLI overrides env. Empty / unset = all tools (no regression). Test plan: - `opsFilters.spec.ts` — 14 pure-logic tests for `isInternalUrl()` + `parseAllowedTools()` covering edge cases (whitespace, trailing commas, `localhost.example.com` rejection, `about:blank` not filtered). - `filter-internal-urls.spec.ts` — 3 MCP integration tests including the navigate-survives persistence regression. - `allowed-tools.spec.ts` — 3 MCP tests for allowlist semantics, capability-gate-first ordering, CLI-over-env precedence. - `download-wait.spec.ts` — 3 MCP tests pinning the deadlock-avoidance invariant + the wait-for-completion happy path + the upstream-default no-wait fallback. - `config-resolve.spec.ts` — 11 new wiring tests for all 4 flags + env vars + numeric parser handling. `npm run flint`: clean. All affected tests pass. Part of Sapoto-Health/automatic-document-fetcher#1150. Closes Sapoto-Health/automatic-document-fetcher#1155.
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.
I don't need to know how many letters
grantedanddeniedshare.