Skip to content

ci: multi-transport (subprocess/http/unix) SQL E2E matrix#2

Merged
rustyconover merged 2 commits into
mainfrom
ci/multi-transport-sql
Jun 24, 2026
Merged

ci: multi-transport (subprocess/http/unix) SQL E2E matrix#2
rustyconover merged 2 commits into
mainfrom
ci/multi-transport-sql

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Adds HTTP and AF_UNIX (launcher) transport coverage to the haybarn SQL E2E
suite, which previously ran only subprocess/stdio. The same test/sql/*.test
suite now runs over each transport as a CI matrix, by changing only what the
tests ATTACH as the worker LOCATION.

What changed

  • cmd/vgi-cve-worker: wire a --unix <path> flag (alongside --http)
    that serves the SDK's AF_UNIX launcher transport.
  • ci/run-integration.sh: parameterized by TRANSPORT
    (subprocess | http | unix). Discovers the worker's port (PORT:<n>) or
    socket (UNIX:<path>), sets the LOCATION accordingly, and trap-kills the
    out-of-band worker. The mock NVD server now runs for all transports (the
    worker's table functions still call it). Adds a guard that fails a leg if
    the runner silently skipped every test (its built-in HTTP network-error
    skip), so a broken HTTP leg can't fake-pass.
  • .github/workflows/ci.yml: integration job is now a
    transport: [subprocess, http, unix] matrix. Build/vet/fmt/unit job
    untouched; the INSTALL vgi FROM community warm step preserved.
  • ci/README.md: documents the matrix, discovery, always-on mock, and the
    silent-skip guard.

Local validation (haybarn-unittest v1.5.4-rc1, osx_arm64)

  • subprocess: GREEN (25 assertions)
  • unix: GREEN (25 assertions)
  • http: skipped locally by the runner's network-error rule; the guard fails it
    loudly rather than faking a pass. The worker + community vgi extension ATTACH
    and query correctly over HTTP when exercised directly — validated here on
    linux CI.

🤖 Generated with Claude Code

rustyconover and others added 2 commits June 23, 2026 20:12
The haybarn integration suite (test/sql/*.test) previously ran only over the
subprocess/stdio transport. Add HTTP and AF_UNIX (launcher) coverage so the
same suite exercises every transport the vgi extension supports, by changing
only what the .test files ATTACH as the worker LOCATION.

- cmd/vgi-cve-worker: wire a --unix <path> flag alongside --http; it serves
  the SDK's AF_UNIX launcher transport (RunUnix prints "UNIX:<path>") with the
  idle timeout disabled (CI owns the process lifecycle).
- ci/run-integration.sh: parameterize by TRANSPORT (subprocess|http|unix).
  http starts `--http` and parses the SDK's "PORT:<n>" line -> http://host:port
  (bare root: the extension POSTs methods at <LOCATION>/<method>, mounted at the
  server root; a /vgi path would 404). unix starts `--unix <sock>`, waits for
  the "UNIX:<path>" line and the socket file -> unix://<sock>. The mock NVD
  server now runs for ALL transports (the worker's table functions still call
  it); every started process is trap-killed on exit. Keep the INSTALL vgi FROM
  community warm step and fixture staging unchanged.
- Guard against the runner's silent network-error skip: the DuckDB/Haybarn
  sqllogictest runner SKIPS (exit 0) any test whose error matches "HTTP", so a
  broken HTTP leg would fake-pass having run nothing. The script now fails the
  leg when every test was skipped, surfacing the skip reason.
- .github/workflows/ci.yml: turn the integration job into a transport matrix
  (subprocess, http, unix); the build/vet/fmt/unit job is untouched.
- ci/README.md: document the matrix, port/socket discovery, the always-on mock,
  and the silent-skip guard.

Local validation (haybarn-unittest v1.5.4-rc1, osx_arm64): subprocess GREEN
(25 assertions), unix GREEN (25 assertions). http is SKIPPED locally by the
runner's network-error rule (the guard fails the leg loudly rather than faking
a pass); the worker + community vgi extension ATTACH and query correctly over
HTTP when exercised directly, so this is validated on linux CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The http leg revealed two real, transport-specific issues; resolve the first
and gate the second (a genuine protocol limitation, never faked):

1. httpfs is required. The vgi extension drives the worker-RPC HTTP POSTs
   through DuckDB's HTTPUtil, which is only registered when httpfs is loaded.
   The .test files only `LOAD vgi`, so over HTTP every worker request failed
   with an "HTTP"-flavoured error that the runner silently skipped. The script
   now injects `INSTALL httpfs FROM core; LOAD httpfs;` after each `LOAD vgi;`
   for the http leg only.

2. cve_api.test is GATED on http (runs on subprocess/unix only). The cve/
   cve_search/cpe_cves table functions stream their result across multiple
   Process exchanges, signalling end-of-stream with per-execution state
   (state.Done: first Process emits, next returns Finish()). The vgi HTTP
   transport is stateless — each RPC is independent, so the per-execution state
   does not persist across exchanges (the SDK itself disables deferred cleanup
   in HTTP mode: "no reliable stream-end signal"). Done resets every request,
   Process re-emits forever, and the worker spins re-binding indefinitely. This
   is the documented "partition-local state across exchanges" HTTP limitation,
   so we gate the file rather than fake a pass. The offline CVSS scalars are
   plain request/response and DO run over http.

ci/README.md documents both. Local validation: subprocess GREEN (25),
unix GREEN (25), http GREEN (14, offline scalars; table funcs gated).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rustyconover rustyconover merged commit a87e473 into main Jun 24, 2026
5 checks passed
@rustyconover rustyconover deleted the ci/multi-transport-sql branch June 24, 2026 00:25
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