Skip to content

Decision record: Hypothesis pilot is deterministic and a dev dependency only #443

Open

Description

@claude

Decision

Hypothesis is added as a dev dependency (it was absent) and used for a small pilot of property-based tests of credential redaction, run deterministically with derandomize=True and database=None. The pilot is stacked on #430 and #431.

Context

camunda/sdk-infra#87 asks for a property-based testing pilot; the cross-SDK record is camunda/sdk-infra#102. Implemented by PR #438. The Python SDK was chosen for the pilot there; this record covers the repo-specific choices.

Why this default

Redaction is an invariant over arbitrary strings, which example tests cannot enumerate. derandomize=True makes every run of a revision use the same examples, so the tests can never fail intermittently, as the repo's no-flaky-tests rule requires; the example database is disabled so no state is carried between runs. Hypothesis was added with uv add --dev, so uv.lock changes additively and Renovate keeps it current like other dev dependencies.

Alternatives not taken

  • Non-derandomized runs with a fixed seed: equivalent determinism, but derandomize is the documented switch and needs no seed to maintain.
  • Property tests for token refresh timing and response deserialization: valid next steps for the pilot, left out to keep this PR small.

How to revert/change

Revert PR #438, or remove hypothesis from the dev group in pyproject.toml, re-lock with uv lock, and delete tests/acceptance/test_secret_redaction_properties.py.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RcVhnekJQeXnMfPhs9pYda

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions