Dataface Tasks

Make qa-explore default to dangerous mode for automation

IDINFRA_TOOLING-MAKE_QA_EXPLORE_DEFAULT_TO_DANGEROUS_MODE_FOR_AUTOMATION
Statuscompleted
Priorityp1
Milestonem1-ft-analytics-analyst-pilot
Ownersr-engineer-architect
Completed bydave
Completed2026-03-18

Problem

Default qa-explore to dangerous mode, keep a safe opt-in, add tests, and update docs so worker QA does not stall on Playwright permissions.

Context

  • scripts/dispatch already defaults worker automation to dangerous mode and offers --safe as the explicit opt-in for permission prompts.
  • scripts/qa-explore still defaulted to safe mode, which caused inner claude -p browser runs to stop and ask for MCP Playwright tool permissions instead of completing automatically.
  • The follow-up goal is to align qa-explore with the existing dispatch automation model, keep a documented safe escape hatch, and cover the behavior in tests/scripts/test_dispatch_scripts.py.

Possible Solutions

  • Flip scripts/qa-explore to dangerous-by-default, add an explicit --safe flag, and update docs/tests accordingly. Recommended because it matches dispatch, removes prompt brittleness in worker automation, and keeps the interactive path available when deliberately requested.
  • Leave the default alone and rely on prompts to tell workers to pass --dangerous. Rejected because it is brittle and makes the wrapper itself unreliable for automation.

Plan

  1. Change scripts/qa-explore so its default permission mode is dangerous and --safe becomes the explicit override.
  2. Update the dry-run and execution tests in tests/scripts/test_dispatch_scripts.py to lock the new behavior in.
  3. Update the repo QA guidance to document the new default and the meaning of --safe.
  4. Validate with focused script tests and record the result here.

Implementation Progress

  • Updated scripts/qa-explore usage/help text and argument parsing to default to dangerous mode, mirroring scripts/dispatch.
  • Replaced the old --dangerous opt-in with --safe as the only permission-mode override.
  • Updated tests/scripts/test_dispatch_scripts.py so dry-run now asserts Permission mode: dangerous by default, asserts --safe removes the dangerous flag, and asserts real execution includes --dangerously-skip-permissions.
  • Updated .codex/skills/qa-explorer/SKILL.md and AGENTS.md to document the automation-first default and the --safe opt-in.
  • Focused validation: uv run pytest tests/scripts/test_dispatch_scripts.py -q -> 15 passed.

QA Exploration

  • N/A. This task changes the local QA wrapper and docs, not a user-facing browser surface. Focused script regression tests cover the behavior change.
  • [x] QA exploration completed (or N/A for non-UI tasks)

Review Feedback

  • [x] Review cleared