Skip to content

Materialize pytest-timeout for typed Python test timeouts #202

Description

@AntoineToussaint

Production evidence

Mind's canonical live mind-bench sessions run for small-py-fastapi-healthz__complete-typed-task__openai-standard sent the typed Python runtime request:

target=tests/test_app.py timeout=30s

The Codefly Python runner translated that into pytest --timeout=30, but the project does not declare the optional pytest-timeout plugin. The real runtime returned:

pytest: error: unrecognized arguments: --timeout=30
Tests: env-blocked (unknown)

Mind recovered by retrying the same target without a timeout, and the two tests passed. That recovery avoids a false task failure but discards the requested per-case bound, so it is not an acceptable steady state.

Generic owner behavior

The runtime contract explicitly defines TestRequest.timeout as a per-test timeout. The Python/pytest adapter owns the translation and should materialize the real pytest-timeout runner dependency in its isolated uv environment whenever the typed timeout is present. Projects must not need to add a Codefly implementation dependency to use the language-neutral runtime capability.

Acceptance

  • A real Python project that does not declare pytest-timeout can run a typed test request with timeout=30s.
  • The timeout remains a pytest per-case bound; it is not silently dropped or confused with the whole-run deadline.
  • Existing project provisioning, selectors, JUnit evidence, and checkout cleanliness remain intact.
  • The fix lives in the Codefly Python runner; Mind adds no pytest flag or workaround.

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