Skip to content

[Visual Test] Label preflight skipped screenshot capture on run #21 #937

Description

@MichaelFisher1997

Workflow run

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

Scheduled visual-test run #21 on commit d0e348c (dev).

Failure evidence

build-output.log is absent from the workspace. This is not an engine logging failure: current check-step metadata shows that the game command was never started.

Step Result
Ensure visual-test label exists failure (07:02:39-07:02:40 UTC)
Setup Lavapipe Vulkan skipped
Run menu screenshot capture skipped
Check screenshot exists success, screenshot_exists=false
Check build log exists success, exists=false
Upload build log artifact skipped

The relevant duplicate-label failure from this unchanged command path is:

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

The current action log could not be downloaded through REST because the workflow token is rate-limited, but GraphQL check-step metadata confirms the same step boundary, and the repository state still reproduces the exact guard condition: gh label list defaults to 30 labels, the repository has 41, visual-test is position 21, and run-visual-test is position 41. The identical error above was captured from the same step and command in #916.

The only local runtime log is weston.log, showing that Weston initialized successfully and was terminated immediately after the preflight failed:

[07:02:38.815] Command line: weston --socket=headless --backend=headless-backend.so --width=1280 --height=720
[07:02:38.820] Output 'headless' enabled with head(s) headless
[07:02:40.312] caught signal 15

There are therefore no Vulkan instance/device errors, swapchain errors, shader failures, screenshot staging/fence/write errors, panics, or segfaults in this run: none of those paths executed.

Root cause

The Ensure visual-test label exists shell step in .github/workflows/visual-test.yml:55-69 checks label existence with:

gh label list --json name --jq '.[].name'

gh label list has a default --limit 30. The repository currently has 41 labels and run-visual-test is item 41 in the returned ordering. The guard at .github/workflows/visual-test.yml:62 therefore incorrectly treats the existing label as missing and invokes gh label create "run-visual-test" at line 63. gh label create returns non-zero because that label already exists, aborting the step and skipping all subsequent non-always() steps.

Because .github/actions/run-with-log/action.yml:33-34 is only entered by the skipped screenshot step, its initial tee never creates build-output.log.

This is a recurrence of #916, #931, and #935; the recommended pagination/idempotency fix has still not landed.

Source trace

The failure originates in the workflow shell guard, not a Zig function:

  • .github/workflows/visual-test.yml:55-69 — failing Ensure visual-test label exists step.
  • .github/workflows/visual-test.yml:62-65 — false negative followed by duplicate gh label create.
  • .github/actions/run-with-log/action.yml:33-34 — would create build-output.log, but was skipped.

The requested engine paths were inspected and are downstream of the skipped command:

  • src/game/app.zig:243-251 loads the menu in screenshot mode; App.runSingleFrame requests capture at src/game/app.zig:467-520.
  • modules/game-ui/src/screens/home.zig:33-41 initializes HomeScreen and its preview.
  • modules/engine-graphics/src/vulkan_swapchain.zig:120-167 creates the offscreen transfer-source image.
  • modules/engine-graphics/src/rhi_vulkan.zig:409-413 forwards capture to screenshot.requestCapture.
  • modules/engine-graphics/src/vulkan/screenshot.zig:23-75 allocates the staging capture and :188-206 waits for completion and writes the image.
  • modules/engine-graphics/src/vulkan/rhi_init_deinit.zig:26-43 initializes the Vulkan device, frame manager, swapchain, and pipelines.

None of these functions ran in workflow run #21.

Suggested fix

Minimal fix: fetch enough labels in both guards. gh label list supports --limit, not --paginate:

- name: Ensure visual-test label exists
  run: |
    if ! gh label list --limit 100 --json name --jq '.[].name' | grep -q "^visual-test$"; then
      gh label create "visual-test" \
        --description "Issues from automated visual regression tests" \
        --color "E06C75"
    fi
    if ! gh label list --limit 100 --json name --jq '.[].name' | grep -q "^run-visual-test$"; then
      gh label create "run-visual-test" \
        --description "Run deterministic visual regression workflow on a PR" \
        --color "E06C75"
    fi

More robustly, make label maintenance idempotent and non-blocking so API quota or label metadata cannot disable visual testing:

- name: Ensure visual-test labels exist
  continue-on-error: true
  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

The label setup could also be removed from this workflow entirely because both labels already exist. After fixing the preflight, rerun the workflow to obtain the first meaningful Vulkan/screenshot result.

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 workinghotfixquestionFurther information is requestedstalevisual-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