Skip to content

Commit 37d7555

Browse files
rustyconoverclaude
andcommitted
docs: catch up to response-cap rework and fix broken links
- Fix two pre-existing broken links that were failing Docs CI (access-log-spec.md → log-shipping/README.md; log-shipping README → GitHub URL for the JSON schema). - Add orphan pages WIRE_PROTOCOL.md and porting-guide.md to the Guides nav so mkdocs --strict stops failing on them. - Update hosting.md to document max_response_bytes and the new max_externalized_response_bytes knob. - Rewrite the WIRE_PROTOCOL.md continuation-batch section for the soft/hard cap semantics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ab52ab8 commit 37d7555

5 files changed

Lines changed: 16 additions & 8 deletions

File tree

docs/WIRE_PROTOCOL.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,15 @@ Response body:
576576
[IPC stream: output_schema, (log* + data)*, EOS]
577577
```
578578

579-
All produced data batches are included inline. If the response would exceed
580-
`max_stream_response_bytes`, the server truncates the output and appends a
581-
**continuation batch**: a zero-row batch with `vgi_rpc.stream_state#b64` in its
582-
custom metadata. The client then follows up with `/exchange` requests.
579+
All produced data batches are included inline. If the response body would
580+
exceed `max_response_bytes` (the operator-configured HTTP body cap), the
581+
server stops producing and appends a **continuation batch**: a zero-row
582+
batch with `vgi_rpc.stream_state#b64` in its custom metadata. The client
583+
then follows up with `/exchange` requests carrying that token. For
584+
producer streams the wire cap is *soft* — continuation tokens cover the
585+
overshoot. The companion cap `max_externalized_response_bytes` governs
586+
external-channel uploads independently and is *hard*: a producer that
587+
would exceed it surfaces an `RpcError` rather than continuing.
583588

584589
#### Exchange stream init response
585590

docs/access-log-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,4 @@ The exit code is `0` if every record passes, `1` if any record fails, `2` if the
168168
- Python JSON formatter: `vgi_rpc/logging_utils.py` (`VgiJsonFormatter`)
169169
- Python validator: `vgi_rpc/access_log_conformance.py`
170170
- Cross-language conformance overview: [`cross-language-conformance.md`](cross-language-conformance.md)
171-
- Reference shipper configs (Vector and Fluent Bit, S3/GCS/Azure): [`log-shipping/`](log-shipping/)
171+
- Reference shipper configs (Vector and Fluent Bit, S3/GCS/Azure): [`log-shipping/`](log-shipping/README.md)

docs/hosting.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ app = make_wsgi_app(
3838
| `signing_key` | HMAC-SHA256 key for stream state tokens | Random per-process (breaks multi-worker!) |
3939
| `prefix` | URL path prefix for RPC endpoints | `/vgi` |
4040
| `max_request_bytes` | Advertised request size limit | None (unlimited) |
41-
| `max_stream_response_bytes` | Split large producer stream responses | None (single response) |
41+
| `max_response_bytes` | HTTP body cap (every method). Soft for producer streams (continuation tokens); hard for unary + exchange (200 + EXCEPTION batch on overshoot) | None (unlimited) |
42+
| `max_externalized_response_bytes` | Cap on bytes uploaded to external storage per HTTP response. Always hard. Pre-flighted before the upload | None (unlimited) |
4243
| `max_upload_bytes` | Advertised upload size limit | None (unlimited) |
4344
| `authenticate` | Auth callback `(Request) → AuthContext` | None (anonymous) |
4445
| `cors_origins` | Enable CORS for browser clients | None (disabled) |
@@ -312,7 +313,7 @@ handler = make_lambda_handler(app)
312313
- Set `externalize_threshold_bytes` well below the payload limit (512 KB is a good starting point) to leave headroom for log batches and metadata
313314
- Use zstd compression — it reduces S3 storage and fetch time
314315
- Store the signing key in AWS Secrets Manager and cache it in the Lambda init phase
315-
- For producer streams, enable `max_stream_response_bytes` to split large streaming responses across multiple exchanges
316+
- For producer streams, set `max_response_bytes` to split large streaming responses across multiple HTTP turns; the server mints continuation tokens at the cap and the client transparently resumes
316317

317318
### Cloudflare Workers
318319

docs/log-shipping/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ vgi-rpc deliberately does **not** include an in-process uploader. Vector and Flu
3939

4040
## Validating downstream
4141

42-
The access-log JSON Schema at [`vgi_rpc/access_log.schema.json`](../../vgi_rpc/access_log.schema.json) is authoritative. Use it to validate records after they land in your bucket — for example, with `jsonschema-cli` or DuckDB's `read_json_auto` plus a CHECK constraint.
42+
The access-log JSON Schema at [`vgi_rpc/access_log.schema.json`](https://github.com/Query-farm/vgi-rpc-python/blob/main/vgi_rpc/access_log.schema.json) is authoritative. Use it to validate records after they land in your bucket — for example, with `jsonschema-cli` or DuckDB's `read_json_auto` plus a CHECK constraint.

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ nav:
134134
- Access Log: access-log.md
135135
- Access Log Specification: access-log-spec.md
136136
- Log Shipping: log-shipping/README.md
137+
- Wire Protocol: WIRE_PROTOCOL.md
137138
- Conformance Testing: cross-language-conformance.md
139+
- Cross-Language Porting Guide: porting-guide.md
138140
- About:
139141
- Benchmarks: benchmarks.md
140142
- Comparison: comparison.md

0 commit comments

Comments
 (0)