Skip to content

feat: integrate LLM visual check into CI pipeline #311

Description

@adnaan

Context

ValidateScreenshotWithLLM() was added to lvt/testing (commit 03fb143) — it captures screenshots via chromedp and sends them to Claude for visual analysis. Currently runs only with explicit LVT_VISUAL_CHECK=true on local machines.

Proposal

Add optional CI integration:

  • Run as a separate GitHub Actions job (not blocking)
  • Only on PRs that modify *.tmpl files
  • Use claude-haiku-4-5 for cost efficiency (~$0.01/screenshot)
  • Report findings as PR comment, not as check failure
  • Store ANTHROPIC_API_KEY as GitHub secret

Current State

  • Helper: lvt/testing/visual.go
  • Usage: e2etest.ValidateScreenshotWithLLM(t, ctx, "page description")
  • Gating: LVT_VISUAL_CHECK=true + ANTHROPIC_API_KEY
  • Model: claude-haiku-4-5

Created from PR review follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions