Skip to content

ci: SQL E2E over all three VGI transports (subprocess + http + unix)#1

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

ci: SQL E2E over all three VGI transports (subprocess + http + unix)#1
rustyconover merged 1 commit into
mainfrom
ci/multi-transport-sql

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Adds subprocess + http + unix VGI transport coverage to the SQL E2E suite, with the full test/sql/*.test suite GREEN over all three transports in CI.

What changed

  • ci/run-integration.sh parameterized by TRANSPORT (default subprocess). The in-process mock provider server is started once, out of band (python -m tests.mock_server, now prints URL:<base> and blocks), and its VGI_SCHOLAR_*_BASE_URL vars are exported so the worker reads them over every transport. For http/unix the script boots the worker itself and discovers the endpoint (http: --http --port 0 --port-file; unix: --unix <sock>). A single cleanup() (capturing $? first) kills both the mock server and the worker.
  • .github/workflows/ci.yml — the integration job is now a transport: [subprocess, http, unix] × os: [ubuntu, macos] matrix (6 legs). Test + lint jobs unchanged.
  • http leg injects INSTALL httpfs FROM core; LOAD httpfs; (the vgi HTTP transport runs on DuckDB's httpfs), adds the http extra (waitress) to pyproject.toml + the PEP 723 header, syncs --extra http, and enforces a silent-skip guard (fail unless All tests passed (N>0) and zero skips — the runner auto-SKIPs HTTP/Unable to connect errors → a fake green).
  • tests/mock_server.py gains a main() / __main__ entry that advertises its URL and blocks.

Streaming over HTTP — no worker fix needed

scholar_search's per-scan cursor is already externalized in _ScanState(ArrowSerializableDataclass), which the framework round-trips through its continuation token across ticks/requests, so the paging round-trip runs unchanged over HTTP.

Local status

  • subprocess: GREEN — 33 assertions
  • unix: GREEN — 33 assertions
  • http: GREEN — 35 assertions (33 + the injected httpfs INSTALL/LOAD)

🤖 Generated with Claude Code

… http + unix)

Parameterize ci/run-integration.sh by a TRANSPORT env (subprocess|http|unix)
and run the SAME test/sql/*.test suite over each, in CI as a
transport × os matrix (3 transports × {ubuntu, macos}).

The in-process mock provider server (tests/mock_server.py) is started ONCE,
out of band (via `python -m tests.mock_server`, which now prints URL:<base>
and blocks), and its VGI_SCHOLAR_*_BASE_URL vars are exported so the worker
reads them over every transport — stdio, HTTP, or AF_UNIX. For http/unix the
script boots the worker itself (cwd = repo) and discovers the endpoint:
http via `--http --port 0 --port-file <f>` (poll the file), unix via
`--unix <sock>` (poll for the socket). A single cleanup() (capturing $? first)
kills both the mock server and the worker.

http leg specifics (resolved, not gated):
- inject `INSTALL httpfs FROM core; LOAD httpfs;` after each `LOAD vgi;`
  (the vgi HTTP transport runs on DuckDB's httpfs);
- the http extra (waitress): add `http = ["vgi-python[http]>=0.8.3"]` to
  pyproject and bump scholar_worker.py's PEP 723 dep to vgi-python[http];
  CI syncs `--extra http`.
- SILENT-SKIP GUARD: fail the leg unless the runner reports
  `All tests passed (N>0 assertions)` and zero skips (the runner auto-SKIPs
  any "HTTP"/"Unable to connect" error → a fake green).

scholar_search paging already works over HTTP unchanged: its per-scan cursor
is externalized in _ScanState(ArrowSerializableDataclass), which the framework
round-trips through its continuation token across ticks/requests. No worker fix
was needed.

Status: subprocess=GREEN (33 assertions), unix=GREEN (33), http=GREEN
(35 = 33 + the injected httpfs INSTALL/LOAD).

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