Skip to content

test(live): wait for the images facade however long the CPU takes - #48

Merged
Vect0rM merged 1 commit into
mainfrom
fix/sdcpp-live-facade-wait
Oct 21, 2026
Merged

Vect0rM merged 1 commit into
mainfrom
fix/sdcpp-live-facade-wait

Conversation

@Vect0rM

@Vect0rM Vect0rM commented Oct 21, 2026

Copy link
Copy Markdown
Member

Why

The engine candidate run of master-982-0518b34 (run 39623418838) failed on macOS only, pin and candidate alike (core_failure). The failing test was a real stable-diffusion.cpp engine installs the tree, loads the model, generates, cancels and unloads, after 715 s, with TypeError: fetch failed, caused by HeadersTimeoutError (UND_ERR_HEADERS_TIMEOUT), at the call to the OpenAI facade (test/live/diffusion.test.ts:240). Linux x64 and arm64 passed.

POST /v1/images/generations answers only once the picture exists. On the macOS runner's CPU that takes longer than 300 s, and global fetch (undici) stops waiting for a response's headers after 300 s. The facade's own limit is 30 minutes (IMAGES_TIMEOUT_MS).

What changes

test/live/diffusion.test.ts sends that one request through node:http (postJson), which has no headers timeout. The request, the expected status, the body checks and the gallery count are unchanged. The facade's 30-minute timeout and the test's 45-minute timeout still apply.

Checked

  • The mechanism on its own: against a local server that answers after 310 s, fetch fails at 301 s with UND_ERR_HEADERS_TIMEOUT, and node:http gets the 200 at 310 s.
  • npm run engine:check -- --engine sd-cpp --tag master-982-0518b34 on macOS arm64 → PASS. Pin master-883-137f740-a36f1b1a 5/5, candidate 5/5. Surface 0 break, 6 warn.
  • eslint, typecheck, prettier.

🤖 Generated with Claude Code

The engine candidate run of master-982-0518b34 failed its macOS live cells,
pin and candidate alike: the facade call `POST /v1/images/generations`
answers only once the picture exists, and on the macOS runner's CPU that
took longer than global fetch waits for a response's headers (undici's
headersTimeout, 300 s: `fetch failed`, UND_ERR_HEADERS_TIMEOUT). Linux
passed. The test now sends that request through node:http, which sets no
such limit; the facade's own 30-minute timeout still applies, and every
assertion is the same.

Reproduced on its own: against a server answering after 310 s, fetch fails
at 301 s with UND_ERR_HEADERS_TIMEOUT and node:http gets the 200.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Vect0rM
Vect0rM merged commit 8c85fbb into main Oct 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant