Skip to content

ci: multi-transport SQL suite (subprocess + http + unix)#1

Merged
rustyconover merged 1 commit into
mainfrom
multi-transport
Jun 24, 2026
Merged

ci: multi-transport SQL suite (subprocess + http + unix)#1
rustyconover merged 1 commit into
mainfrom
multi-transport

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Run the test/sql/*.test suite over all three VGI transports the vgi extension supports (subprocess/stdio, HTTP, AF_UNIX), selected by the ATTACH LOCATION string.

What changed

  • ci/run-integration.sh parameterized by TRANSPORT (subprocess|http|unix, default subprocess); boots the worker out-of-band for http (--http --port 0 --port-file) and unix (--unix <sock>) with cwd = the stage dir so the staged test/sql/data/*.docx fixtures resolve. Injects INSTALL httpfs FROM core; LOAD httpfs; on the http leg only (the HTTP transport rides DuckDB's httpfs). Adds the silent-skip guard (fails on "All tests were skipped") and an exit-code-preserving cleanup trap.
  • CI integration job is now a transport: [subprocess, http, unix] × os: [ubuntu, macos] matrix; installs the http extra via uv sync --extra dev --extra http.
  • pyproject.toml gains an http extra (vgi-python[http] → waitress); docgen_worker.py PEP 723 header uses vgi-python[http]; uv.lock relocked.

The buffering docgen_merge function is HTTP-safe as-is (single-row BLOB output, DrainState already an ArrowSerializableDataclass) — no streaming-state change needed. All three transports verified green locally with haybarn-unittest.

🤖 Generated with Claude Code

Parameterize ci/run-integration.sh by a TRANSPORT env var
(subprocess|http|unix, default subprocess) and turn the CI integration job
into a transport × os matrix, so the same test/sql/*.test suite exercises all
three VGI transports the vgi extension supports (selected by the ATTACH
LOCATION string).

- http: boot `vgi-docgen --http --port 0 --port-file <f>` with cwd = the stage
  dir (resolves the staged test/sql/data/*.docx fixtures), poll the port-file,
  ATTACH at the bare `http://127.0.0.1:<port>`. Inject
  `INSTALL httpfs FROM core; LOAD httpfs;` after each `LOAD vgi;` on the http
  leg only (the HTTP transport rides DuckDB's httpfs). Add a `http` extra
  (`vgi-python[http]` -> waitress) and install it in the integration job via
  `uv sync --extra dev --extra http`.
- unix: boot `vgi-docgen --unix <sock>` (cwd = stage dir), poll for the socket,
  ATTACH at `unix://<sock>`.
- Silent-skip guard: the sqllogictest runner SKIPS (exit 0) any test whose
  error contains "HTTP"/"Unable to connect", so a broken http leg would fake a
  green. The run step captures the report and fails on "All tests were skipped".
- Cleanup trap captures `$?` first and returns it, so an empty-var check can't
  clobber a passing exit code.

The buffering docgen_merge function (TableBufferingFunction, DrainState already
an ArrowSerializableDataclass, single-row BLOB output) is HTTP-safe as-is — no
streaming-state change needed. All three transports verified green locally with
haybarn-unittest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rustyconover rustyconover merged commit dee3048 into main Jun 24, 2026
10 checks passed
@rustyconover rustyconover deleted the multi-transport branch June 24, 2026 01:45
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.

1 participant