test: two gaps in the connector's routed-transport check after #148

Open Beginner friendly
#151 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
django, python

Research direction

Read _takes_connect_by in src/neolith/_connector.py and test_each_entry_reads_with_its_own_receiver in tests/test_routing.py. Add coverage for keyword-only connect_by with and without a default, and for an in-process receiver returning duplicate n keys. Done when the routed signature is accepted, the missing-default signature is refused, and the in-process result is asserted as Answer(n=2).

Written by the indexing model from the issue text.

Description

help wanted

Two non-blocking findings from the review of #148, held back because the PR was approved:

  • _takes_connect_by (src/neolith/_connector.py) admits a call whose connect_by has no default, such as def call(self, action, request, context, *, connect_by). The connector leaves connect_by out when no share applies (the last entry, a non-idempotent action, no deadline), so such a call ends internal. Fix: require found.default is not inspect.Parameter.empty. Test a keyword-only connect_by=None, which is routed, and a keyword-only connect_by with no default, which is refused.
  • test_each_entry_reads_with_its_own_receiver (tests/test_routing.py) asserts only the remote half. Add a first entry with Receiver.IN_PROCESS that returns {"n":1,"n":2} and assert Answer(n=2).

Part of #13.

Dominant language
Python
Stars
1
Forks
0
Avg merge
6h 34m
Merged PRs (30d)
108

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stack314/django-neolith

All issues in stack314/django-neolith

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.