Skip to main content

determinism-claim-audit

Offline static CLI comparing a Python project's documented determinism promises with source patterns that may violate them. Python 3.9+, standard library only, no runtime dependencies. Target code is parsed, never imported or executed. No network access is used. Files named exactly .env are never opened, and symlinks are skipped.

Install with python3 -m pip install . in a prepared environment, then run:

determinism-claim-audit ./project
determinism-claim-audit ./project --json
determinism-claim-audit ./project --fail-on HIGH --verbose
python3 -m determinism_claim_audit --version

The path defaults to the current directory. Exit 0 means no finding meets the threshold, 2 means findings meet it, and 1 means an input or usage error. The default threshold is MEDIUM. --ignore RULE,... removes matching rules. JSON includes status, findings, and verified_claims; records contain only classification labels, paths, and line numbers, never source contents. Human findings use SEVERITY rule file:line evidence-kind doc-file:line. --verbose lists claims for which no evidence was found.

Root README/README.md names are case insensitive; docs/**/*.md is also read. Fenced code is excluded, and sentence-level negations suppress claims. Claims cover deterministic, reproducible, and same-output phrases. TIME, RANDOM, UUID, and ORDER evidence produces HIGH documented-deterministic-false findings. Evidence exclusively in tests or fixtures produces MEDIUM documented-deterministic-false-test-only findings. Examples are excluded. Silent docs produce no finding. Claims with no Python source produce HIGH findings, one per claim family. A fixed literal integer or string random.seed(...) suppresses RANDOM evidence in the same source file. Sorted set consumption and name-based UUID versions 3/5 do not count.

Limitations

Static pattern/AST matching is not semantic analysis: dead code and values that never reach output still count. Dynamic construction such as getattr(random, name) and eval of source strings is missed. Module aliases, re-exports, and data flow are not resolved. The seed guard is per-file and literal-only; cross-file seeding is missed. Any builtin-shaped hash() call counts, including deterministic integer hashes, as a deliberate over-approximation for the common str/bytes case. Shadowed builtin/module names can produce false positives. Thread, process, and asyncio scheduling are out of scope. Only direct set iteration is detected; sets assigned to variables are not tracked. Unparseable Python files produce input errors. A passing audit is not proof of deterministic behavior.

Neighbours

  • bandit and ruff check code issues rather than documented promises.
  • privacy-claim-audit checks network/telemetry evidence rather than determinism.
  • readonly-claim-audit checks filesystem writes rather than output stability.
  • security-claim-audit checks execution safety rather than determinism.
  • config-claim-audit checks defaults rather than run-to-run stability.
  • Property-based and snapshot tools such as hypothesis and pytest-regressions observe runtime behavior rather than statically auditing docs against code.

Development

PYTHONPATH=src python3 -m unittest discover -s tests -v
python3 -m build --no-isolation

The sdist includes the unittest suite and fixtures. MIT licensed.

Metadata

Release files for determinism-claim-audit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for determinism-claim-audit 0.1.0
File Interpreter ABI Platform Actions
determinism_claim_audit-0.1.0-py3-none-any.whl Python 3 none any Details for determinism_claim_audit-0.1.0-py3-none-any.whl

Release files / determinism_claim_audit-0.1.0-py3-none-any.whl

Download URL determinism_claim_audit-0.1.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
319384cbcb0bee242306917131f97d7efa4bce991902cddccbe9bca74cc2724f
BLAKE2b-256 checksum
How to use checksums
a3d4e9217d88496cdf1d1c415296c349220cc2c816c41523bd376b21817c4ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for determinism-claim-audit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page