You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 modules/engine-graphics/src/vulkan/screenshot.zig:262-268 (detectScreenshotFormat) accepts that extension. The Zig/Vulkan/screenshot code is never exercised because the preflight short-circuits the job first. I verified this by reading the staged 8d205ff (the commit pinned on dev) — visual-test.yml:81 reads zig build run -Dscreenshot-path=screenshot.png -Dskip-present=true, and the only .ppm references left in the source tree are stb_image.h, the unrelated worldgen-climate-snapshot writer, and the stale visual-test-diagnose.md prompt itself.
- name: Ensure visual-test label existsrun: | 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" fienv:
GH_TOKEN: ${{ secrets.OPENCODE_PAT }}
gh label list --json name defaults to 30 entries per page. The repository now has 41 labels, so visual-test (alphabetical position 21) is still returned, but run-visual-test (alphabetical position 41) is not. I confirmed this locally:
$ gh label list --json name --jq '.[].name' | grep -E 'visual-test|run-visual-test'
visual-test
$ gh label list --json name --limit 100 --jq '.[].name' | grep -E 'visual-test|run-visual-test'
visual-test
run-visual-test
The second if ! ... | grep -q '^run-visual-test$' guard therefore evaluates true and the script tries to create the label.
gh label create returns label with name "run-visual-test" already exists; use --force to update its color and description and exits 1.
The step has no continue-on-error: true, so all subsequent steps are skipped: Setup Lavapipe Vulkan, Run menu screenshot capture (line 73-87), Check screenshot exists (line 89-97), Check build log exists (line 117-120). Only Start headless Wayland compositor (line 32-33) had already run, leaving weston.log as the sole artifact.
The diagnose prompt's screenshot.ppm hypothesis is stale for this run for two independent reasons:
.github/workflows/visual-test.yml:81 already passes -Dscreenshot-path=screenshot.png, not .ppm.
Even if the workflow did pass .ppm, the screenshot capture path is never reached because the label preflight exits 1 first.
Suggested fix
Two-line fix that resolves the recurring failure and stops future diagnosis agents from being misdirected by the stale prompt:
Make the label preflight idempotent and paginated in .github/workflows/visual-test.yml:55-68:
- name: Ensure visual-test labels existrun: | for label in visual-test run-visual-test; do if ! gh label list --paginate --json name --jq '.[].name' | grep -q "^${label}$"; then gh label create "${label}" \ --description "Issues from automated visual regression tests" \ --color "E06C75" || true fi doneenv:
GH_TOKEN: ${{ secrets.OPENCODE_PAT }}
Update .github/prompts/visual-test-diagnose.md:7,42 so the prompt no longer assumes -Dscreenshot-path=screenshot.ppm (the workflow has been using .png for a while):
- 2. Builds and runs the game with Lavapipe (software Vulkan): `zig build run -Dscreenshot-path=screenshot.ppm -Dskip-present=true`- 3. The game should render the HomeScreen menu for 5 frames, capture a screenshot as PPM, and exit- 4. The PPM is then converted to PNG+ 2. Builds and runs the game with Lavapipe (software Vulkan): `zig build run -Dscreenshot-path=screenshot.png -Dskip-present=true`+ 3. The game should render the HomeScreen menu for 5 frames, capture a screenshot as PNG, and exit
- The game uses `-Dscreenshot-path=screenshot.ppm` which sets `build_options.screenshot_path`- This enables screenshot mode: loads HomeScreen instead of WorldScreen, counts frames, captures PPM via Vulkan, then exits+ The game uses `-Dscreenshot-path=screenshot.png` which sets `build_options.screenshot_path`+ This enables screenshot mode: loads HomeScreen instead of WorldScreen, counts frames, captures PNG via Vulkan, then exits
And remove the .ppm-flavored items from the failure-pattern checklist (lines 17-23), or replace them with the actual failure that dominates the workflow today (Ensure visual-test label exists exit 1 with label with name "run-visual-test" already exists).
PR #953 already proposes the workflow fix; the only change needed for this run is merging it and removing the stale .ppm references from the diagnose prompt.
Workflow
https://github.com/OpenStaticFish/ZigCraft/actions/runs/30689332702
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), andmodules/engine-graphics/src/vulkan/screenshot.zig:262-268(detectScreenshotFormat) accepts that extension. The Zig/Vulkan/screenshot code is never exercised because the preflight short-circuits the job first. I verified this by reading the staged8d205ff(the commit pinned ondev) —visual-test.yml:81readszig build run -Dscreenshot-path=screenshot.png -Dskip-present=true, and the only.ppmreferences left in the source tree arestb_image.h, the unrelatedworldgen-climate-snapshotwriter, and the stalevisual-test-diagnose.mdprompt itself.Diagnosis
Same root cause as #916, #931, #935, #942, #944, #945, #946, #947, #949, #950, #952, #954, #956, #958, #960, #962 (reproduces of the same preflight bug, with PR #953 still proposing the fix on
dev)..github/workflows/visual-test.yml:55-68is the offending step:gh label list --json namedefaults to 30 entries per page. The repository now has 41 labels, sovisual-test(alphabetical position 21) is still returned, butrun-visual-test(alphabetical position 41) is not. I confirmed this locally:The second
if ! ... | grep -q '^run-visual-test$'guard therefore evaluates true and the script tries to create the label.gh label createreturnslabel with name "run-visual-test" already exists; use --force to update its color and descriptionand exits 1.The step has no
continue-on-error: true, so all subsequent steps are skipped:Setup Lavapipe Vulkan,Run menu screenshot capture(line 73-87),Check screenshot exists(line 89-97),Check build log exists(line 117-120). OnlyStart headless Wayland compositor(line 32-33) had already run, leavingweston.logas the sole artifact.The diagnose prompt's
screenshot.ppmhypothesis is stale for this run for two independent reasons:.github/workflows/visual-test.yml:81already passes-Dscreenshot-path=screenshot.png, not.ppm..ppm, the screenshot capture path is never reached because the label preflight exits 1 first.Suggested fix
Two-line fix that resolves the recurring failure and stops future diagnosis agents from being misdirected by the stale prompt:
Make the label preflight idempotent and paginated in
.github/workflows/visual-test.yml:55-68:Update
.github/prompts/visual-test-diagnose.md:7,42so the prompt no longer assumes-Dscreenshot-path=screenshot.ppm(the workflow has been using.pngfor a while):And remove the
.ppm-flavored items from the failure-pattern checklist (lines 17-23), or replace them with the actual failure that dominates the workflow today (Ensure visual-test label existsexit 1 withlabel with name "run-visual-test" already exists).PR #953 already proposes the workflow fix; the only change needed for this run is merging it and removing the stale
.ppmreferences from the diagnose prompt.Reference
.github/workflows/visual-test.yml:55-68(Ensure visual-test label existsstep).github/prompts/visual-test-diagnose.md:7,21,42,43