Skip to content

Remove 60 MB of the letter 'a' from spec/fixtures/vcr_cassettes #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

compumike
Copy link
Contributor

The majority of the installed size of the ruby_llm gem was simply repeats of the letter a. This PR uses VCR's filter_sensitive_data to avoid storing 60 million bytes of 'a' in spec/fixtures/vcr_cassettes. 😂

Before

du -s spec/fixtures 
73448   spec/fixtures

ls -al chat_real_error_scenarios_*
10002062 chat_real_error_scenarios_anthropic_claude-3-5-haiku-20241022_handles_context_length_exceeded_errors.yml
10002198 chat_real_error_scenarios_bedrock_anthropic_claude-3-5-haiku-20241022-v1_0_handles_context_length_exceeded_errors.yml
10001980 chat_real_error_scenarios_deepseek_deepseek-chat_handles_context_length_exceeded_errors.yml
10001862 chat_real_error_scenarios_gemini_gemini-2_0-flash_handles_context_length_exceeded_errors.yml
10002399 chat_real_error_scenarios_openai_gpt-4_1-nano_handles_context_length_exceeded_errors.yml
10002014 chat_real_error_scenarios_openrouter_anthropic_claude-3_5-haiku_handles_context_length_exceeded_errors.yml

After

du -s spec/fixtures 
14864   spec/fixtures

ls -al chat_real_error_scenarios_*
2202 chat_real_error_scenarios_anthropic_claude-3-5-haiku-20241022_handles_context_length_exceeded_errors.yml
2338 chat_real_error_scenarios_bedrock_anthropic_claude-3-5-haiku-20241022-v1_0_handles_context_length_exceeded_errors.yml
2120 chat_real_error_scenarios_deepseek_deepseek-chat_handles_context_length_exceeded_errors.yml
3207 chat_real_error_scenarios_gemini_gemini-2_0-flash_handles_context_length_exceeded_errors.yml
2539 chat_real_error_scenarios_openai_gpt-4_1-nano_handles_context_length_exceeded_errors.yml
2154 chat_real_error_scenarios_openrouter_anthropic_claude-3_5-haiku_handles_context_length_exceeded_errors.yml

@tpaulshippy
Copy link
Contributor

If you think that's bad, wait until you see #234 haha. Probably need to do the same thing there.

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.96%. Comparing base (701d5d0) to head (dd90b29).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
+ Coverage   88.93%   88.96%   +0.02%     
==========================================
  Files          75       75              
  Lines        2865     2863       -2     
  Branches      559      559              
==========================================
- Hits         2548     2547       -1     
+ Misses        317      316       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@crmne
Copy link
Owner

crmne commented Jul 21, 2025

A clever solution! Thank you for this.

Just a minor correction: this doesn't affect the installed size of the gem, just the size of the repo.

@crmne crmne merged commit 8e056dc into crmne:main Jul 21, 2025
15 checks passed
@compumike
Copy link
Contributor Author

Just a minor correction: this doesn't affect the installed size of the gem, just the size of the repo.

Ah, I see, thanks! I was temporarily pointing bundler to my git branch, so I noticed the increased size. But now that I see ruby_llm.gemfile, I understand that you're correct that none of spec makes it into the gem. Thank you.

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.

3 participants