Skip to content

Fix Ampa review container browser test tooling #970

@SorraTheOrc

Description

@SorraTheOrc

Headline

Switch the AMPA review container to a Playwright-compatible base image and update AMPA automation so browser tests run reliably during PR reviews. Success is a passing full browser test suite inside the container on a representative PR branch that previously failed due to missing runtime dependencies.

Problem statement

Automated PR review flows fail when browser tests run inside AMPA review containers because required Playwright/Chromium runtime dependencies are missing. This blocks end-to-end review and audit runs for PRs that include browser test coverage.

Users

  • PR reviewers who rely on AMPA automation to validate browser behavior before merging.
  • Example user story: As a PR reviewer, I want AMPA review containers to run browser tests successfully so I can trust automated review outcomes on my branch.
  • Example user story: As a PR reviewer, I want repeatable AMPA automation behavior so failed reviews indicate real code issues rather than container setup gaps.

Success criteria

  • AMPA review container image uses a Playwright-compatible base image and includes required runtime dependencies for Chromium.
  • AMPA automation changes are included so pool lifecycle/start-work behavior uses the updated image consistently.
  • Running the full browser test suite inside the AMPA review container succeeds (exit code 0) on a representative PR branch.
  • The representative branch chosen for validation is recorded in the work item comments with the exact test command used.
  • A lightweight browser launch smoke check is available in the container workflow to detect dependency regressions early.

Constraints

  • No additional hard constraints beyond functional success criteria were specified during intake.
  • Keep changes focused on container and AMPA automation scope for this work item.
  • Treat unrelated, non-container test failures as out-of-scope for this item; track them separately if discovered.

Existing state

  • Fix Ampa review container browser test tooling (WL-0MMTDALZO0KQEZMI) already captures missing Playwright library symptoms and initial proposal options.
  • CLI.md:636 documents available wl ampa commands, indicating existing AMPA automation entry points.
  • Dockerfile.tui-tests:1 shows a current container build pattern in this repository (Debian slim + apt install), which is relevant as a local reference for image updates.

Desired change

  • Move the AMPA review container image to a Playwright-compatible base image.
  • Ensure browser runtime dependencies and browser binaries needed for test execution are present in the built AMPA image.
  • Update AMPA automation so pool warm-up and work-start paths use the updated image and preserve reliable behavior.
  • Add or update a smoke-check command used by automation to validate basic browser launch in-container.
  • Validate by executing the full browser suite in-container on a representative PR branch and recording evidence in the work item.

Related work

  • Fix Ampa review container browser test tooling (WL-0MMTDALZO0KQEZMI) - primary work item for this intake.
  • Audit comment improvements (WL-0MLG60MK60WDEEGE) - related AMPA/audit pipeline context; not a duplicate of container dependency work.
  • Audit Write Path via CLI Update (WL-0MMNCOIYF18YPLFB) - related audit tooling context; not a duplicate of container/browser runtime work.
  • PR #433 - cited example of a blocked review flow affected by missing browser runtime dependencies.
  • CLI.md:636 - AMPA command surface reference.
  • Dockerfile.tui-tests:1 - repository container build reference.

Risks & assumptions

  • Risk: scope creep into unrelated CI/test issues; mitigation: record additional opportunities as separate linked work items instead of expanding this item.
  • Risk: Playwright base image updates may change behavior over time; mitigation: keep a pinned image tag and record the selected tag in implementation notes.
  • Risk: AMPA automation changes may only partially adopt the new image path; mitigation: validate warm-pool/start-work flow end-to-end during acceptance testing.
  • Assumption: the representative PR branch includes browser tests that previously failed due to container runtime dependencies.

Related work (automated report)

  • Audit comment improvements (WL-0MLG60MK60WDEEGE) - completed AMPA audit pipeline improvements that may share container execution paths used during automated reviews; useful context for verification expectations, but not a duplicate.
  • Audit Write Path via CLI Update (WL-0MMNCOIYF18YPLFB) - completed audit infrastructure work touching AMPA-adjacent flows; relevant for coordination context while this item focuses on browser runtime/container readiness.
  • CLI.md:636 - documents wl ampa commands (start, status, list, start-work) that define current automation entry points this change must preserve.
  • Dockerfile.tui-tests:1 - repository example of Debian-slim container build conventions that can inform implementation consistency.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions