Skip to content

fix: mark incomplete sharded scans inconclusive#909

Open
mldangelo-oai wants to merge 3 commits intomainfrom
mdangelo/codex/sharded-scan-outcome-audit
Open

fix: mark incomplete sharded scans inconclusive#909
mldangelo-oai wants to merge 3 commits intomainfrom
mdangelo/codex/sharded-scan-outcome-audit

Conversation

@mldangelo-oai
Copy link
Copy Markdown
Contributor

Summary

  • require exact shard filename matches and record expected-vs-present shard coverage
  • mark missing or failed shard scans as inconclusive metadata instead of security warnings
  • skip caching explicit incomplete, inconclusive, or operational scan metadata

Validation

  • uv run pytest tests/utils/file/test_advanced_file_handler.py::TestShardedModelDetector::test_detect_shards_records_missing_expected_indices tests/utils/file/test_advanced_file_handler.py::TestShardedModelDetector::test_detect_shards_ignores_suffix_near_matches tests/utils/file/test_advanced_file_handler.py::TestAdvancedFileHandler::test_sharded_model_missing_shards_marks_scan_inconclusive tests/utils/file/test_advanced_file_handler.py::TestAdvancedFileHandler::test_parallel_shard_errors_mark_scan_inconclusive tests/cache/test_cache_correctness.py::test_cached_scan_skips_persisting_incomplete_metadata
  • uv run pytest tests/utils/file/test_advanced_file_handler.py tests/utils/file/test_large_file_handler.py tests/cache/test_cache_correctness.py
  • uv run ruff format modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/
  • uv run ruff check --fix modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/
  • uv run mypy modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/
  • uv run pytest -n auto -m "not slow and not integration" --maxfail=1
  • uv run ruff format --check modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/
  • uv run ruff check modelaudit/ packages/modelaudit-picklescan/src packages/modelaudit-picklescan/tests tests/
  • git diff --check

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

Warning

Rate limit exceeded

@mldangelo-oai has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 48 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 48 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b69af4c-d9c7-4bd8-8cc3-4484e5763e75

📥 Commits

Reviewing files that changed from the base of the PR and between f285a05 and 51ad2c4.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • modelaudit/cache/cache_policy.py
  • modelaudit/utils/file/handlers.py
  • tests/cache/test_cache_correctness.py
  • tests/utils/file/test_advanced_file_handler.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mdangelo/codex/sharded-scan-outcome-audit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Workflow run and artifacts

Performance Benchmarks

Compared 6 shared benchmarks with a regression threshold of 15%.
Status: 0 regressions, 0 improved, 6 stable, 0 new, 0 missing.
Aggregate shared-benchmark median: 692.73ms -> 677.23ms (-2.2%).

Benchmark Target Size Files Baseline Current Change Status
tests/benchmarks/test_scan_benchmarks.py::test_detect_file_format_safe_pickle safe_model.pkl 49.4 KiB 1 167.2us 161.9us -3.2% stable
tests/benchmarks/test_scan_benchmarks.py::test_scan_duplicate_directory duplicate-corpus 840.0 KiB 81 492.81ms 480.02ms -2.6% stable
tests/benchmarks/test_scan_benchmarks.py::test_validate_file_type_pytorch_zip state_dict.pt 1.5 MiB 1 48.2us 49.2us +2.2% stable
tests/benchmarks/test_scan_benchmarks.py::test_scan_mixed_directory mixed-corpus 1.7 MiB 54 138.29ms 135.53ms -2.0% stable
tests/benchmarks/test_scan_benchmarks.py::test_scan_pytorch_zip state_dict.pt 1.5 MiB 1 33.54ms 33.67ms +0.4% stable
tests/benchmarks/test_scan_benchmarks.py::test_scan_safe_pickle safe_model.pkl 49.4 KiB 1 27.87ms 27.80ms -0.2% stable

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ce3ad127c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai mldangelo-oai enabled auto-merge (squash) April 10, 2026 17:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b3d399797

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant