pytest-gpu-proof 0.5.2__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/CHANGELOG.md +7 -0
  2. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/PKG-INFO +1 -1
  3. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/pyproject.toml +1 -1
  4. pytest_gpu_proof-0.5.3/src/pytest_gpu_proof/__init__.py +1 -0
  5. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/signers/ed25519.py +19 -5
  6. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_signing.py +35 -1
  7. pytest_gpu_proof-0.5.2/src/pytest_gpu_proof/__init__.py +0 -1
  8. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/.github/workflows/ci.yml +0 -0
  9. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/.github/workflows/docs.yml +0 -0
  10. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/.github/workflows/publish-testpypi.yml +0 -0
  11. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/.github/workflows/publish.yml +0 -0
  12. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/.gitignore +0 -0
  13. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/AGENTS.md +0 -0
  14. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/CLAUDE.md +0 -0
  15. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/CONTRIBUTING.md +0 -0
  16. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/LICENSE +0 -0
  17. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/README.md +0 -0
  18. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/RELEASING.md +0 -0
  19. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/ROADMAP.md +0 -0
  20. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/SECURITY.md +0 -0
  21. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/architecture.md +0 -0
  22. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/ci_gpu_mode.md +0 -0
  23. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/index.md +0 -0
  24. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/landscape.md +0 -0
  25. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/local_mode.md +0 -0
  26. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/policy.md +0 -0
  27. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/quickstart.md +0 -0
  28. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/security_model.md +0 -0
  29. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/docs/sharding.md +0 -0
  30. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_ctypes_matmul/Makefile +0 -0
  31. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_ctypes_matmul/README.md +0 -0
  32. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_ctypes_matmul/cuda_ctypes_matmul.py +0 -0
  33. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_ctypes_matmul/matmul_kernel.cu +0 -0
  34. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_ctypes_matmul/test_cuda_ctypes_matmul.py +0 -0
  35. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_nanobind_matmul/CMakeLists.txt +0 -0
  36. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_nanobind_matmul/README.md +0 -0
  37. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_nanobind_matmul/src/bindings.cpp +0 -0
  38. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_nanobind_matmul/src/matmul_cuda.h +0 -0
  39. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_nanobind_matmul/src/matmul_kernel.cu +0 -0
  40. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_nanobind_matmul/test_cuda_nanobind_matmul.py +0 -0
  41. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_pybind11_matmul/CMakeLists.txt +0 -0
  42. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_pybind11_matmul/README.md +0 -0
  43. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_pybind11_matmul/src/bindings.cpp +0 -0
  44. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_pybind11_matmul/src/matmul_cuda.h +0 -0
  45. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_pybind11_matmul/src/matmul_kernel.cu +0 -0
  46. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/cuda_pybind11_matmul/test_cuda_pybind11_matmul.py +0 -0
  47. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/github_gpu_runner/.github/workflows/gpu-test.yml +0 -0
  48. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/jax_ffi_cuda_matmul/CMakeLists.txt +0 -0
  49. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/jax_ffi_cuda_matmul/README.md +0 -0
  50. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/jax_ffi_cuda_matmul/jax_ffi_matmul.py +0 -0
  51. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/jax_ffi_cuda_matmul/src/matmul_ffi.cu +0 -0
  52. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/jax_ffi_cuda_matmul/test_jax_ffi_cuda_matmul.py +0 -0
  53. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/local_receipt_verify/.github/workflows/verify.yml +0 -0
  54. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/minimal_python_only/conftest.py +0 -0
  55. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/minimal_python_only/test_minimal.py +0 -0
  56. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/wrapped_cuda_ctypes/fake_cuda_lib.py +0 -0
  57. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/examples/wrapped_cuda_ctypes/test_cuda_wrapper.py +0 -0
  58. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/install.sh +0 -0
  59. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/mkdocs.yml +0 -0
  60. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/requirements-dev.txt +0 -0
  61. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/requirements.txt +0 -0
  62. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/__main__.py +0 -0
  63. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/cli.py +0 -0
  64. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/compare.py +0 -0
  65. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/config.py +0 -0
  66. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/fingerprint.py +0 -0
  67. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/gitutils.py +0 -0
  68. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/merge.py +0 -0
  69. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/plugin.py +0 -0
  70. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/receipt.py +0 -0
  71. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/signers/__init__.py +0 -0
  72. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/signers/base.py +0 -0
  73. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/src/pytest_gpu_proof/verify.py +0 -0
  74. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/conftest.py +0 -0
  75. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_cli.py +0 -0
  76. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_compare.py +0 -0
  77. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_config.py +0 -0
  78. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_fingerprint.py +0 -0
  79. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_gitutils.py +0 -0
  80. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_merge.py +0 -0
  81. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_plugin_capture.py +0 -0
  82. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_receipt.py +0 -0
  83. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_sharding.py +0 -0
  84. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/tests/test_verifier.py +0 -0
  85. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/README.md +0 -0
  86. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/build_site.py +0 -0
  87. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/check_site.py +0 -0
  88. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/favicon.svg +0 -0
  89. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/index.html +0 -0
  90. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/main.js +0 -0
  91. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/overrides/main.html +0 -0
  92. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/provenance.json +0 -0
  93. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/requirements.txt +0 -0
  94. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/style.css +0 -0
  95. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/test_site.py +0 -0
  96. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/workflow-mobile.svg +0 -0
  97. {pytest_gpu_proof-0.5.2 → pytest_gpu_proof-0.5.3}/website/workflow.svg +0 -0
@@ -4,6 +4,13 @@ All notable changes to pytest-gpu-proof are documented here. The format is
4
4
  based on [Keep a Changelog](https://keepachangelog.com/); versions follow
5
5
  [SemVer](https://semver.org/) (pre-1.0: minor bumps may break).
6
6
 
7
+ ## [0.5.3] — 2026-12-02
8
+
9
+ - The verifier retries the fetch of a signer's public keys from GitHub three
10
+ times, after 2, 5 and 10 seconds, before failing. GitHub returns a transient
11
+ 404 for that URL now and then, which failed valid receipts. A failed fetch is
12
+ never treated as success.
13
+
7
14
  ## [0.5.2] — 2026-12-02
8
15
 
9
16
  - Verifier policy can opt into `warn_on_age: true` for historical evidence.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-gpu-proof
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: pytest plugin for GPU equivalence testing with signed receipts verified via GitHub SSH keys
5
5
  Project-URL: Homepage, https://a2r-lab.org/pytest-gpu-proof/
6
6
  Project-URL: Documentation, https://a2r-lab.org/pytest-gpu-proof/docs/
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pytest-gpu-proof"
7
- version = "0.5.2"
7
+ version = "0.5.3"
8
8
  description = "pytest plugin for GPU equivalence testing with signed receipts verified via GitHub SSH keys"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -0,0 +1 @@
1
+ __version__ = "0.5.3"
@@ -10,6 +10,7 @@ import base64
10
10
  import hashlib
11
11
  import os
12
12
  import re
13
+ import time
13
14
  from pathlib import Path
14
15
  from typing import List, Optional
15
16
  from urllib.request import urlopen
@@ -116,6 +117,9 @@ def _parse_pubkey_line(line: str):
116
117
  return None
117
118
 
118
119
 
120
+ # Seconds to wait before each attempt at the key URL.
121
+ _KEY_FETCH_PAUSES = (0, 2, 5, 10)
122
+
119
123
  _GITHUB_USERNAME_RE = re.compile(r"^[A-Za-z0-9](?:-?[A-Za-z0-9]){0,38}$")
120
124
 
121
125
 
@@ -123,12 +127,22 @@ def fetch_github_public_keys(username: str) -> List:
123
127
  if not _GITHUB_USERNAME_RE.match(username):
124
128
  raise VerifierError(f"invalid GitHub username: {username!r}")
125
129
  url = f"https://github.com/{username}.keys"
126
- try:
127
- with urlopen(url, timeout=10) as resp:
128
- content = resp.read(1024 * 1024).decode()
129
- except Exception as e:
130
+ # GitHub answers this URL with a transient 404 or a timeout now and then.
131
+ # Retry before failing; a wrong answer is never accepted, only asked again.
132
+ content = None
133
+ for attempt, pause in enumerate(_KEY_FETCH_PAUSES):
134
+ if pause:
135
+ time.sleep(pause)
136
+ try:
137
+ with urlopen(url, timeout=10) as resp:
138
+ content = resp.read(1024 * 1024).decode()
139
+ break
140
+ except Exception as e:
141
+ error = e
142
+ if content is None:
130
143
  raise VerifierError(
131
- f"Could not fetch public keys for GitHub user {username!r}: {e}"
144
+ f"Could not fetch public keys for GitHub user {username!r} "
145
+ f"after {len(_KEY_FETCH_PAUSES)} attempts: {error}"
132
146
  )
133
147
 
134
148
  keys = [_parse_pubkey_line(line) for line in content.splitlines()]
@@ -250,12 +250,17 @@ def test_parse_and_fetch_github_keys(monkeypatch, ssh_key_file):
250
250
 
251
251
 
252
252
  def test_fetch_github_keys_errors(monkeypatch):
253
+ calls = []
254
+
253
255
  def network_error(*args, **kwargs):
256
+ calls.append(1)
254
257
  raise OSError("offline")
255
258
 
259
+ monkeypatch.setattr("pytest_gpu_proof.signers.ed25519.time.sleep", lambda s: None)
256
260
  monkeypatch.setattr("pytest_gpu_proof.signers.ed25519.urlopen", network_error)
257
- with pytest.raises(VerifierError, match="Could not fetch"):
261
+ with pytest.raises(VerifierError, match="Could not fetch.*after 4 attempts"):
258
262
  fetch_github_public_keys("alice")
263
+ assert len(calls) == 4
259
264
 
260
265
  class Empty:
261
266
  def __enter__(self):
@@ -270,3 +275,32 @@ def test_fetch_github_keys_errors(monkeypatch):
270
275
  monkeypatch.setattr("pytest_gpu_proof.signers.ed25519.urlopen", lambda *a, **k: Empty())
271
276
  with pytest.raises(VerifierError, match="No usable"):
272
277
  fetch_github_public_keys("alice")
278
+
279
+
280
+ def test_fetch_github_keys_retries_a_transient_failure(monkeypatch, ssh_key_file):
281
+ from urllib.error import HTTPError
282
+
283
+ _, private_key = ssh_key_file
284
+ line = private_key.public_key().public_bytes(Encoding.OpenSSH, PublicFormat.OpenSSH).decode()
285
+ pauses, calls = [], []
286
+
287
+ class Response:
288
+ def __enter__(self):
289
+ return self
290
+
291
+ def __exit__(self, *a):
292
+ return False
293
+
294
+ def read(self, n):
295
+ return line.encode()
296
+
297
+ def flaky(url, timeout):
298
+ calls.append(url)
299
+ if len(calls) < 3:
300
+ raise HTTPError(url, 404, "Not Found", None, None)
301
+ return Response()
302
+
303
+ monkeypatch.setattr("pytest_gpu_proof.signers.ed25519.time.sleep", pauses.append)
304
+ monkeypatch.setattr("pytest_gpu_proof.signers.ed25519.urlopen", flaky)
305
+ assert len(fetch_github_public_keys("alice")) == 1
306
+ assert len(calls) == 3 and pauses == [2, 5]
@@ -1 +0,0 @@
1
- __version__ = "0.5.2"