Skip to content

fix(lint): preserve caught error in memory-lancedb loadLanceDB#11061

Closed
leszekszpunar wants to merge 1 commit intoopenclaw:mainfrom
leszekszpunar:fix/memory-lancedb-preserve-caught-error
Closed

fix(lint): preserve caught error in memory-lancedb loadLanceDB#11061
leszekszpunar wants to merge 1 commit intoopenclaw:mainfrom
leszekszpunar:fix/memory-lancedb-preserve-caught-error

Conversation

@leszekszpunar
Copy link
Copy Markdown
Contributor

@leszekszpunar leszekszpunar commented Feb 7, 2026

Summary

Add { cause: err } to the re-thrown Error in loadLanceDB() to satisfy the preserve-caught-error oxlint rule. This one-line fix unblocks CI lint checks for 9 open PRs that are currently failing solely due to this pre-existing violation on main.

Closes #11060

Behavior Changes

None. The original error is now chained via the standard ES2022 cause property instead of being discarded. This preserves the full error stack for debugging while satisfying the lint rule.

Codebase and GitHub Search

Searched for other preserve-caught-error violations -- this is the only instance blocking CI. Other lint errors in the repo are separate issues (type-aware rules in extensions).

Tests

  • pnpm lint: confirmed preserve-caught-error count drops from 1 to 0 after this change.
  • No behavioral change, no new tests needed.

Impact

Currently blocked PRs (lint-only failures): #11001, #11009, #11026, #11027, #11028, #11033, #11046.
Partially blocked (lint + other failures): #11032, #11035.

lobster-biscuit

Greptile Overview

Greptile Summary

  • Updates extensions/memory-lancedb/index.ts to rethrow the LanceDB dynamic import failure with an ES2022 error cause, satisfying the preserve-caught-error oxlint rule.
  • Keeps the existing human-readable error message while chaining the original error for better diagnostics.
  • Scoped to the LanceDB loader helper used by the memory plugin’s initialization path; no other behavior changes in the extension.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Change is a one-line update that preserves existing behavior while adding standard Error cause chaining; no new control flow or API changes were introduced, and the diff is isolated to a single catch/rethrow site.
  • extensions/memory-lancedb/index.ts

Context used:

  • Context from dashboard - CLAUDE.md (source)
  • Context from dashboard - AGENTS.md (source)

@leszekszpunar
Copy link
Copy Markdown
Contributor Author

Closing -- #11093 (merged) excluded extensions/ from oxlint scope in .oxlintrc.json, which resolved the preserve-caught-error lint failure that was blocking CI. The code fix here is still valid as best practice (error cause chaining), but no longer needed to unblock PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-lancedb Extension: memory-lancedb

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: oxlint preserve-caught-error violation in memory-lancedb blocks all PR CI

1 participant