Workflow
https://github.com/OpenStaticFish/ZigCraft/actions/runs/30431891169
Failure output
The workspace post-run contained only weston.log; both build-output.log and screenshot.png were absent, indicating the screenshot step never executed. The visual-test step outputs read:
screenshot_exists=false
exists=false # build-output.log check
No screenshot path error, no Vulkan/device/swapchain output, no Zig compile output, no Lavapipe ICD resolution output were captured, because the workflow short-circuited before the Setup Lavapipe Vulkan and Run menu screenshot capture steps ran.
The visual-test-diagnose.md prompt's hypothesis (screenshot.ppm rejected by screenshot.zig:detectScreenshotFormat) is stale for this run: the workflow on dev already uses -Dscreenshot-path=screenshot.png (.github/workflows/visual-test.yml:81), and the game itself was never invoked to test that path.
Diagnosis
Same root cause as #956 (run #30338232720), which PR #957 already diagnoses: .github/workflows/visual-test.yml:55-68:
- name: Ensure visual-test label exists
run: |
if ! gh label list --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 --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
env:
GH_TOKEN: ${{ secrets.OPENCODE_PAT }}
The repository now has 41 labels. gh label list paginates at 30 entries per page by default, so both visual-test and run-visual-test (which sit on page 2 — see https://github.com/OpenStaticFish/ZigCraft/labels?page=2) are not returned by the unflagged gh label list --json name invocation. The guard if ! ... | grep -q '^visual-test$' therefore evaluates true and the script attempts to create both labels. The existing labels cause gh label create to fail with:
label with name "visual-test" already exists; use --force to update its color and description
label with name "run-visual-test" already exists; use --force to update its color and description
exit 1 propagates from the step. Because .github/workflows/visual-test.yml:73-87 (Run menu screenshot capture) has no if: always(), it is skipped, and so are Check screenshot exists (which then sees screenshot_exists=false) and Check build log exists (exists=false). Only the Start headless Wayland compositor step that ran earlier produces the artifact (weston.log).
Result: zero diagnostic information about Zig/Vulkan/Lavapipe/SDL is reachable; the Zig/Vulkan/screenshot code path is never exercised. This explains why build-output.log is missing in the workspace even though run-with-log would have created it had the step run.
This is the second consecutive scheduled visual-test run to hit this bug; the fix from #957 is still open against dev and has not landed, so today's schedule run reproduced the same failure mode.
Suggested fix
Either page through gh label list (e.g. gh label list --json name --paginate --jq '.[].name', or pass --limit 100) or skip creation when the underlying gh label create would fail (drop the guard entirely and rely on gh label create || true, or pass --force to overwrite the existing color/description). The minimal patch is:
- name: Ensure visual-test label exists
run: |
set -euo pipefail
existing=$(gh label list --json name --paginate --jq '.[].name')
echo "$existing" | grep -q '^visual-test$' || gh label create "visual-test" \
--description "Issues from automated visual regression tests" \
--color "E06C75"
echo "$existing" | grep -q '^run-visual-test$' || gh label create "run-visual-test" \
--description "Run deterministic visual regression workflow on a PR" \
--color "E06C75"
env:
GH_TOKEN: ${{ secrets.OPENCODE_PAT }}
Additionally, the Run menu screenshot capture step (.github/workflows/visual-test.yml:73-87) should be marked if: always() and the screenshot / build-log existence checks should not depend on its outcome, so that a transient preflight failure still surfaces a useful build log instead of a silent no-op.
Origin
Workflow
https://github.com/OpenStaticFish/ZigCraft/actions/runs/30431891169
Failure output
The workspace post-run contained only
weston.log; bothbuild-output.logandscreenshot.pngwere absent, indicating the screenshot step never executed. The visual-test step outputs read:No screenshot path error, no Vulkan/device/swapchain output, no Zig compile output, no Lavapipe ICD resolution output were captured, because the workflow short-circuited before the
Setup Lavapipe VulkanandRun menu screenshot capturesteps ran.The
visual-test-diagnose.mdprompt's hypothesis (screenshot.ppmrejected byscreenshot.zig:detectScreenshotFormat) is stale for this run: the workflow ondevalready uses-Dscreenshot-path=screenshot.png(.github/workflows/visual-test.yml:81), and the game itself was never invoked to test that path.Diagnosis
Same root cause as #956 (run #30338232720), which PR #957 already diagnoses:
.github/workflows/visual-test.yml:55-68:The repository now has 41 labels.
gh label listpaginates at 30 entries per page by default, so bothvisual-testandrun-visual-test(which sit on page 2 — see https://github.com/OpenStaticFish/ZigCraft/labels?page=2) are not returned by the unflaggedgh label list --json nameinvocation. The guardif ! ... | grep -q '^visual-test$'therefore evaluates true and the script attempts to create both labels. The existing labels causegh label createto fail with:exit 1 propagates from the step. Because
.github/workflows/visual-test.yml:73-87(Run menu screenshot capture) has noif: always(), it is skipped, and so areCheck screenshot exists(which then seesscreenshot_exists=false) andCheck build log exists(exists=false). Only theStart headless Wayland compositorstep that ran earlier produces the artifact (weston.log).Result: zero diagnostic information about Zig/Vulkan/Lavapipe/SDL is reachable; the Zig/Vulkan/screenshot code path is never exercised. This explains why
build-output.logis missing in the workspace even thoughrun-with-logwould have created it had the step run.This is the second consecutive scheduled visual-test run to hit this bug; the fix from #957 is still open against
devand has not landed, so today's schedule run reproduced the same failure mode.Suggested fix
Either page through
gh label list(e.g.gh label list --json name --paginate --jq '.[].name', or pass--limit 100) or skip creation when the underlyinggh label createwould fail (drop the guard entirely and rely ongh label create || true, or pass--forceto overwrite the existing color/description). The minimal patch is:Additionally, the
Run menu screenshot capturestep (.github/workflows/visual-test.yml:73-87) should be markedif: always()and the screenshot / build-log existence checks should not depend on its outcome, so that a transient preflight failure still surfaces a useful build log instead of a silent no-op.Origin
Ensure visual-test label existsat.github/workflows/visual-test.yml:55-68gh label list --json name --jq '.[].name'(default 30-page pagination)if ! gh label list ... | grep -q '^visual-test$'followed by unconditionalgh label create.github/workflows/visual-test.yml:73-87(Run menu screenshot capture) skipped