Skip to content

Commit 783fda8

Browse files
committed
Set successor protocol identity to vgi.v3 / 3.0.0
1 parent 67bb5b4 commit 783fda8

21 files changed

Lines changed: 70 additions & 59 deletions

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
path: vgi/build/reports/tests/test
6464

6565
# vgi-rpc's hosted-protocols group against the example worker on stdio, unix
66-
# and HTTP: conformance.Secondary.v1 hosted beside vgi.v2 through
66+
# and HTTP: conformance.Secondary.v1 hosted beside vgi.v3 through
6767
# Worker.hostedProtocols, the error model, the traceback policy, and over HTTP
6868
# the vgi_rpc.Identity.v2 conformance policy (--identity).
6969
#

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pin, then release `:vgi`.
237237
`vgi/src/main/java/farm/query/vgi/VgiService.java` is emitted from
238238
vgi-python's `VgiProtocol` by `vgi.codegen.java_registry`
239239
(`uv run --project ../vgi-python python scripts/regen_generated.py`). It
240-
declares every `vgi.v2` method with the reference's exact signature —
240+
declares every `vgi.v3` method with the reference's exact signature —
241241
vgi-rpc-java derives the wire schemas from it, so it *is* the
242242
registration — each with a `default` body throwing
243243
`MethodNotImplementedError` (UNIMPLEMENTED). Every method takes a trailing

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ VGI lets [Haybarn](https://github.com/Query-farm-haybarn/haybarn) — Query Farm
1919

2020
Wire-compatible with the [Python reference implementation](https://github.com/Query-farm/vgi-python) and the [Go port](https://github.com/Query-farm/vgi-go): all three serve the same integration suite against the same C++ extension.
2121

22-
Version 0.43.0 uses VGI wire 2.2.0 under `vgi.v2` and requires a native VGI client speaking wire 2.2.x. Upgrade clients and workers together; wire 2.1 clients are incompatible. See [catalog metadata and publication](docs/catalog_publication.md).
22+
The prepared protocol uses VGI wire 3.0.0 under `vgi.v3` and requires a native VGI client speaking wire 3.0.x. Upgrade clients and workers together; published `vgi.v2` clients are incompatible. See [catalog metadata and publication](docs/catalog_publication.md).
2323

2424
## What you can serve
2525

@@ -147,7 +147,7 @@ The `launch:` location scheme starts the worker once behind a flock-coordinated
147147

148148
For authenticated `iroh://` and HTTP-semantics `httpi://` deployments, see
149149
[Iroh workers and clients](docs/iroh.md). To serve other vgi-rpc protocols
150-
beside `vgi.v2`, or to answer token introspection for a reverse proxy, see
150+
beside `vgi.v3`, or to answer token introspection for a reverse proxy, see
151151
[Hosting extra protocols, and token introspection](docs/hosted-protocols.md).
152152
To let a runner reattach a user's catalog later with only that user's grant and
153153
a sealed ticket (`vgi.attach_tickets.v1`), see [Attach tickets](docs/attach-tickets.md).

‎ci/run-hosted-protocols.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Run vgi-rpc's hosted-protocols conformance group against the example worker on
55
# stdio, AF_UNIX and HTTP (with --identity). The group checks that the worker
6-
# hosts `conformance.Secondary.v1` beside `vgi.v2` through Worker.hostedProtocols,
6+
# hosts `conformance.Secondary.v1` beside `vgi.v3` through Worker.hostedProtocols,
77
# the vgi-rpc error model, the traceback policy, and -- over HTTP -- the
88
# vgi_rpc.Identity.v2 conformance policy.
99
#
@@ -15,7 +15,7 @@ set -euo pipefail
1515

1616
: "${VGI_WORKER_BIN:?path to the example worker launcher}"
1717
read -r -a HOSTED <<<"${HOSTED:-vgi-rpc-test-hosted}"
18-
EXPECT="vgi.v2,conformance.Secondary.v1"
18+
EXPECT="vgi.v3,conformance.Secondary.v1"
1919
PIDS=()
2020
cleanup() { for p in "${PIDS[@]:-}"; do [ -n "$p" ] && kill "$p" 2>/dev/null || true; done; }
2121
trap cleanup EXIT

‎docs/catalog_publication.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ The manager exposes startup warming, trusted manifest import, and conditional in
1717

1818
Java: call `Worker.catalogSnapshot(policy)`. Use `policy.manager.warm`, `importPublication`, and `invalidate`. This implementation requires `farm.query:vgirpc:0.33.1`, including its collection row codec and idempotent IPC stream termination.
1919

20-
Version 0.43.0 requires native clients and workers on wire 2.2.x; wire 2.1 is incompatible. The protocol route remains `vgi.v2`. CI and release builds resolve RPC 0.33.1 from Maven Central.
20+
The prepared protocol requires native clients and workers on wire 3.0.x under `vgi.v3`; published `vgi.v2` peers are incompatible. CI and release builds resolve RPC 0.33.1 from Maven Central.

‎docs/hosted-protocols.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hosting extra protocols, and token introspection
22

3-
A VGI worker speaks `vgi.v2`, the protocol the DuckDB/Haybarn extension calls.
3+
A VGI worker speaks `vgi.v3`, the protocol the DuckDB/Haybarn extension calls.
44
It can also serve other [vgi-rpc](https://github.com/Query-farm/vgi-rpc-java)
55
protocols from the same process, on the same listener, and it can answer
66
`vgi_rpc.Identity.v2` so a reverse proxy can resolve credentials.
@@ -25,7 +25,7 @@ worker.runFromArgs(args);
2525

2626
- **Every transport.** The hook's result is hosted on stdin/stdout, AF_UNIX,
2727
TCP, the Iroh raw upstream and HTTP. Reflection's `list_protocols` reports
28-
`vgi.v2` first, then these, in the order returned.
28+
`vgi.v3` first, then these, in the order returned.
2929
- **Called once per server.** Each `run*` entry point (and `rpcServer()`)
3030
builds one server and calls the hook once while doing so. The hook may read
3131
configuration or the environment, but what it returns is fixed for the life
@@ -34,12 +34,12 @@ worker.runFromArgs(args);
3434
protocol's methods. If a capability is optional, make it its own protocol and
3535
return it or not.
3636
- **Names.** Each protocol needs its own `@ProtocolName`. A name may not
37-
repeat, may not be `vgi.v2`, and may not use the reserved `vgi_rpc.` prefix.
37+
repeat, may not be `vgi.v3`, and may not use the reserved `vgi_rpc.` prefix.
3838
Reflection is always hosted, and Identity is turned on by the hooks below.
3939
Any violation stops the worker at startup with an error that names
4040
`Worker.hostedProtocols`.
41-
- **`vgi.v2` is unaffected.** Requests are routed on their `vgi_rpc.protocol`
42-
key with no fallback to the primary. A client that only names `vgi.v2` (the
41+
- **`vgi.v3` is unaffected.** Requests are routed on their `vgi_rpc.protocol`
42+
key with no fallback to the primary. A client that only names `vgi.v3` (the
4343
extension) dispatches exactly as it would against a single-protocol worker.
4444

4545
Errors from an extra protocol use vgi-rpc's error model. To pick the code, the

‎vgi-example-worker/src/main/java/farm/query/vgi/example/Main.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,9 @@ public static Worker buildWorker(String catalogName, String implVer, String data
401401
}
402402
registerViews(w);
403403
registerCatalogTables(w);
404-
// conformance.Secondary.v1, hosted beside vgi.v2 on every transport through the hosting
405-
// hook -- additive: vgi.v2 requests route exactly as before. Checked by vgi-rpc's
406-
// hosted-protocols group (`vgi-rpc-test-hosted --expect vgi.v2,conformance.Secondary.v1`).
404+
// conformance.Secondary.v1, hosted beside vgi.v3 on every transport through the hosting
405+
// hook -- additive: vgi.v3 requests route exactly as before. Checked by vgi-rpc's
406+
// hosted-protocols group (`vgi-rpc-test-hosted --expect vgi.v3,conformance.Secondary.v1`).
407407
w.hostedProtocols(() -> List.of(farm.query.vgi.HostedProtocol.of(
408408
farm.query.vgi.example.conformance.Secondary.class,
409409
new farm.query.vgi.example.conformance.SecondaryImpl())));

‎vgi-example-worker/src/main/java/farm/query/vgi/example/conformance/Secondary.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/**
88
* {@code conformance.Secondary.v1} -- the vgi-rpc fixture protocol every SDK fixture worker hosts
9-
* beside {@code vgi.v2}, through {@code Worker.hostedProtocols}. Copied from the port's
9+
* beside {@code vgi.v3}, through {@code Worker.hostedProtocols}. Copied from the port's
1010
* conformance module (MULTI_PROTOCOL_HOSTING.md §7 allows either), so the example worker does not
1111
* depend on an unpublished artifact.
1212
*
@@ -18,7 +18,7 @@
1818
* the vgi-rpc conformance service's {@code echo_string}; its reply is prefixed, so a mis-route is a wrong
1919
* value rather than a coincidentally right one.</li>
2020
* <li><b>A per-binding version gate.</b> No {@code @ProtocolVersion} on purpose, while the
21-
* primary ({@code vgi.v2}) declares one: a server that gates every call against the primary's
21+
* primary ({@code vgi.v3}) declares one: a server that gates every call against the primary's
2222
* version refuses this protocol's calls.</li>
2323
* <li><b>The error model.</b> {@code fail} raises whatever code and kind the caller names, with
2424
* fixed details; {@code fail_oversized} raises details over the 4 KiB cap.</li>

‎vgi/src/main/java/farm/query/vgi/AttachTicketsService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* {@code vgi.attach_tickets.v1}: sealing a user's ATTACH so a runner holding their grant can
1313
* replay it later ({@code docs/protocol/vgi-attach-tickets.md}).
1414
*
15-
* <p>The framework hosts it beside {@code vgi.v2}, on HTTP only, and only when the worker's
15+
* <p>The framework hosts it beside {@code vgi.v3}, on HTTP only, and only when the worker's
1616
* signing key is configured explicitly and the worker can issue grants; see
1717
* {@link Worker#signingKey(byte[])}. Absent otherwise, so a client learns the answer from
1818
* reflection.

‎vgi/src/main/java/farm/query/vgi/HostedProtocol.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import java.util.Objects;
66

77
/**
8-
* One additional vgi-rpc application protocol a worker hosts beside {@code vgi.v2}: the
8+
* One additional vgi-rpc application protocol a worker hosts beside {@code vgi.v3}: the
99
* protocol's service interface and the object its calls are dispatched to.
1010
*
1111
* <p>Returned by the hook a worker installs with {@link Worker#hostedProtocols}. The interface
1212
* names the protocol with {@code @ProtocolName} (and optionally versions it with
13-
* {@code @ProtocolVersion}); its routing key must be distinct from {@code vgi.v2} and from every
13+
* {@code @ProtocolVersion}); its routing key must be distinct from {@code vgi.v3} and from every
1414
* other hosted protocol, and may not use the reserved {@code vgi_rpc.} prefix.
1515
*
1616
* @param protocol the protocol's service interface

0 commit comments

Comments
 (0)