Skip to content

fix: search worker INIT timeout and runtime failure fallback#273

Merged
Just-Insane merged 11 commits into
integrationfrom
codex/issue-256-search-worker
Jun 22, 2026
Merged

fix: search worker INIT timeout and runtime failure fallback#273
Just-Insane merged 11 commits into
integrationfrom
codex/issue-256-search-worker

Conversation

@Just-Insane

Copy link
Copy Markdown
Collaborator

Description

Fixes #256

Fail search worker startup fast when IndexedDB open never settles, preserve a clean worker ERROR path 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).
    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 blocked opens 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 lint
  • pnpm fmt:check
  • pnpm typecheck
  • pnpm test:run
  • pnpm knip
  • pnpm build

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Sentry Preview Error Triage

No 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.

@github-code-quality

github-code-quality Bot commented Jun 22, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: JavaScript

JavaScript / code-coverage/vitest

The overall coverage in the branch remains at 26%, unchanged from the branch.

Show a code coverage summary of the most impacted files.
File 66ef3dd 80b3383 +/-
src/app/plugins...kerLifecycle.ts 0% 93% +93%

Updated June 22, 2026 14:55 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

Comment thread src/app/hooks/useSearchIndex.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/app/plugins/search-worker/workerLifecycle.ts
Comment thread src/app/hooks/useSearchIndex.tsx Outdated
Comment thread src/app/hooks/useSearchIndex.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/app/hooks/useSearchIndex.tsx Outdated
Comment thread src/app/hooks/useSearchIndex.tsx Outdated
Comment thread src/app/hooks/useSearchIndex.tsx
Comment thread src/app/hooks/useSearchIndex.tsx
@github-actions

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

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

@Just-Insane Just-Insane merged commit 5d6dd21 into integration Jun 22, 2026
18 checks passed
@Just-Insane Just-Insane deleted the codex/issue-256-search-worker branch June 22, 2026 15:01
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.

Fix search worker INIT timeout and runtime failure fallback

1 participant