Skip to content

Claude/practical gates zezmx#20

Merged
billrichards merged 5 commits into
mainfrom
claude/practical-gates-ZEZMX
Jun 2, 2026
Merged

Claude/practical gates zezmx#20
billrichards merged 5 commits into
mainfrom
claude/practical-gates-ZEZMX

Conversation

@billrichards

Copy link
Copy Markdown
Owner

No description provided.

claude and others added 5 commits May 23, 2026 20:30
The README previously required users to manually run 'playwright install chromium' after pip install. This was easy to forget, especially in CI environments.

Now:
- Both CLI and web interface automatically install Chromium on first run if missing
- Provides user-friendly message indicating the installation is in progress
- Falls back to manual installation instruction if auto-install fails
- Updated README to reflect this new automatic behavior
- Removed manual playwright install step from CI/CD example

This improves the developer experience by eliminating a common setup step while maintaining the ability to manually reinstall if needed.

https://claude.ai/code/session_01GrAGQV1uySMF68GJxLwWFt
- Capture stderr from playwright install to detect permission errors
- Provide specific guidance for permission-denied failures
- Suggest PLAYWRIGHT_BROWSERS_PATH environment variable as workaround
- Include full error output for other failure types
- Helps users troubleshoot installation issues in restricted environments

https://claude.ai/code/session_01GrAGQV1uySMF68GJxLwWFt
…ation

Critical fixes:
- Fix broken chromium detection logic that only checked API attribute existence
  rather than verifying browser binaries are actually installed
- Verify chromium by attempting to launch it, catching real 'not found' errors
- Extract duplicated installation code to shared playwright_utils module
- Add comprehensive test coverage for all installation scenarios

Changes:
- Create qa_agent/playwright_utils.py with working ensure_chromium_installed()
- Update cli.py and web/__init__.py to use shared utility (removes 72 lines of duplication)
- Add tests/test_playwright_utils.py with 6 test cases covering:
  * Already installed (no-op)
  * Missing + install succeeds
  * Missing + permission denied
  * Missing + other install error
  * Non-browser exceptions are re-raised
  * Import errors trigger installation

This fixes the critical issues identified in code review that prevented
the auto-installation feature from working as intended.
…est suite

- Add qa_agent/playwright_utils.py with ensure_chromium_installed() that
  auto-installs Chromium if the binary is missing; imports sync_playwright
  at module level so tests can patch it via the module namespace
- Move ensure_chromium_installed() call in cli.py to after arg parsing so
  --help and --version work without touching the browser
- Add tests/test_playwright_utils.py covering all installation scenarios
- Patch ensure_chromium_installed in _cli_exit_helper.py so exit-code
  smoke tests run without a real browser
- Add autouse conftest fixture that no-ops ensure_chromium_installed for
  all non-playwright-utils unit tests so the suite passes without Chromium

https://claude.ai/code/session_018P7MGqvrRX1e9MmxgYqEAq
@billrichards billrichards merged commit 8caf5e3 into main Jun 2, 2026
15 checks passed
@billrichards billrichards deleted the claude/practical-gates-ZEZMX branch June 5, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants