Skip to content

at_most_once raises in simple usage #6

@rileysdev

Description

@rileysdev

We have a test for at_most_once which passes without raising. When I created the simplest at_most_once example I could think of in a tool call, I got this stack trace thought the test still passes:

Traceback (most recent call last):
  File "/workspaces/durable-mcp-python/reboot/mcp/server.py", line 946, in wrapper
    return await fn(**dict(bound.arguments))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/durable-mcp-python/tests/test_at_most_once_simple.py", line 38, in add
    result = await at_most_once(
             ^^^^^^^^^^^^^^^^^^^
  File "/workspaces/durable-mcp-python/.venv/lib/python3.12/site-packages/rebootdev/aio/workflows.py", line 109, in at_most_once
    return await memoize(
           ^^^^^^^^^^^^^^
  File "/workspaces/durable-mcp-python/.venv/lib/python3.12/site-packages/rebootdev/aio/memoize.py", line 109, in memoize
    raise AtMostOnceFailedBeforeCompleting(
rebootdev.aio.workflows.AtMostOnceFailedBeforeCompleting: ... it looks like an external failure occurred (e.g., the machine failed, your container was rescheduled, etc) while your code was executing

Here is a branch with a simple at_most_once test that exhibits the same behavior: https://github.com/reboot-dev/durable-mcp-python/tree/riley/at_most_once_simple_test

File: https://github.com/reboot-dev/durable-mcp-python/blob/riley/at_most_once_simple_test/tests/test_at_most_once_simple.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions