fix: repair fibp transport integration — protocol bugs across 8 sites
Merged
VI
8mo ago+163+163+012345678901234567890123456789-164-164-012345678901234567890123456789
Summary
- conftest: Fix TLS config field names (
cert_file/key_file/ca_file) and movebootstrap_apikeyto[auth]section (was misplaced in[fibp]) - conftest: Replace gRPC-based
create_queuewith FIBPOP_CREATE_QUEUE— gRPC was removed from fila-server; FIBP is now the sole transport - fibp: Fix consume stream registration — push frames arrive with
corr_id=0, not the original corr_id; register consume queue under both - fibp: Fix consume ack handling — server sends
OP_CONSUME+ empty body as initial ack; was incorrectly treated as stream-closed signal - fibp: Replace
decode_consume_messagewithdecode_consume_pushthat reads thecount:u16batch prefix the server actually sends - fibp: Fix
encode_authto send raw UTF-8 bytes (server expects nou16-length prefix that_encode_strwas adding) - fibp: Fix
decode_error_frameto parse raw UTF-8 (server sends plain text, notu16 code + u16-prefixed message) - batcher: Use
_map_fibp_errorfor transport-level FIBP errors so auth rejection raisesTransportError, notEnqueueError - test_batcher: Update transport failure assertion to expect
TransportError(was incorrectly expectingEnqueueErrorfor a frame-level failure)
Test plan
- All 33 tests pass locally (
python -m pytest tests/ -v) - 2 TLS tests skip locally (missing
cryptographypackage) — they run in CI which installs all deps - CI integration tests pass with downloaded
fila-serverbinary
🤖 Generated with Claude Code
Summary by cubic
Fixes FIBP transport to match the server protocol so consume streaming, auth, and error handling work as expected. Also switches test admin ops from gRPC to FIBP to unblock CI.
-
Bug Fixes
- Consume: register the stream under both the request
corr_idand0; treat emptyOP_CONSUMEas the stream ack; decode batch pushes viadecode_consume_push. - Auth/errors:
encode_authsends raw UTF-8 bytes; error frames parsed as plain text; mapERR_AUTH_REQUIRED/ERR_PERMISSION_DENIEDtoTransportError. - Batcher: use
_map_fibp_errorso transport failures (e.g., auth reject) raiseTransportError; tests updated. - Lint: address
rufferrors (import order, line length, unused imports).
- Consume: register the stream under both the request
-
Migration
- Test/admin:
fila-serverremoved gRPC; fixtures now create queues via FIBPOP_CREATE_QUEUE. - TLS fixture config: rename
[tls]keys tocert_file/key_file/ca_file; movebootstrap_apikeyto[auth].
- Test/admin: