Skip to content

pyamber's worker-to-worker RPC proxy has no production callers #7793

Closed

Description

@aglinxinyuan

Describe the bug

AsyncRPCClient.get_worker_interface in amber/src/main/python/core/architecture/rpc/async_rpc_client.py has no production callers, and it is the sole route into a whole helper that exists only to serve it.

Evidence (repo-wide, excluding target/, .git/, node_modules/, and the generated src/main/python/proto/):

grep -rn "get_worker_interface" .
→ async_rpc_client.py (definition)
→ test_async_rpc_client.py x3   (the only call sites)

grep -rn "WorkerServiceStub" .
→ async_rpc_client.py only — the import, the return annotation, one argument. No .scala hit.

grep -rn "_create_proxy" .
→ its definition, and one call inside get_worker_interface — its sole caller

Python workers talk only to the coordinator: the one production construction of the Python AsyncRPCClient is main_loop.py:114, and it uses coordinator_stub() (lines 271, 651, 671, 817) and receive (line 475). There is no getattr-style dynamic access anywhere. Worker-to-worker RPC initiated from Python is unused.

Note Scala's workerInterface (AsyncRPCClient.scala:140, WorkerServiceFs2Grpc) is a separate class and is unrelated to this Python method.

The three tests that reference it — test_stream_unary_blocked, test_unary_stream_blocked, test_stream_stream_blocked — each begin by calling get_worker_interface and then assert on blockers that live only inside _create_proxy's local Proxy class. They exist solely to exercise this method. The coordinator path goes through _assign_context, never had those blockers, and has its own tests.

How to reproduce?

Run the greps above.

Version/Branch

main

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Activity

  1. added theissue type on Aug 19, 2026
  2. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    👋 Thanks for opening this issue, @aglinxinyuan!

    It looks like the issue description doesn't quite follow our template yet:

    • The What happened? section is missing; please keep the template's headings.

    Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.

    You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.

  3. added a commit that references this issue on Sep 2, 2026
    464aa8c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions