fix: search worker INIT timeout and runtime failure fallback#273
Conversation
Sentry Preview Error TriageNo Sentry errors found for this PR's preview deployment as of Mon, 22 Jun 2026 14:52 UTC. This comment updates automatically after each push. |
Code Coverage OverviewLanguages: JavaScript JavaScript / code-coverage/vitestThe overall coverage in the branch remains at 26%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e9ea6333e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9f293424e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Deploying with
|
| Status | Preview URL | Commit | Alias | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! | https://pr-273-charm.justin-tech.workers.dev | e1a7ed0 | pr-273 |
Mon, 22 Jun 2026 14:53:54 GMT |
Description
Fixes #256
Fail search worker startup fast when IndexedDB open never settles, preserve a clean worker
ERRORpath for INIT failures, and turn empty runtime worker errors into concrete failure messages. This keeps search from hanging indefinitely and resets pending search/backfill state when the worker fails.Type of change
Checklist:
AI disclosure:
AI assistance was used to reapply the scoped fix in a fresh worktree and verify it. The code adds a small search-worker lifecycle helper that wraps IndexedDB open with a timeout, keeps
blockedopens waiting until they either succeed or time out, normalizes worker INIT/runtime failure messages, and ensures the main thread tears down pending backfill/query state when the worker fails.Validation
pnpm lintpnpm fmt:checkpnpm typecheckpnpm test:runpnpm knippnpm build