Skip to content

v2.1.0 - Hardened Modal Isolation, ENV Secrets, Scoped Failure Context & Community Improvements

Latest

Choose a tag to compare

@yashh1323 yashh1323 released this 27 Nov 13:05

What's New in v2.1.0

Built directly from real engineering feedback and edge-case testing on our Playwright MCP architecture:

1. Hardened Active Modal Isolation & Native checkVisibility()

  • Replaces fragile .first() dialog checks with CSS stacking-context (z-index, :modal top-layer, transform) modal selection across light DOM, slots, and open Shadow DOM—avoiding false misses on inert/hidden Radix or Headless UI portals (scripts/executor.js).
  • Unifies scripts/discover.js and scripts/executor.js via scripts/browser-dom.js, using Chromium's native element.checkVisibility({ checkOpacity: true, checkVisibilityCSS: true, contentVisibilityAuto: true }) (with fallback for older runtimes), paired with getBoundingClientRect(), display: contents child/text-node checks, and explicit hidden, inert, and aria-hidden="true" checks across open shadow hosts.

2. Strict ${ENV_VAR} Secret Placeholders & Pre-Truncation Redaction

  • Supports ${QA_EMAIL}, ${QA_PASSWORD}, and ${ENV_VAR} placeholders in URLs, actions (values and field names), and assertions without storing credentials in plan.json or compiled .spec.ts files (scripts/env-utils.js, scripts/compiler.js, scripts/executor.js).
  • Enforces strict identifier syntax (^[A-Z_][A-Z0-9_]*$), fail-closed requireEnv() lookups in compiled specs, AUTO_QA_ALLOWED_ENV_PREFIXES (QA_,AUTO_QA_,TEST_ default in MCP mode), pre-registration of permitted secrets before logging/truncation, and scrubbing of raw, encodeURIComponent, URLSearchParams, and lowercase hex variants across console logs, errors, failure-step-N-context.json, Markdown reports, and JSON reports.

3. Failure-Time Scoped Context Snapshots & Freshness Guardrail

  • When a step fails, executor.js reads the live failing DOM (scoped strictly to the active blocking modal if open) before screenshot capture or browser teardown and writes failure-step-N-context.json (capped at 50/50/30 elements + 16KB ariaSnapshot()) right alongside failure-step-N.png.
  • Records capturedAt and Git HEAD (gitHead) in failure snapshots and adds check-context-freshness CLI + auto_qa_check_context_freshness MCP tool (scripts/context-freshness.js) to warn agents if source files or HEAD changed since capture.

4. Dynamic Counter/Badge Normalization Fallback

  • Adds normalizeDynamicLabel() fallback strictly after exact and substring strategies fail, allowing plans targeting "Cart (1)" or "Notifications (4)" to click "Cart (2)" or "Notifications (14)" while respecting active blocking modals and preserving numeric-only targets (>= 2 chars and at least one letter).

5. Security, Atomic Outputs & Verification

  • Waits on a shared WeakMap CDP redirect/SSRF guard installation before navigation, rejects empty/unusable DNS lookups (scripts/url-utils.js), and writes reports, specs, and artifacts atomically without following links (scripts/write-output.js across cli.js, executor.js, and mcp-server.js).
  • Automated Test Coverage (npm test): 26/26 checks passing (9/9 security audit units + 17/17 v2.1.0 Playwright/CLI/MCP feature tests).