BetaLenzon is in beta — the Free tier is 100% free while we're in beta (bring your own Anthropic key, public repos).See plans →
Lenzon

mattzcarey/shippie PR #491 — Fix CLI timeout on long QA runs — PR #491

mattzcarey/shippie · pull request #491 ·

Loading…

Transcript

PlainEnglish

Let's walk through pull request four ninety-one — a fix that keeps the shippie CLI from dying during long-running QA workflows.

PlainEnglish

This PR is doing three things. First, we're eliminating that five-minute timeout that's been killing long workflows. Second, we're keeping the fast server-readiness check exactly as it is. And third, we're not changing how responses are handled — everything downstream stays the same.

PlainEnglish

Here's what was happening. The shippie CLI launches a local server and waits for the workflow to finish using a POST request. Node's built-in fetch — powered by undici — has a roughly five-minute idle timeout. So any QA run that takes longer than that would just die mid-exploration with a generic fetch failed message. The author confirmed this live when a QA run against executor dot s-h failed halfway through, even though the same workflow succeeded when run directly via the GitHub Action path.

Architecture

The fix touches two files. The main change is in bin slash shippie dot m-j-s — we're adding a new helper and swapping out the fetch call. And there's a changeset entry documenting the fix as a patch release.

Architecture

Here's the new post-json helper. It uses node colon http request instead of fetch, which means no built-in timeout. We construct the request, wire up event listeners to collect response chunks, and then resolve with an object that mirrors the Fetch API shape — it has an ok flag, a status code, and the response text as a string. This contract match is key — it means the downstream code that parses the response doesn't need to change at all.

Architecture

And here's where we swap it in. The old code used fetch with a body and headers. The new code just calls post-json with the URL and the payload. Notice that the response text is now a property instead of an awaited method call, but the JSON parse line stays exactly the same. That's the contract match at work.

Architecture

One thing we didn't change — the server-readiness probe. This quick connectivity check still uses fetch with an explicit one-second abort signal. That's perfect for its job — we just need to know the server is up, and a short timeout is exactly what we want here.

PlainEnglish

After this lands, shippie review and shippie QA can sustain long-running workflows without timing out. The fix targets only the blocking workflow wait — the server probe still has its timeout. Error handling and response parsing stay exactly the same, so all the downstream logic continues to work identically. This resolves a critical reliability issue for users running QA workflows that legitimately take more than five minutes to explore and test their applications.

CodeQuality

We checked a few things while reviewing this change. Error paths are solid — both request and response errors flow to reject, and the outer try-catch handles everything. The response status logic is correct — anything under four hundred is treated as okay. The request body is already a JSON string, which is the right type for the request end call. Response chunking uses set-encoding and the data event to collect the full body properly. And the exit code routing is unchanged — four-hundred-series and five-hundred-series responses still exit with code one, two-hundreds and three-hundreds with code zero. Everything looks clean.

PlainEnglish

This is a focused fix that solves the timeout problem without touching the response contract or error handling. The change is scoped to exactly the right call site, and the code health checks came back clean. Looks good to me — nice work.

How this was made

Lenzon read mattzcarey/shippie at pull request #491 and generated this walkthrough automatically. The narration above is the transcript of what it says.

Explain a pull request from your own repo

Point Lenzon at a repo or a pull request and get a narrated walkthrough like this one.

Try it
mattzcarey/shippie PR #491 — Fix CLI timeout on long QA runs — PR #491