Skip to content

fix(rspec): honor TRUNK_DISABLE_QUARANTINING during the run - #1247

Merged
trunk-io[bot] merged 1 commit into
mainfrom
dylan/rspec-honor-trunk-disable-quarantining
Oct 29, 2026
Merged

trunk-io[bot] merged 1 commit into
mainfrom
dylan/rspec-honor-trunk-disable-quarantining

Conversation

@dfrankland

Copy link
Copy Markdown
Member

The RSpec gem documents TRUNK_DISABLE_QUARANTINING ("Set to 'true' to disable quarantining") in trunk_spec_helper.rb and on the RSpec page at docs.trunk.io, but it never worked. #824 passed the variable only to the upload step. The quarantine check that runs when a test fails never read it, so with it set the gem still looked failures up and quarantined them, and RSpec still passed.

What changes.

  • With TRUNK_DISABLE_QUARANTINING=true, a failing example isn't looked up or quarantined, so the failure stands. At the end of the run the gem prints "Note: TRUNK_DISABLE_QUARANTINING is set. Test failures were not quarantined." The value has to be exactly true, as with the gem's other flags and the upload's parsing of this one.
  • The gem's upload telemetry reports the quarantine query result as Disabled rather than Skipped, as the CLI does for --disable-quarantining.

Release note. Anyone who already sets TRUNK_DISABLE_QUARANTINING=true for RSpec will now see failures that used to be quarantined fail their run, which is what the setting always claimed to do.

Testing.

  • New Ruby spec: with the variable set, an example that the lookup would quarantine still fails, and no lookup is made. It fails without the fix.
  • New test_report test: publishing with the variable set reports Disabled in telemetry. It reports Skipped without the fix.
  • bundle exec rake test (the gem's suite) and cargo test -p test_report: all pass.
  • Rubocop: the new if in close and the new predicate on class << self push those two over their limits, so both are added to trunk-ignore, like the file's other long methods.

🤖 Generated with Claude Code

@trunk-io

trunk-io Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.62%. Comparing base (41f781f) to head (dce23cf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1247      +/-   ##
==========================================
+ Coverage   85.42%   85.62%   +0.20%     
==========================================
  Files          86       86              
  Lines       19235    19241       +6     
==========================================
+ Hits        16431    16476      +45     
+ Misses       2804     2765      -39     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trunk-staging-io

trunk-staging-io Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
pending_quarantine_test should be quarantined when run with variant A test marked as pending was expected to fail but unexpectedly passed. Logs ↗︎
variant_quarantine_test should be quarantined when run with variant The quarantine test failed because it expected 2 + 2 to equal 5, but the result was 4. Logs ↗︎

View Full Report ↗︎ ⋅ Docs

@trunk-io

trunk-io Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

@TylerJang27 TylerJang27 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

oh my

The gem documents TRUNK_DISABLE_QUARANTINING ("Set to 'true' to disable
quarantining"), but it only ever reached the upload step. The check
that runs when a test fails never read it, so failures were still
looked up and quarantined.

With TRUNK_DISABLE_QUARANTINING=true, a failure is no longer looked up
or quarantined, and the run ends with a note saying so. The gem's upload
telemetry reports the quarantine query result as Disabled rather than
Skipped, as the CLI does for --disable-quarantining.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dfrankland
dfrankland force-pushed the dylan/rspec-honor-trunk-disable-quarantining branch from 253185c to dce23cf Compare October 29, 2026 17:40
@dfrankland

Copy link
Copy Markdown
Member Author

/trunk merge

@trunk-io
trunk-io Bot merged commit 4d15418 into main Oct 29, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants