Skip to content

[Visual Test] Label preflight aborts before screenshot capture #945

Description

@MichaelFisher1997

Workflow run

https://github.com/OpenStaticFish/ZigCraft/actions/runs/29677776782

Exact failure output

label with name "run-visual-test" already exists; use `--force` to update its color and description
##[error]Process completed with exit code 1.

build-output.log is absent because the game did not run. The Ensure visual-test label exists step failed first; Setup Lavapipe Vulkan and Run menu screenshot capture were consequently skipped.

Diagnosis

The failure originates in the Ensure visual-test label exists shell step at .github/workflows/visual-test.yml:55, specifically the second check at .github/workflows/visual-test.yml:62:

if ! gh label list --json name --jq '.[].name' | grep -q "^run-visual-test$"; then
  gh label create "run-visual-test" ...
fi

gh label list defaults to 30 results. This repository has more than 30 labels, and run-visual-test is outside that first page. The check therefore reports a false absence, gh label create attempts to create the existing label, and bash -e terminates the step with exit code 1.

This is a workflow preflight failure, not a Vulkan, swapchain, shader, HomeScreen, or screenshot-readback failure. No Zig function was reached. In particular, captureFrame in modules/engine-graphics/src/rhi_vulkan.zig:415 and requestCapture in modules/engine-graphics/src/vulkan/screenshot.zig:24 were never called. The current workflow also passes screenshot.png at .github/workflows/visual-test.yml:81, which is supported by detectScreenshotFormat in modules/engine-graphics/src/vulkan/screenshot.zig:262; the diagnosis prompt still describing a PPM capture is stale.

Suggested fix

Make label setup idempotent without relying on a paginated list:

- name: Ensure visual-test labels exist
  run: |
    gh label create "visual-test" \
      --description "Issues from automated visual regression tests" \
      --color "E06C75" \
      --force
    gh label create "run-visual-test" \
      --description "Run deterministic visual regression workflow on a PR" \
      --color "E06C75" \
      --force

Alternatively, query each label directly with gh label view <name> before creating it. Also update .github/prompts/visual-test-diagnose.md to match the current PNG workflow and modules/game-ui/src/screens/home.zig path so future diagnosis starts from accurate context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghotfixstalevisual-testIssues from automated visual regression tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions