Skip to content

fix(cache): normalize bypassed scan failures#1702

Open
mldangelo-oai wants to merge 2 commits into
mainfrom
fix/cache-bypass-scan-outcome
Open

fix(cache): normalize bypassed scan failures#1702
mldangelo-oai wants to merge 2 commits into
mainfrom
fix/cache-bypass-scan-outcome

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Contributor

Summary

  • normalize bare unsuccessful ScanResult metadata on direct cached_scan bypasses
  • add regression coverage for read-failure-aware cache bypass results

Validation

  • PYTHONPATH=/Users/mdangelo/.codex/worktrees/76dd/modelaudit PROMPTFOO_DISABLE_TELEMETRY=1 /Users/mdangelo/code/modelaudit/.venv/bin/pytest tests/cache/test_cache_correctness.py::test_cached_scan_normalizes_and_skips_persisting_bare_unsuccessful_scan_result tests/cache/test_cache_correctness.py::test_cached_scan_normalizes_bare_unsuccessful_result_on_direct_bypass -q
  • PYTHONPATH=/Users/mdangelo/.codex/worktrees/76dd/modelaudit /Users/mdangelo/code/modelaudit/.venv/bin/ruff check modelaudit/utils/helpers/cache_decorator.py tests/cache/test_cache_correctness.py
  • PYTHONPATH=/Users/mdangelo/.codex/worktrees/76dd/modelaudit /Users/mdangelo/code/modelaudit/.venv/bin/ruff format --check modelaudit/utils/helpers/cache_decorator.py tests/cache/test_cache_correctness.py
  • PYTHONPATH=/Users/mdangelo/.codex/worktrees/76dd/modelaudit /Users/mdangelo/code/modelaudit/.venv/bin/mypy modelaudit/utils/helpers/cache_decorator.py tests/cache/test_cache_correctness.py

Notes

  • Standard local uv run pytest is blocked before collection on this macOS ARM host by the existing tensorrt-cu13-libs placeholder-wheel install failure.

@github-actions

Copy link
Copy Markdown
Contributor

Workflow run and artifacts

Performance Benchmarks

Compared 13 shared benchmarks with a regression threshold of 15%.
Status: 0 regressions, 0 improved, 13 stable, 0 new, 0 missing.
Aggregate shared-benchmark median: 4.367s -> 4.347s (-0.4%).

Workload Benchmark Target Size Files Baseline Current Change Status
warm-cache-rescan tests/benchmarks/test_scan_benchmarks.py::test_scan_warm_cached_repository_rescan release-candidate 547.3 KiB 32 167.36ms 155.02ms -7.4% stable
nested-payload-review tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_nested_payload_review[nested_base64] nested_base64 98 B 1 304.3us 286.6us -5.8% stable
direct-malicious-upload tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_direct_malicious_upload malicious_reduce 52 B 1 225.0us 216.4us -3.8% stable
nested-payload-review tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_nested_payload_review[nested_raw] nested_raw 78 B 1 276.1us 269.6us -2.4% stable
padded-multi-stream-upload tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_padded_multi_stream_upload multi_stream_padded 4.1 KiB 1 347.9us 341.9us -1.8% stable
chunked-upload-stream tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_chunked_upload_stream chunked_stream 278.2 KiB 1 114.32ms 115.77ms +1.3% stable
nested-payload-review tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_nested_payload_review[nested_hex] nested_hex 130 B 1 305.2us 302.1us -1.0% stable
clean-training-checkpoint tests/benchmarks/test_picklescan_benchmarks.py::test_picklescan_clean_training_checkpoint safe_large 278.2 KiB 1 111.24ms 112.03ms +0.7% stable
duplicate-heavy-registry tests/benchmarks/test_scan_benchmarks.py::test_scan_duplicate_registry_snapshot registry-snapshot 915.2 KiB 13 574.69ms 578.34ms +0.6% stable
rejected-basic-auth-candidates tests/benchmarks/test_scan_benchmarks.py::test_rejected_basic_auth_candidates_scan_linearly - 371.1 KiB 1 2.512s 2.496s -0.6% stable
single-checkpoint-preflight tests/benchmarks/test_scan_benchmarks.py::test_scan_single_checkpoint_before_load single_checkpoint.pkl 183.0 KiB 1 103.81ms 104.46ms +0.6% stable
mixed-model-repository tests/benchmarks/test_scan_benchmarks.py::test_scan_release_candidate_repository release-candidate 547.3 KiB 32 630.80ms 632.88ms +0.3% stable
suspicious-pickle-intake tests/benchmarks/test_scan_benchmarks.py::test_scan_suspicious_pickle_intake suspicious-intake 183.8 KiB 4 151.46ms 151.63ms +0.1% stable

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant