Skip to content

Add bulk keyword reads with capability detection, and test both transports - #31

Merged
mikelangmayr merged 1 commit into
mainfrom
mike/keygrabber-transport-parametrized-tests
Sep 16, 2026
Merged

mikelangmayr merged 1 commit into
mainfrom
mike/keygrabber-transport-parametrized-tests

Conversation

@mikelangmayr

Copy link
Copy Markdown
Collaborator
  • Add keys.read, a third auto-registered meta-service that reads many keywords in one request; per-keyword failures ride inside values so one broken getter costs only itself, and pattern selection skips write-only keywords
  • Report a services field from keys.list, derived from the keys this peer actually serves minus its registered keywords, so a caller can tell "no keys.read here" from "no answer"; peers on an older libby omit it, which is the negative signal
  • knows_key cannot answer that question: it reads the discovery registry, which stays empty because Libby.rabbitmq hardcodes discover=False, and probing by calling keys.read is indistinguishable from a timeout since an unknown key is dropped without an ACK
  • Add Client.listing, list, describe and read. list returns qualified names that feed straight back into get/show/read; listing returns names and services from the one response; read issues one request per peer, never raises for a failed read, and chunks long name lists
  • Switch the CLI's list and describe onto Client, replacing its private _rpc_keys_* helpers. show <pattern> deliberately keeps one show per match, so the CLI still works against daemons on a libby without keys.read
  • Parametrize tests/test_client_integration.py over ZMQ and RabbitMQ via shared base cases; the ZMQ cases need no external service and always run, the RabbitMQ ones keep their broker skip
  • Drop the sleep(2.0)/sleep(1.5) warm-ups: both transports already block in start() until reachable, and test_first_read_needs_no_warmup now asserts that per transport so a barrier regression fails loudly instead of going flaky
  • Add a Tests workflow, since CI built docs and never ran the suite. No broker service container, so the ZMQ cases are what guard the wire
  • Document keys.read, the services field and the new Client methods in docs/source/keywords.md and docs/source/client.md
  • Verified against a daemon running a pre-keys.read libby: services comes back empty and the per-keyword fallback reads correctly. 71 tests pass, pylint 10.00/10 on the new modules

@mikelangmayr
mikelangmayr force-pushed the mike/keygrabber-transport-parametrized-tests branch from 1e019e2 to c4055c3 Compare September 16, 2026 00:32
@mikelangmayr
mikelangmayr merged commit e57c8c9 into main Sep 16, 2026
3 checks passed
@mikelangmayr
mikelangmayr deleted the mike/keygrabber-transport-parametrized-tests branch September 16, 2026 18:43
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.

2 participants