Repository navigation
Stop refusing a link store a loaded machine would have opened - #28
Merged
Merged
Conversation
verify run 138 on main failed one Windows leg: the link-store worker did not report ready within the fixed 5s startup deadline, so a test that only ever runs where live links are supported failed with "Link store initialization failed". The deadline is a backstop against a worker that will never answer, not a performance budget. The failures it exists to catch — an unpatched SQLite build, an unreadable file — report themselves in milliseconds through an explicit failure message. A cold, heavily loaded machine can legitimately take seconds to boot a worker thread and open SQLite, and 5s sits inside that variance. Refusing to start a store the machine would have opened is the worse failure, so the backstop moves to 15s. The three ways a start can fail were also indistinguishable: a timeout, an explicit worker failure and an exit during start all raised the same sentence, which is why the run needed a stack trace to tell apart. Each now names its cause. Not verified here: this container's SQLite is 3.51.2, so every live-link test skips locally and the changed path cannot run. The full suite passes with no regression; CI on a supported build is the check. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WrwFcAcntyBBSk21irvgAV
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
verify run 138 on
mainfailed one leg of 11 —verify (windows-latest, 26):The
Timeoutframe identifies it exactly: the link-store worker did not report ready inside the fixed 5s startup deadline. Not a crash — the worker simply had not finished booting.That deadline is a backstop against a worker that will never answer, not a performance budget. The failures it exists to catch — an unpatched SQLite build, an unreadable or non-regular file — report themselves in milliseconds through an explicit
{failed:true}message, not by timing out. Meanwhile a cold, contended machine (here: nine matrix legs on one runner) can legitimately take seconds to boot a worker thread and open SQLite, and 5s sits inside that variance. Refusing to start a store the machine would have opened is the worse failure, so the backstop moves to 15s — still fast enough to fail a genuine hang in front of a human.This is a product robustness fix, not a test fix: the same 5s applies to
urlcode serve --link-store …on any busy or cold host.Second change, from what this cost to diagnose: the three ways a start can fail — the timeout, an explicit worker failure, and an exit or error during start — all raised the identical sentence. Telling them apart needed a stack trace. Each now names its cause:
…failed: no ready signal within 15000ms…failed: the worker could not open the store…failed: the worker exited or errored during startAll three keep the
initialization failedprefix, so the existing assertion attest/links.test.js:150still matches.Note this test is not Windows-specific — Windows runners are simply the only CI legs whose Node ships a patched SQLite, so
liveLinksSkipskips these tests everywhere else. The exposure is on every host that actually supports live links.Verification
Not verified here, and worth being plain about: this container's SQLite is 3.51.2, which is not one of the patched builds live links require (3.51.3+, 3.50.7, 3.44.6). Every live-link test skips locally, so the changed path cannot execute in this environment. I confirmed the full suite passes with no regression and that the changed error strings still satisfy the existing assertion, but CI on a supported build is the real check.
I did not attempt to reproduce the timeout — it depends on runner load I cannot recreate — so this is reasoning from the stack frame rather than a reproduction. A re-run of the failed leg would likely have passed, which is exactly why the deadline, not the run, is what needed changing.
Compatibility and security
No API, YAML or CLI surface changes. One internal constant and three error strings.
A hang is still bounded; the bound is 15s instead of 5s. Nothing becomes unbounded.
The per-operation 5s timeout in
call()is deliberately untouched — a query that takes 5s is a real fault, unlike a one-time worker boot.Changes match the documented portable contract; docs/examples are updated where needed.
Relevant tests and package checks pass, or limitations are explained above.
No credentials, customer data or private project material are included.
Runtime/starter changes remain aligned where applicable.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WrwFcAcntyBBSk21irvgAV
Generated by Claude Code