Skip to content

feat(research): reuse verified snapshot cache - #245

Merged
proerror77 merged 1 commit into
mainfrom
codex/research-snapshot-cache-241
Jul 23, 2026
Merged

feat(research): reuse verified snapshot cache#245
proerror77 merged 1 commit into
mainfrom
codex/research-snapshot-cache-241

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Change contract

Allow alpha-harness prediction execute to reuse a read-only ResearchSnapshot archive keyed by its authenticated SHA-256, while preserving private per-attempt staging and fail-closed digest verification.

Closes #241
Parent: #240

Out of scope

Dependency / merge order

None. This PR is independently mergeable. The live warm-worker benchmark in #243 depends on this capability plus #236 and #242.

Focused validation

  • TDD red: the cache tests initially failed because PredictionExecuteArgs had no snapshot_cache_dir field.
  • cargo test -p alpha-harness prediction_runner::tests -- --nocapture — 12 passed.
  • cargo test -p alpha-harness — 80 passed.
  • cargo fmt -p alpha-harness -- --check
  • git diff --check
  • Two read-only code reviews: spec APPROVE; standards/security APPROVE after operator-contract documentation was added.

Counterexample proof: a cache entry at the authenticated SHA filename with corrupt bytes produces prediction snapshot archive SHA256 mismatch and the runner marker is never created.

Rollout / rollback impact

Rollout is opt-in via --snapshot-cache-dir; callers without it retain the existing URL fetch path. Cache misses also retain the existing URL path. Removing the option or reverting this PR restores the previous behavior. No runtime or cloud resource is changed by this PR.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e387bc30-b692-4926-a5c3-922e4718e9b7

📥 Commits

Reviewing files that changed from the base of the PR and between 9aa1797 and 71320b2.

📒 Files selected for processing (3)
  • rust_hft/alpha-harness/README.md
  • rust_hft/alpha-harness/app/src/cli.rs
  • rust_hft/alpha-harness/app/src/prediction_runner.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/research-snapshot-cache-241

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.

@proerror77
proerror77 merged commit 5d38626 into main Jul 23, 2026
32 checks passed
@proerror77
proerror77 deleted the codex/research-snapshot-cache-241 branch July 23, 2026 03:23
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.

Reuse authenticated ResearchSnapshot archives from a read-only worker cache

1 participant