ReviewOS

home-lang/home

Port legacy DuckDB callback API contracts

#216
Closed chris opened this 10 days ago ·
10 days ago

Context

The sequential Bun corpus frontier is js/third_party/duckdb/duckdb-basic-usage.test.ts at position 3958/4708, following completed Comlink work in #215 and the modern @duckdb/node-api port in #209. This contributes to #66.

Current gap

The copied test reaches the deprecated duckdb CommonJS package on supported ABI/platform combinations, but require("duckdb") is not represented. It constructs an in-memory database and uses the callback-style all API.

Acceptance criteria

  • CommonJS duckdb resolution exposes Database.
  • Database accepts :memory: and preserves connection lifecycle state.
  • all executes the copied SELECT projection and invokes its callback asynchronously.
  • Success returns null error and numeric row data; SQL errors preserve useful query/stack context.
  • The copied test passes and is pinned in the permanent third-party gate.
10 days ago

Completed on main in ec76d84.

The legacy duckdb CommonJS module now exposes Database with explicit filename/open-state handling, asynchronous callback delivery, numeric SELECT projection rows, close lifecycle behavior, and query plus source-stack context on failures. The copied test passes 1/1 and is pinned alongside the modern @duckdb/node-api suite.

Verification: focused position 3958 reports files=1, passed=1, failed=0, todo=0, unsupported=0, allowed-empty=0; all permanent gates pass.

Sign in to comment on this issue.