Skip to content

Delete intermediate results after retrieval#161

Merged
pbrassel merged 3 commits intomainfrom
delete-intermediate-results
Apr 15, 2026
Merged

Delete intermediate results after retrieval#161
pbrassel merged 3 commits intomainfrom
delete-intermediate-results

Conversation

@pbrassel
Copy link
Copy Markdown
Member

@pbrassel pbrassel commented Apr 15, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Intermediate result files are now automatically cleaned up after retrieval, improving resource management. Cleanup failures are handled gracefully without affecting the response.
  • Tests

    • Updated test coverage to verify cleanup behavior and support configurable cryptographic parameters.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Warning

Rate limit exceeded

@pbrassel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 47 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 51 minutes and 47 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: efac9063-89f0-4341-98a6-3dfacf840e7f

📥 Commits

Reviewing files that changed from the base of the PR and between e631022 and deb5560.

📒 Files selected for processing (1)
  • tests/common/helpers.py
📝 Walkthrough

Walkthrough

The pull request adds cleanup logic to delete hub bucket files after streaming completes in retrieve_intermediate_result_from_hub, updates test helpers to support configurable ECDH curves, modifies a test asset, and enhances test assertions to verify file deletion.

Changes

Cohort / File(s) Summary
Hub File Cleanup
project/routers/intermediate.py, tests/test_intermediate.py
Added try/finally block to delete hub bucket files after streaming, with error logging for deletion failures. Test now verifies deletion occurred via storage_client.get_bucket_file() assertion.
ECDH Curve Configuration
tests/common/helpers.py
Modified next_ecdh_keypair() to accept optional curve parameter (defaults to ec.SECP256R1()) instead of hardcoding ec.SECP384R1().
Test Assets
tests/assets/alice.pfx
Replaced private key content within PEM block boundaries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Files stream through the warren with care,
A cleanup spell lingers in the air—
try/finally bows, the buckets now bare,
ECDH curves dance, flexibly fair! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Delete intermediate results after retrieval' directly describes the main change: adding cleanup logic to delete hub bucket files after streaming intermediate results.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch delete-intermediate-results

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/common/helpers.py`:
- Around line 57-58: The function next_ecdh_keypair currently uses
ec.SECP256R1() as a default argument (evaluated at import time); change its
signature to accept curve=None and, inside the function, set if curve is None:
curve = ec.SECP256R1() before calling ec.generate_private_key, so the curve is
instantiated at call time; update any internal references to use the local curve
variable and preserve existing callers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e331bc23-6d6b-45bf-8cc5-890868e724d7

📥 Commits

Reviewing files that changed from the base of the PR and between e68d675 and e631022.

⛔ Files ignored due to path filters (1)
  • tests/assets/alice.pem is excluded by !**/*.pem
📒 Files selected for processing (4)
  • project/routers/intermediate.py
  • tests/assets/alice.pfx
  • tests/common/helpers.py
  • tests/test_intermediate.py

Comment thread tests/common/helpers.py Outdated
@pbrassel pbrassel merged commit b9659ae into main Apr 15, 2026
3 checks passed
@pbrassel pbrassel deleted the delete-intermediate-results branch April 15, 2026 10:31
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